Hey everybody.
I extended IncidentWorker and put the assembly into MOD_DIR/Assemblies/. Then I added an xml file in MOD_DIR/Def/Incidents/IncidentsNoAutoJoin.xml:
(Comments added for this post only)
I received no errors in VS or the game, so I assumed it should show up in the debug menu. It doesn't . It's probably a silly mistake on my part, would be great if somebody could point it out for me, I didn't find it.
Here's the mod with source and all:
https://github.com/lincore81/RimworldMods/tree/master/NoAutoJoin
Thanks in advance!
I extended IncidentWorker and put the assembly into MOD_DIR/Assemblies/. Then I added an xml file in MOD_DIR/Def/Incidents/IncidentsNoAutoJoin.xml:
Code Select
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- Vanilla wanderer joins incident: -->
<IncidentDef>
<defName>WandererJoin</defName>
<label>wanderer join</label>
<targetType>BaseMap</targetType>
<workerClass>IncidentWorker_WandererJoin</workerClass>
<!-- in theory, storytellers shouldn't use this incident anymore? -->
<baseChance>0.0</baseChance>
<populationEffect>Increase</populationEffect>
</IncidentDef>
<!-- my replacement -->
<IncidentDef>
<defName>PoliteWandererJoin</defName>
<label>polite wanderer join</label>
<targetType>BaseMap</targetType>
<workerClass>NoAutoJoin.IncidentWorker_PoliteWandererJoin</workerClass>
<baseChance>0.4</baseChance>
<populationEffect>Increase</populationEffect>
</IncidentDef>
</Defs>
(Comments added for this post only)
I received no errors in VS or the game, so I assumed it should show up in the debug menu. It doesn't . It's probably a silly mistake on my part, would be great if somebody could point it out for me, I didn't find it.
Here's the mod with source and all:
https://github.com/lincore81/RimworldMods/tree/master/NoAutoJoin
Thanks in advance!