Skip to content

Commit

Permalink
v3.805
Browse files Browse the repository at this point in the history
  • Loading branch information
juanosarg committed Jun 3, 2022
1 parent df08fc7 commit e1aaf14
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
Binary file modified 1.3/Assemblies/AlphaBehavioursAndEvents.dll
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@ public void DoWindowContents(Rect inRect)
{
if (num == keys.Count/2) { ls.NewColumn(); }
bool test = pawnSpawnStates[keys[num]];
ls.CheckboxLabeled("AA_DisableAnimal".Translate(PawnKindDef.Named(keys[num]).LabelCap), ref test);
pawnSpawnStates[keys[num]] = test;
if (DefDatabase<PawnKindDef>.GetNamedSilentFail(keys[num]) == null)
{
pawnSpawnStates.Remove(keys[num]);
}
else
{
ls.CheckboxLabeled("AA_DisableAnimal".Translate(PawnKindDef.Named(keys[num]).LabelCap), ref test);
pawnSpawnStates[keys[num]] = test;
}
}

ls.End();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override void DoSettingsWindowContents(Rect inRect)
if (settings.pawnSpawnStates == null) settings.pawnSpawnStates = new Dictionary<string, bool>();
foreach (string defName in toggleablespawndef.toggleablePawns)
{
if (!settings.pawnSpawnStates.ContainsKey(defName))
if (!settings.pawnSpawnStates.ContainsKey(defName) && DefDatabase<ThingDef>.GetNamedSilentFail(defName) != null)
{
settings.pawnSpawnStates[defName] = false;
}
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit e1aaf14

Please sign in to comment.