From e67b3e378540256056345495f8da181266261bab Mon Sep 17 00:00:00 2001 From: Dingo Date: Thu, 25 May 2017 07:04:18 +0300 Subject: [PATCH] A17 Release - Toned down the mod a lot, it is now a mere 4 patch-type changes that I found to be more reasonable than A17's priorirites. - No more custom options, HugsLib menus etc. Just a very simple mod. A17 gets most thigns right in my opinion, with changes to work zoning as well. --- About/About.xml | 10 +- Assemblies/RefactoredWorkPriorities.dll | Bin 10240 -> 0 bytes Defs/UpdateFeatureDefs/UpdateFeatures.xml | 16 --- Defs/WorkGiverDefs/WorkGivers.xml | 127 ------------------ Defs/WorkTypeDefs/WorkTypes.xml | 21 --- .../Keyed/ChineseSimplified.xml | 22 --- Languages/English/Keyed/English.xml | 22 --- Patches/WorkGivers.xml | 37 +++++ Source/Properties/AssemblyInfo.cs | 36 ----- Source/RWPMenu.cs | 48 ------- Source/RefactoredWorkPriorities.csproj | 69 ---------- Source/WorkGiver_HaulDeteriorating.cs | 53 -------- Source/WorkGiver_HaulRottable.cs | 50 ------- Source/WorkGiver_RepairCustom.cs | 17 --- Source/WorkGiver_TendPrioritized.cs | 35 ----- 15 files changed, 40 insertions(+), 523 deletions(-) delete mode 100644 Assemblies/RefactoredWorkPriorities.dll delete mode 100644 Defs/UpdateFeatureDefs/UpdateFeatures.xml delete mode 100644 Defs/WorkGiverDefs/WorkGivers.xml delete mode 100644 Defs/WorkTypeDefs/WorkTypes.xml delete mode 100644 Languages/ChineseSimplified/Keyed/ChineseSimplified.xml delete mode 100644 Languages/English/Keyed/English.xml create mode 100644 Patches/WorkGivers.xml delete mode 100644 Source/Properties/AssemblyInfo.cs delete mode 100644 Source/RWPMenu.cs delete mode 100644 Source/RefactoredWorkPriorities.csproj delete mode 100644 Source/WorkGiver_HaulDeteriorating.cs delete mode 100644 Source/WorkGiver_HaulRottable.cs delete mode 100644 Source/WorkGiver_RepairCustom.cs delete mode 100644 Source/WorkGiver_TendPrioritized.cs diff --git a/About/About.xml b/About/About.xml index e867513..51efa1b 100644 --- a/About/About.xml +++ b/About/About.xml @@ -3,12 +3,8 @@ Refactored Work Priorities Dingo https://ludeon.com/forums/index.php?topic=26077 - 0.16.0 - <color=red><size=24>Important:</size> + 0.17.0 + This once medium-scale mod is now a collection of minor tweaks to RimWorld's work priorities. -This mod requires <b>HugsLib</b>, it must be installed and loaded above this mod in the load order.</color> - -Tweaks work priorities to try and make pawn behaviour more intuitive and predictable. - -For the full list of changes please visit the Steam Workshop page or forum thread. +Requires no other mods to function, and is compatible with mostly everything. \ No newline at end of file diff --git a/Assemblies/RefactoredWorkPriorities.dll b/Assemblies/RefactoredWorkPriorities.dll deleted file mode 100644 index c68e3313d2266e3a5befc588c5378f4530be815a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10240 zcmeHMeQX@Zb$_#Ww|6{Alz5UzS(eF@C@J(wJd+efNwzFe{18c-6e%7}S(a>S?`}!1 zxxA%z_iWKhm2(0Ym4m_+k|3Y{Bdy^&2!h&$+sI8KBtawuP#ic#5x9thIB6Ov{Yd_4 z6Ch~m{@(2EeMq8WIYC>%8FJsw`<(aQ%)Fc39eL!>C_qF(T<^R?bP;!M-4fm!6u_=+ z`ny_swdVEB7sc@Fn0CB8zm5jBDm@u*Mi$32d#8yC?U*;hQjnZW+bRsaN@TY$Qs zVNw1s--{@d(6++vD0jMHqhy2$#deBlCA$B1FVQBS_HOR+lIv1B0(`JSFX`%MT;LyM zqu|L{i+%%>ElzYQX*+fXnDnh19Tis`S4HcF_eonfEeNu&bP5;S+K#KDbrbbeptAcg z=M{~8Qz%4Zn3&Ji6A4MZeXzDIAcuv1T~jt_ttN^-60|S_(GyW65NxSKZ)c5q4g$fY zV4^JPQbsZ|v&h z!4|A$thRHU?VU<}f)^mibdwlXKt#q+gU*r)=lmF$QxStgO>hGP`!Sr|28$L3-EsB< z=oLdck?3kDuqO=#9v$BCYD}zcQ>YXA;Q0D^Yz`4strqr`gZy?+LbdJ&)`F}>cQI+O zCjnSE$gyL}qKU=^xw;c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Uo0rdkmGgYNwmDZ_a_*{aUO$63o4 - - - - Refactored Work Priorities - RefactoredWorkPriorities - https://ludeon.com/forums/index.php?topic=26077.0 - - - - RWP_2_16_0 - 2.16.0 - RWP uses custom priorities that do not exist in vanilla RimWorld.\n\nYou can toggle the use of these custom priorities and read more about them in the menu (via tooltips).\n\nTo access the mod's menu, go to <b>Mod Settings</b> (accessed through RimWorld's Options menu). - - - \ No newline at end of file diff --git a/Defs/WorkGiverDefs/WorkGivers.xml b/Defs/WorkGiverDefs/WorkGivers.xml deleted file mode 100644 index 5a005e7..0000000 --- a/Defs/WorkGiverDefs/WorkGivers.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - DoctorTreat - - RWP.WorkGiver_TendPrioritized - Doctor - treat - treating - -
  • Manipulation
  • -
    - 70 - true -
    - - - - DoBillsMedicalMechanoidOperation - - WorkGiver_DoBill - Doctor - 1 - true - true - modify - modifying - -
  • Manipulation
  • -
    - true -
    - - - - - FixBrokenDownBuilding - - WorkGiver_FixBrokenDownBuilding - Repair - 100 - replace broken components in - replacing broken components in - -
  • Manipulation
  • -
    - true -
    - - - Repair - - RWP.WorkGiver_RepairCustom - Repair - 50 - repair - repairing - -
  • Manipulation
  • -
    - true -
    - - - - - RemoveRoofs - - WorkGiver_RemoveRoof - Construction - 70 - remove roof - removing roof - false - true - -
  • Manipulation
  • -
    -
    - - - BuildRoofs - - WorkGiver_BuildRoof - Construction - 60 - build roof - building roof - false - true - -
  • Manipulation
  • -
    -
    - - - - - HaulRottable - - RWP.WorkGiver_HaulRottable - Hauling - haul - hauling - 49 - -
  • Manipulation
  • -
    -
    - - - HaulDeteriorating - - RWP.WorkGiver_HaulDeteriorating - Hauling - haul - hauling - 43 - -
  • Manipulation
  • -
    -
    - -
    \ No newline at end of file diff --git a/Defs/WorkTypeDefs/WorkTypes.xml b/Defs/WorkTypeDefs/WorkTypes.xml deleted file mode 100644 index df133c1..0000000 --- a/Defs/WorkTypeDefs/WorkTypes.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Repair - Repair - Repairer - Repairing - Fix damaged or broken-down buildings. - Repair - 925 - true - -
  • Construction
  • -
    - -
  • ManualSkilled
  • -
    -
    - -
    \ No newline at end of file diff --git a/Languages/ChineseSimplified/Keyed/ChineseSimplified.xml b/Languages/ChineseSimplified/Keyed/ChineseSimplified.xml deleted file mode 100644 index fdecf02..0000000 --- a/Languages/ChineseSimplified/Keyed/ChineseSimplified.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - <b>[医生]</b> 优先治疗居民 - 医生会优先治疗居民然后是动物或者外来者。 - - <b>[维修]</b> 维修临界值(百分比) - 设定居民开始维修损坏物品的耐久度临界值。居民不会维修耐久度在这个百分比之上的物品。 - - <b>[搬运工]</b> 优先搬运易腐烂的物品 - 搬运工会优先搬运易腐烂的物品(如玉米,食物,等等)然后是一般物品。 - - <b>[Haul]</b> Skip dessicated rottables - If "Prioritise hauling rottables" is enabled, skip items which have rotted completely and become dessicated. - - <b>[搬运工]</b> 优先搬运易老化的物品 - 搬运工会优先搬运易老化的物品(如武器,木头,等等)然后是一般物品。 - - <b>[Haul]</b> Deterioratable HP threshold - If "Prioritise hauling deterioratables" is enabled, skip items if their health is below this percentage. - - diff --git a/Languages/English/Keyed/English.xml b/Languages/English/Keyed/English.xml deleted file mode 100644 index 28e2c62..0000000 --- a/Languages/English/Keyed/English.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - <b>[Doctor]</b> Prioritise treating colonists - Doctors will treat colonist injuries before treating animals or outsiders. - - <b>[Repair]</b> Repair threshold percentage - Determines the hit-points percentage for colonists to start repairing damaged things. Colonists will not repair things with HP above this percentage. - - <b>[Haul]</b> Prioritise hauling rottables - Haulers will haul rottable items (corn, meals etc.) before generic things. - - <b>[Haul]</b> Skip dessicated rottables - If "Prioritise hauling rottables" is enabled, skip items which have rotted completely and become dessicated. - - <b>[Haul]</b> Prioritise hauling deterioratables - Haulers will haul items which deteriorate over time (weapons, wood etc.) before generic things. - - <b>[Haul]</b> Deterioratable HP threshold - If "Prioritise hauling deterioratables" is enabled, skip items if their health is below this percentage. - - \ No newline at end of file diff --git a/Patches/WorkGivers.xml b/Patches/WorkGivers.xml new file mode 100644 index 0000000..ce81ec7 --- /dev/null +++ b/Patches/WorkGivers.xml @@ -0,0 +1,37 @@ + + + + + + + //WorkGiverDef[defName = "DoctorFeedAnimals"]/workType + + Handling + + + + + //WorkGiverDef[defName = "DoctorFeedAnimals"]/priorityInType + + 110 + + + + + + + //WorkGiverDef[defName = "RemoveRoofs"]/priorityInType + + 70 + + + + + //WorkGiverDef[defName = "BuildRoofs"]/priorityInType + + 60 + + + + + \ No newline at end of file diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs deleted file mode 100644 index ec387fc..0000000 --- a/Source/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RefactoredWorkPriorities")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("RefactoredWorkPriorities")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("49ac7432-c172-4858-80b3-90bfbeb87e15")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.4.16.0")] -[assembly: AssemblyFileVersion("2.4.16.0")] diff --git a/Source/RWPMenu.cs b/Source/RWPMenu.cs deleted file mode 100644 index 3804ca0..0000000 --- a/Source/RWPMenu.cs +++ /dev/null @@ -1,48 +0,0 @@ -using HugsLib; -using HugsLib.Settings; -using Verse; - -namespace RWP -{ - public class RWPMenu : ModBase - { - public override string ModIdentifier - { - get - { - return "RefactoredWorkPriorities"; - } - } - - public override void DefsLoaded() - { - RWPDefs(); - } - - public override void SettingsChanged() - { - RWPDefs(); - } - - private void RWPDefs() - { - var prioritizeTreatingColonists = Settings.GetHandle("RWP_Doctor_PrioritizeTreatingColonists", "RWP_setting_doctorTreatColonist_label".Translate(), "RWP_setting_doctorTreatColonist_desc".Translate(), true); - WorkGiver_TendPrioritized.TendColonistsFirst = prioritizeTreatingColonists.Value; - - var repairThresholdInt = Settings.GetHandle("RWP_Repair_RepairThresholdInt", "RWP_setting_repairThresholdInt_label".Translate(), "RWP_setting_repairThresholdInt_desc".Translate(), 100, Validators.IntRangeValidator(0, 100)); - WorkGiver_RepairCustom.RepairThreshold = repairThresholdInt.Value; - - var haulRottables = Settings.GetHandle("RWP_Haul_HaulRottables", "RWP_setting_haulRottables_label".Translate(), "RWP_setting_haulRottables_desc".Translate(), true); - WorkGiver_HaulRottable.PrioritizeRottable = haulRottables.Value; - - var haulRottablesSkipDessicated = Settings.GetHandle("RWP_Haul_HaulRottablesSkipDessicated", "RWP_setting_haulRottablesSkipDessicated_label".Translate(), "RWP_setting_haulRottablesSkipDessicated_desc".Translate(), true); - WorkGiver_HaulRottable.SkipDessicated = haulRottablesSkipDessicated.Value; - - var haulDeterioratables = Settings.GetHandle("RWP_Haul_HaulDeterioratables", "RWP_setting_haulDeterioratables_label".Translate(), "RWP_setting_haulDeterioratables_desc".Translate(), true); - WorkGiver_HaulDeteriorating.PrioritizeDeteriorating = haulDeterioratables.Value; - - var haulDeterioratables_HealthThresholdInt = Settings.GetHandle("RWP_Haul_HaulDeterioratables_HealthThresholdInt", "RWP_setting_haulDeterioratables_HealthThresholdInt".Translate(), "RWP_setting_haulDeterioratables_HealthThresholdInt_desc".Translate(), 35); - WorkGiver_HaulDeteriorating.DeterioratableMinHealthPercent = haulDeterioratables_HealthThresholdInt.Value; - } - } -} \ No newline at end of file diff --git a/Source/RefactoredWorkPriorities.csproj b/Source/RefactoredWorkPriorities.csproj deleted file mode 100644 index 1ed522a..0000000 --- a/Source/RefactoredWorkPriorities.csproj +++ /dev/null @@ -1,69 +0,0 @@ - - - - - Debug - AnyCPU - {49AC7432-C172-4858-80B3-90BFBEB87E15} - Library - Properties - RWP - RefactoredWorkPriorities - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - Off - - - - C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\Assembly-CSharp.dll - False - - - C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\HugsLib\Assemblies\HugsLib.dll - False - - - - - - - - - C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\UnityEngine.dll - False - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/WorkGiver_HaulDeteriorating.cs b/Source/WorkGiver_HaulDeteriorating.cs deleted file mode 100644 index 1b2b28c..0000000 --- a/Source/WorkGiver_HaulDeteriorating.cs +++ /dev/null @@ -1,53 +0,0 @@ -using RimWorld; -using System.Collections.Generic; -using System.Linq; -using Verse; - -namespace RWP -{ - public class WorkGiver_HaulDeteriorating : WorkGiver_HaulGeneral - { - public static bool PrioritizeDeteriorating = true; - - public static int DeterioratableMinHealthPercent = 35; - - public override bool Prioritized - { - get - { - return PrioritizeDeteriorating; - } - } - - public override bool ShouldSkip(Pawn pawn) - { - return !PrioritizeDeteriorating; - } - - public override bool HasJobOnThing(Pawn pawn, Thing t) - { - float tHealthPercent = (100 * t.HitPoints) / t.MaxHitPoints; - - return base.HasJobOnThing(pawn, t) && tHealthPercent >= DeterioratableMinHealthPercent; - } - - public override IEnumerable PotentialWorkThingsGlobal(Pawn pawn) //Lists all items with DeteriorationRate above 0 that aren't under a roof - { - return pawn.Map.listerHaulables.ThingsPotentiallyNeedingHauling().Where(t => GridsUtility.GetRoof(t.Position, t.Map) == null && t.GetStatValue(StatDefOf.DeteriorationRate, true) > 0f); - } - - public override float GetPriority(Pawn pawn, TargetInfo t) - { - Thing thing = t.Thing; - - float priority = (1f) / (thing.HitPoints / thing.GetStatValue(StatDefOf.DeteriorationRate, true)); - - if (thing.HitPoints <= (thing.MaxHitPoints / 10)) - { - priority = 0f; - } - - return priority; - } - } -} \ No newline at end of file diff --git a/Source/WorkGiver_HaulRottable.cs b/Source/WorkGiver_HaulRottable.cs deleted file mode 100644 index 4c8bfdd..0000000 --- a/Source/WorkGiver_HaulRottable.cs +++ /dev/null @@ -1,50 +0,0 @@ -using RimWorld; -using System.Collections.Generic; -using System.Linq; -using Verse; - -namespace RWP -{ - public class WorkGiver_HaulRottable : WorkGiver_HaulGeneral - { - public static bool PrioritizeRottable = true; - - public static bool SkipDessicated = true; - - public override bool Prioritized - { - get - { - return PrioritizeRottable; - } - } - - public override bool ShouldSkip(Pawn pawn) - { - return !PrioritizeRottable; - } - - public override bool HasJobOnThing(Pawn pawn, Thing t) - { - if (t.IsDessicated() && SkipDessicated) - { - return false; - } - - return base.HasJobOnThing(pawn, t); - } - - public override IEnumerable PotentialWorkThingsGlobal(Pawn pawn) //Lists all items which need hauling and have CompProperties_Rottable - { - return pawn.Map.listerHaulables.ThingsPotentiallyNeedingHauling().Where(t => t.def.comps.Exists(tc => tc.compClass == typeof(CompRottable))); - } - - public override float GetPriority(Pawn pawn, TargetInfo t) - { - Thing thing = t.Thing; - var rottability = thing.def.GetCompProperties().daysToRotStart; - - return (1f) / (rottability); - } - } -} \ No newline at end of file diff --git a/Source/WorkGiver_RepairCustom.cs b/Source/WorkGiver_RepairCustom.cs deleted file mode 100644 index f30f867..0000000 --- a/Source/WorkGiver_RepairCustom.cs +++ /dev/null @@ -1,17 +0,0 @@ -using RimWorld; -using Verse; - -namespace RWP -{ - public class WorkGiver_RepairCustom : WorkGiver_Repair - { - public static int RepairThreshold = 100; - - public override bool HasJobOnThing(Pawn pawn, Thing t) - { - int hitPointPercentage = 100 * t.HitPoints / t.MaxHitPoints; - - return base.HasJobOnThing(pawn, t) && hitPointPercentage < RepairThreshold; - } - } -} \ No newline at end of file diff --git a/Source/WorkGiver_TendPrioritized.cs b/Source/WorkGiver_TendPrioritized.cs deleted file mode 100644 index cffb29c..0000000 --- a/Source/WorkGiver_TendPrioritized.cs +++ /dev/null @@ -1,35 +0,0 @@ -using RimWorld; -using Verse; - -namespace RWP -{ - public class WorkGiver_TendPrioritized : WorkGiver_Tend - { - public static bool TendColonistsFirst = true; - - public override bool Prioritized - { - get - { - return TendColonistsFirst; - } - } - - public override float GetPriority(Pawn pawn, TargetInfo t) - { - Pawn pawn2 = t.Thing as Pawn; - - if (pawn2.IsColonist) - { - return 100f; - } - - else if (pawn2.Faction == Faction.OfPlayer) - { - return 50f; - } - - return 1f; - } - } -} \ No newline at end of file