Skip to content

Commit

Permalink
3.2.2: Important fix
Browse files Browse the repository at this point in the history
- Another fix for existing games
  • Loading branch information
UnlimitedHugs committed Jun 3, 2017
1 parent a4802a8 commit f21d2b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Mods/AllowTool/About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<author>UnlimitedHugs</author>
<targetVersion>0.17.0</targetVersion>
<url>https://ludeon.com/forums/index.php?topic=17218.0</url>
<description>Version: 3.2.1
<description>Version: 3.2.2

A set of tools to make your life on the Rim a bit easier.
Easily forbid and unforbid items, select similar things, have things hauled urgently and affect the entire map with powerful new tool extensions.
Expand Down
Binary file modified Mods/AllowTool/Assemblies/AllowTool.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// 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("3.2.1")]
[assembly: AssemblyFileVersion("3.2.1")]
[assembly: AssemblyVersion("3.2.2")]
[assembly: AssemblyFileVersion("3.2.2")]
7 changes: 5 additions & 2 deletions Source/AllowToolUtility.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Harmony;
using HugsLib.Utils;
using RimWorld;
Expand Down Expand Up @@ -44,9 +45,11 @@ public static void EnsureAllColonistsKnowWorkType(WorkTypeDef def, Map map) {
// the priority list must be padded to accomodate our WorkTypeDef.index
// the value added will be the priority for our work type
// more than one element may need to be added (other modded work types taking up indices)
while (priorityList.Count <= def.index && cyclesLeft > 0) {
// pad by the maximum index available to make provisions for ther mods' worktypes
var maxIndex = DefDatabase<WorkTypeDef>.AllDefs.Max(d => d.index);
while (priorityList.Count <= maxIndex && cyclesLeft > 0) {
cyclesLeft--;
var nowAddingSpecifiedWorktype = priorityList.Count == def.index;
var nowAddingSpecifiedWorktype = priorityList.Count == maxIndex;
int priority = disabledWorkPriority;
if (nowAddingSpecifiedWorktype) {
priority = GetWorkTypePriorityForPawn(def, pawn);
Expand Down

0 comments on commit f21d2b2

Please sign in to comment.