Ludeon Forums

RimWorld => Mods => Help => Topic started by: Rock5 on November 24, 2017, 11:27:03 PM

Title: How to count meat?
Post by: Rock5 on November 24, 2017, 11:27:03 PM
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.
Title: Re: How to count meat?
Post by: kaptain_kavern on November 25, 2017, 12:26:00 AM
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
Title: Re: How to count meat?
Post by: Rock5 on November 25, 2017, 01:14:49 AM
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.
Title: Re: How to count meat?
Post by: Rock5 on November 25, 2017, 10:19:45 AM
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 (https://ludeon.com/forums/index.php?topic=37177.0)

-- Locking topic --