RimWorldCCLTeam / CommunityCoreLibrary

For full details see the official Ludeon Forums thread.
https://ludeon.com/forums/index.php?topic=16599.0
The Unlicense
60 stars 27 forks source link

Override ThingComps #123

Closed aatxe closed 8 years ago

aatxe commented 8 years ago

Can you use the ThingComps injection to override pre-existing definitions on an object? I've tried to do this, and it doesn't appear to work, but I may just be missing something. If not, is there another way to do this using CCL?

ForsakenShell commented 8 years ago

No, injection is different than overriding. Currently you need to either override the xml directly, or what I do is make a SpecialInjector which replaces the comp needed. This does mean, however, that you lose the ability to set property values in xml unless you do some of your own xml magic (ie, create your own def). For "simple" comps which don't need any property values or one which you know you want specific values for, you can set them in code after the injection.

aatxe commented 8 years ago

So, the best course of action probably remains just using VanillaOverride. Thanks!