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

OutfitDefs #142

Closed TheKrush closed 8 years ago

TheKrush commented 8 years ago
- adds ability to use OutfitDef to create new default outfits to start
games with
- also adds the 'Nothing' outfit which is the opposite of 'Anything'

Since the outfit database isn't static (which is why you can't reuse outfits from one game to another) I made it so modders can now define their own outfits that get loaded when a new game calls new OutfitDatabase() and GenerateStartingOutfits() is triggered. I used a detour to do this and put all it's previous code (just the 3 outfits, Anything, Worker, Soldier, Nudist) into this function, plus added a 'Nothing' outfit (mainly because Nudist still let you wear stuff), and after those are setup then it loops through the outfit defs that were saved to CommunityCoreLibrary.Detour._OutfitDatabase.OutfitDefs and creates their outfits as well.

Let me know if there are any coding style or changes needed to get this merged in. I think it'd be a good addition to allow modders that are adding custom apparel to be able to also define custom outfits.

ForsakenShell commented 8 years ago

Very nice, we'll be sure it's in the next release and to credit you as a contributor. :)