Is it possible to use minified things as building material?

Started by DrCarl, October 07, 2019, 11:43:17 PM

Previous topic - Next topic

DrCarl

I'm currently working on my mod where I want to use a telescope as a material for a building. At first, I just add
"<telescope>1<telescope>"
to the costList, but It turned out that the pawn would haul the telescope to the blueprint only when it is installed. I know that a minified building is actually a "MinifiedThing" with the real thing inside its "innerContainer" field. So that I just assume that I cant simply achieve this only through XML?
I think I can try to write a thingComp or write a new ThingDef class to force add the minified thing I want to the cost list. But I think this is a little hard-coding. So I wonder if there's a better way...

Red192

Try to modify the building toll definition (jobDriver or whatever) to look inside all the minified things in the map if the telescope is inside