Open TV4Fun opened 7 years ago
I don't think we currently know how to tell what size a particular instance of armor or clothing is at this time. It's likely one of the undocumented virtual methods in item
, but which one is anyone's guess.
I recently figured out how sizes work, in writing the "tailor" plugin that is still in development. The "size" of an sizeable item is determined by the adultsize
property of the raw for the race of the items maker race, as returned by getMakerRace()
. Thus, if item
is the item in question, world->raws.creatures.all[item->getMakerRace()]->adultsize
will return the size, in cubic centimeters divided by ten. No, I'm not kidding: sizes in DF are expressed in cubic centimeters. See the DF wiki for more information. A "standard" adult dwarf is size 60,000. For some reason, however, the size stored in the raws is one tenth the size specified in the raws, so a standard dwarf will have an in-game size of 6000.
Did we figure this out for Workflow? I'm not sure if the Manager interface supports this, so it would be nice to have.
As far as I know, nobody has added size filtering to workflow. In theory, we should know how (see my above comment), but I don't think anyone has attempted to actually do it.
I'm using Workflow to manage my inventory levels of most of the things I produce. For the human soldiers in my army, I would like to produce some human-sized armor, and I would like Workflow to keep track of how much of it I have. The problem is, if I use Workflow to do this, it will only track the total number of shirts/breastplates etc. and not the number of large or human-sized items. It would be nice if I could set limits based on particular item sizes.