Consolidate the suite into one installable Institution mod with toggles

This repo is now the single player-facing mod. It bundles the whole engine and
all three feature layers into one folder -- Core, Contraband, Justice, and Gangs
DLLs plus Contraband's Defs -- with one About.xml and a settings shim that turns
each layer on or off from a checkbox (all on by default). A player installs one
mod (this) and Harmony; no separate Core dependency.

- Source/Institution: the only new code, a settings shim (InstitutionMod +
  InstitutionModSettings) that writes the player's choices into Core's shared
  InstitutionSettings. It owns no gameplay.
- Tools/package.sh: rebuilds the sibling DLLs clean and vendors them + Contraband's
  content in here, so the repo stays a complete drop-in.
- Assemblies/, Defs/, Textures/, Languages/: the vendored, assembled mod.

Still fully modular and splittable: the feature code stays in its own repos and
DLLs (their About.xml files remain), so breaking this back into separate mods is
just shipping them individually -- no code change.
This commit is contained in:
flan
2026-07-15 16:11:56 +00:00
parent 401d34f390
commit 18fc44c728
22 changed files with 340 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<JobDef>
<defName>Contraband_SearchPawn</defName>
<driverClass>Contraband.JobDriver_SearchPawn</driverClass>
<reportString>searching TargetA.</reportString>
</JobDef>
<!--
A NEW WorkGiver class, not a patch on a vanilla one. That is what keeps this mod out of a
fight with the rest of the prison ecosystem:
- Custom Prisoner Interactions patches the NAMED vanilla warden givers (_Chat, _Convert,
_Enslave, _ReleasePrisoner). It cannot see this one.
- Prison Commons postfixes WorkGiver_Warden.ShouldSkip on the BASE class, which this
inherits and does not override, so searches respect prison-commons areas for free.
Priority sits below feeding: a starving prisoner matters more than a hidden shiv.
-->
<WorkGiverDef>
<defName>Contraband_WardenSearch</defName>
<label>search prisoners for contraband</label>
<giverClass>Contraband.WorkGiver_Warden_Search</giverClass>
<workType>Warden</workType>
<verb>search</verb>
<gerund>searching</gerund>
<priorityInType>40</priorityInType>
<requiredCapacities>
<li>Manipulation</li>
<li>Sight</li>
</requiredCapacities>
</WorkGiverDef>
</Defs>
+41
View File
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!--
A crude pick, filed the same way a shiv is: off the cell's own furniture, over quiet days, the
damage to the source the visible tell. Where the shiv is a weapon, this is a way OUT: its whole
purpose is the tunnel (escapeWorker), so it carries no weapon stats and is never equipped.
A finished pick starts a Prison-Architect dig: the holder tunnels under the ground and everything
on it toward the nearest wilderness, surfacing beyond the perimeter wall or fence. The dig itself
is a second secret; a warden's cell search can turn it up, and the deeper the shaft the harder it
is to miss. It works for any held pawn (prisoner, ward patient, slave) because the disposition
to dig, not a prison-only mental break, is what drives it.
-->
<ThingDef ParentName="ResourceBase">
<defName>CB_DiggingTool</defName>
<label>crude pick</label>
<description>A stubby digging pick filed off a bed frame, its point hardened in a cell wall. Useless as a weapon and useless above ground -- but pointed downward, patiently, it is a way out that no lock and no guard can see.</description>
<techLevel>Neolithic</techLevel>
<graphicData>
<texPath>Things/Item/Contraband/CrudePick</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<statBases>
<MaxHitPoints>60</MaxHitPoints>
<Mass>1.2</Mass>
<Beauty>-4</Beauty>
<DeteriorationRate>2.0</DeteriorationRate>
</statBases>
<stackLimit>1</stackLimit>
<comps>
<li Class="Contraband.CompProperties_Contraband">
<concealability>0.5</concealability>
<hideIn>InCell</hideIn>
<acquireWorker>Contraband.AcquireWorker_Improvise</acquireWorker>
<escapeWorker>Contraband.EscapeTunnelWorker</escapeWorker>
</li>
</comps>
</ThingDef>
</Defs>
+59
View File
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!--
A crude shiv, whittled from whatever the cell was furnished with. Stuffable, so its stats come
from the harvested material for free: a wood shiv is feeble, a plasteel one is vicious. This is
the whole point of the harvest-by-damage mechanic: the prison's own construction materials
become the weapon materials, and a luxury block is a worse idea than it looks.
Registered as brewable contraband: a held pawn improvises it (AcquireWorker_Improvise), and the
generic use-during-a-break path equips it (no useWorker; an armed prisoner IS the payload,
and JobGiver_UseContraband only lets the disposed pick it up).
-->
<ThingDef ParentName="BaseMeleeWeapon_Sharp">
<defName>CB_Shiv</defName>
<label>shiv</label>
<description>A blade filed off a bed frame and wrapped in cloth for a grip. Barely a weapon -- but a barely-a-weapon in a cell you thought was empty is a dead guard.</description>
<techLevel>Neolithic</techLevel>
<graphicData>
<texPath>Things/Item/Contraband/Shiv</texPath> <!-- light greys: stuffable, so the material tint reads -->
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<stuffCategories>
<li>Metallic</li>
<li>Woody</li>
<li>Stony</li>
</stuffCategories>
<costStuffCount>15</costStuffCount>
<statBases>
<WorkToMake>1500</WorkToMake>
<Mass>0.4</Mass>
</statBases>
<weaponClasses>
<li>Melee</li>
</weaponClasses>
<comps>
<li Class="Contraband.CompProperties_Contraband">
<concealability>0.75</concealability>
<hideIn>OnBody, InCell</hideIn>
<acquireWorker>Contraband.AcquireWorker_Improvise</acquireWorker>
</li>
</comps>
<tools>
<li>
<label>point</label>
<capacities><li>Stab</li></capacities>
<power>7</power>
<cooldownTime>1.5</cooldownTime>
</li>
<li>
<label>handle</label>
<capacities><li>Blunt</li></capacities>
<power>5</power>
<cooldownTime>1.6</cooldownTime>
</li>
</tools>
</ThingDef>
</Defs>