How to count meat?

Started by Rock5, November 24, 2017, 11:27:03 PM

Previous topic - Next topic

Rock5

I'm making a mod. I seem to have successfully patched into the required methods but now I need to know the commands to count meat. I'm not really sure I understand the structure of the Rimworld code so I'm having trouble finding out how to do it. Preferably I'd like to be able to count animal, human and insect meat separately but even a total count would be enough.

Thanks for any help.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

kaptain_kavern

I don't know anything aside XML modding, but Colony manager "auto-hunting" is capable of differentiate types of meat, I dunno if it can help a bit though.

Better Workbench Management meal bills settings as well

Rock5

Ok, I'm making progress. I can count meat with
bill.Map.resourceCounter.GetCountIn(ThingCategoryDefOf.MeatRaw)

I'm in the process of using a modified version of GetCountIn to filter the type of meat. I may be able to solve this on my own. After trying a couple of weeks, I'm quite impressed that I've finally nailed it on my own.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

Rock5

I made my mod that allows butcher bills to use the Do Until option. Check it out!
https://ludeon.com/forums/index.php?topic=37177.0

-- Locking topic --
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport