fluffy-mods / ColonyManager

Colony manager for RimWorld
Other
72 stars 38 forks source link

Check huntable animals list for incorrect loop count? #91

Closed FluffierThanThou closed 6 years ago

FluffierThanThou commented 7 years ago

I've uploaded a quick video to show you exactly what is happening on my end. Before doing this I removed the output log so it would make a fresh one for you.

Log: https://pastebin.com/f5rjTNBY

I have tested with 2 scenarios, A-my regular amount of mods, and B- ONLY your colony manager mod, as shown in the video.

In this video i first show clicking "All" then deselecting everything and you can see Wild Boar is still attached tot he command even though it is not in the list. Secondly I select every animal on the list manually without pressing select all and then deselect them all also and you can see there is no wild boar. Thirdly I do the first part again just to double check, select "All" then deselect all animals and wild boar still shows.

YouTube™ Video: Colony Manager Hunting Wild Boar Bug Views: 9

EDIT: At first I thought that maybe one of them was incorrectly named so I went through and tested each animal individually (not shown in video) however this is not the case. Wild boar is simply missing from the checkbox list, but not from the code.

EDIT2: Since Wild Boar would be the last animal in the list alphabetically, is it possible that the checkbox window is simply reaching a limit of allowed options and wild boar is being "cutoff" from the list. So the "all" function is still selecting all available targets, however the UI is restricted to a limit of designations on the scroll menu?

I had a look through your assembly and couldn't see any reason why the wild boar specifically wouldn't be listed, and i've shown that it is being called via "IsValidHuntingTarget" parameters but simply not showing for the GUI. It definitely appears to be GUI related rather than an actual issue with how the mod functions.

scaiper commented 6 years ago

It's this line: https://github.com/FluffierThanThou/ColonyManager/blob/0d58d6cb8a490622f1163b228f6d7f7352edb766/Source/ManagerTabs/ManagerTab_Hunting.cs#L143

Should be (_selected.AllowedAnimals.Count + 1) * _entryHeight