AndroidQuazar / VanillaExpandedFramework

Vanilla Expanded Framework for RimWorld
Other
36 stars 18 forks source link

KCSG: Add feature to prevent nomadic factions from spawning settlements #14

Closed sumghai closed 3 years ago

sumghai commented 3 years ago

Additions

Rationale

The optional hidden field included in the base game is used to prevent a given faction from ever spawning any settlements on the world map, but also hides them completely from the faction list and prevents them from having leaders generated. This is adequate for factions such as Ancients, Mechanoids and Insects, but is unsuitable for nomadic factions that are supposed to be present on the world map and have leaders.

The proposed code checks to see if a faction's KCSG.FactionSettlement ModExtension (if defined) has a new canSpawnSettlements field specified:

Usage

<modExtensions>
    <li Class="KCSG.FactionSettlement">
        <canSpawnSettlements>false</canSpawnSettlements>
    </li>
</modExtensions>

Testing