Repackage the aggregate onto the Policing + Corrections split

package.sh builds and vendors InstitutionPolicing + InstitutionCorrections (Policing first) instead
of InstitutionJustice, and merges both modules' Defs. The settings shim's 'Justice' checkbox becomes
'Corrections'; deterrence and riots move under the Policing toggle.
This commit is contained in:
flan
2026-07-16 00:45:41 +00:00
parent d44b7887d9
commit 7ce9c045c3
10 changed files with 35 additions and 29 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8 -8
View File
@@ -35,17 +35,17 @@ namespace InstitutionSuite
ref settings.contraband, ref settings.contraband,
"Concealment and intake, improvised shivs, Prison-Architect tunnels, warden search, and warden corruption."); "Concealment and intake, improvised shivs, Prison-Architect tunnels, warden search, and warden corruption.");
l.Gap(); l.Gap();
l.CheckboxLabeled("Justice", l.CheckboxLabeled("Corrections",
ref settings.justice, ref settings.corrections,
"Classification, the deterrence feedback loop, discipline and reform, parole, and prisoner recreation (Regime)."); "Classification, discipline and reform, parole, and prisoner recreation (Regime).");
l.Gap(); l.Gap();
l.CheckboxLabeled("Gangs", l.CheckboxLabeled("Gangs",
ref settings.gangs, ref settings.gangs,
"Gangs as contraband economies: joining by disposition, smuggling networks, rivalry, and fights-as-crime. Leans on Contraband and Justice."); "Gangs as contraband economies: joining by disposition, smuggling networks, rivalry, and fights-as-crime. Leans on Contraband and Corrections.");
l.Gap(); l.Gap();
l.CheckboxLabeled("Policing (colony crime)", l.CheckboxLabeled("Policing (colony crime)",
ref settings.policing, ref settings.policing,
"The pre-arrest layer: your own colonists commit crimes on a spectrum (rarer in small, tight colonies), witnesses and a constable's work name the culprit, and a weighed arrest can end in a cell -- or a resisted breakout. A big behavioural change; turn it off to keep the rest of Justice without colony crime."); "The enforcement and order layer: your own colonists commit crimes on a spectrum (rarer in small, tight colonies), witnesses and a constable's work name the culprit, and a weighed arrest can end in a cell -- or a resisted breakout. Also owns the deterrence feedback loop and prison riots. A big behavioural change; turn it off to run the rest of the suite without colony crime.");
l.Gap(); l.Gap();
l.CheckboxLabeled("Ward (psychiatric care)", l.CheckboxLabeled("Ward (psychiatric care)",
ref settings.ward, ref settings.ward,
@@ -58,7 +58,7 @@ namespace InstitutionSuite
public class InstitutionModSettings : ModSettings public class InstitutionModSettings : ModSettings
{ {
public bool contraband = true; public bool contraband = true;
public bool justice = true; public bool corrections = true;
public bool gangs = true; public bool gangs = true;
public bool policing = true; public bool policing = true;
public bool ward = true; public bool ward = true;
@@ -67,7 +67,7 @@ namespace InstitutionSuite
public void Apply() public void Apply()
{ {
Contraband.InstitutionSettings.contraband = contraband; Contraband.InstitutionSettings.contraband = contraband;
Contraband.InstitutionSettings.justice = justice; Contraband.InstitutionSettings.corrections = corrections;
Contraband.InstitutionSettings.gangs = gangs; Contraband.InstitutionSettings.gangs = gangs;
Contraband.InstitutionSettings.policing = policing; Contraband.InstitutionSettings.policing = policing;
Contraband.InstitutionSettings.ward = ward; Contraband.InstitutionSettings.ward = ward;
@@ -76,7 +76,7 @@ namespace InstitutionSuite
public override void ExposeData() public override void ExposeData()
{ {
Scribe_Values.Look(ref contraband, "contraband", true); Scribe_Values.Look(ref contraband, "contraband", true);
Scribe_Values.Look(ref justice, "justice", true); Scribe_Values.Look(ref corrections, "corrections", true);
Scribe_Values.Look(ref gangs, "gangs", true); Scribe_Values.Look(ref gangs, "gangs", true);
Scribe_Values.Look(ref policing, "policing", true); Scribe_Values.Look(ref policing, "policing", true);
Scribe_Values.Look(ref ward, "ward", true); Scribe_Values.Look(ref ward, "ward", true);
+27 -21
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Assemble the shippable, drop-in "Institution" mod into this repo. # Assemble the shippable, drop-in "Institution" mod into this repo.
# #
# The Institution suite's code lives in SEPARATE sibling repos (rimworld-core, -contraband, -justice, # The Institution suite's code lives in SEPARATE sibling repos (rimworld-core, -contraband, -policing,
# -gangs, -ward) as independent projects/DLLs -- that is what keeps it modular and splittable. For DISTRIBUTION # -corrections, -gangs, -ward) as independent projects/DLLs -- that is what keeps it modular and splittable. For DISTRIBUTION
# they are vendored into ONE mod folder (this repo) with one About.xml and a settings shim that toggles # they are vendored into ONE mod folder (this repo) with one About.xml and a settings shim that toggles
# each layer. This script rebuilds the sibling DLLs clean (no self-test) and copies them + Contraband's # each layer. This script rebuilds the sibling DLLs clean (no self-test) and copies them + Contraband's
# Defs in here, so the repo is a complete installable mod. # Defs in here, so the repo is a complete installable mod.
@@ -17,43 +17,49 @@ HERE="$(cd "$(dirname "$0")/.." && pwd)"
SIB="$(dirname "$HERE")" SIB="$(dirname "$HERE")"
CORE="$SIB/rimworld-core" CORE="$SIB/rimworld-core"
CB="$SIB/rimworld-contraband" CB="$SIB/rimworld-contraband"
JUST="$SIB/rimworld-justice" POL="$SIB/rimworld-policing"
COR="$SIB/rimworld-corrections"
GANGS="$SIB/rimworld-gangs" GANGS="$SIB/rimworld-gangs"
WARD="$SIB/rimworld-ward" WARD="$SIB/rimworld-ward"
command -v dotnet >/dev/null || { echo "dotnet not on PATH" >&2; exit 1; } command -v dotnet >/dev/null || { echo "dotnet not on PATH" >&2; exit 1; }
echo "==> building the engine + feature DLLs (clean, no self-test)" echo "==> building the engine + feature DLLs (clean, no self-test)"
dotnet build "$CORE/Source/Core/Core.csproj" -c Release -v q --nologo dotnet build "$CORE/Source/Core/Core.csproj" -c Release -v q --nologo
dotnet build "$JUST/Source/Justice/Justice.csproj" -c Release -v q --nologo dotnet build "$POL/Source/Policing/Policing.csproj" -c Release -v q --nologo
dotnet build "$CB/Source/Contraband/Contraband.csproj" -c Release -v q --nologo dotnet build "$COR/Source/Corrections/Corrections.csproj" -c Release -v q --nologo
dotnet build "$GANGS/Source/Gangs/Gangs.csproj" -c Release -v q --nologo dotnet build "$CB/Source/Contraband/Contraband.csproj" -c Release -v q --nologo
dotnet build "$WARD/Source/Ward/Ward.csproj" -c Release -v q --nologo dotnet build "$GANGS/Source/Gangs/Gangs.csproj" -c Release -v q --nologo
dotnet build "$WARD/Source/Ward/Ward.csproj" -c Release -v q --nologo
echo "==> vendoring DLLs into Assemblies/" echo "==> vendoring DLLs into Assemblies/"
mkdir -p "$HERE/Assemblies" mkdir -p "$HERE/Assemblies"
rm -f "$HERE/Assemblies/"*.dll # clear old layout rm -f "$HERE/Assemblies/"*.dll # clear old layout
dotnet build "$HERE/Source/Institution/Institution.csproj" -c Release -v q --nologo # (re-)emit Institution.dll here dotnet build "$HERE/Source/Institution/Institution.csproj" -c Release -v q --nologo # (re-)emit Institution.dll here
cp "$CORE/Assemblies/InstitutionCore.dll" "$HERE/Assemblies/" cp "$CORE/Assemblies/InstitutionCore.dll" "$HERE/Assemblies/"
cp "$CB/Assemblies/Contraband.dll" "$HERE/Assemblies/" cp "$CB/Assemblies/Contraband.dll" "$HERE/Assemblies/"
cp "$JUST/Assemblies/InstitutionJustice.dll" "$HERE/Assemblies/" cp "$POL/Assemblies/InstitutionPolicing.dll" "$HERE/Assemblies/"
cp "$GANGS/Assemblies/InstitutionGangs.dll" "$HERE/Assemblies/" cp "$COR/Assemblies/InstitutionCorrections.dll" "$HERE/Assemblies/"
cp "$WARD/Assemblies/Ward.dll" "$HERE/Assemblies/" cp "$GANGS/Assemblies/InstitutionGangs.dll" "$HERE/Assemblies/"
cp "$WARD/Assemblies/Ward.dll" "$HERE/Assemblies/"
echo "==> vendoring the feature content" echo "==> vendoring the feature content"
for d in Defs Patches Languages Textures; do for d in Defs Patches Languages Textures; do
rm -rf "$HERE/$d" rm -rf "$HERE/$d"
[[ -e "$CB/$d" ]] && cp -r "$CB/$d" "$HERE/$d" [[ -e "$CB/$d" ]] && cp -r "$CB/$d" "$HERE/$d"
done done
# Justice ships defs of its own (crime thoughts, etc.); merge them into the same Defs/ tree. # Policing + Corrections ship defs of their own (crime thoughts; corrections hediffs/jobs/interaction
if [[ -e "$JUST/Defs" ]]; then # modes/thoughts/regime/marker); merge them into the same Defs/ tree.
mkdir -p "$HERE/Defs" for M in "$POL" "$COR"; do
cp -r "$JUST/Defs/." "$HERE/Defs/" if [[ -e "$M/Defs" ]]; then
fi mkdir -p "$HERE/Defs"
# Justice now also ships a texture (the security marker); vendor it so the aggregate isn't magenta. cp -r "$M/Defs/." "$HERE/Defs/"
if [[ -e "$JUST/Textures" ]]; then fi
done
# Corrections ships a texture (the security marker); vendor it so the aggregate isn't magenta.
if [[ -e "$COR/Textures" ]]; then
mkdir -p "$HERE/Textures" mkdir -p "$HERE/Textures"
cp -r "$JUST/Textures/." "$HERE/Textures/" cp -r "$COR/Textures/." "$HERE/Textures/"
fi fi
# Ward ships defs (interaction mode, hediffs, treatment station, room role), its own textures, AND a # Ward ships defs (interaction mode, hediffs, treatment station, room role), its own textures, AND a
# Patches/ dir -- the Rim Disorders integration that marks disorders treatable (conditional, so it # Patches/ dir -- the Rim Disorders integration that marks disorders treatable (conditional, so it