Files
institution/Defs/Misc_Ward.xml
T
flan 2d46fef192 Re-package the aggregate: bundle Ward + ship the policing layer
Fold Ward into the single Institution install as its psychiatric-care
layer. package.sh now builds Ward clean and vendors Ward.dll plus its
defs and textures alongside the other layers, and the settings shim
gains a Ward (psychiatric care) checkbox that writes the shared
InstitutionSettings.ward flag.

Re-assembling also carries in Justice's now-shipping policing defs (the
constable work type and crime thoughts), so the aggregate finally
bundles colony crime and the weighed arrest as well. README updated to
five layers over one Core with policing shipped and Ward folded in;
adds the changelog, the Workshop preview, and the preview generator.
2026-07-15 20:10:56 +00:00

166 lines
6.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Defs>
<!--
The warden's job. This is a NEW WorkGiver class, which is the reason Ward survives contact
with the prison-mod ecosystem:
- Custom Prisoner Interactions patches the named vanilla warden givers (_Chat, _Convert,
_Enslave, _ReleasePrisoner). It cannot see this one, so it cannot break it.
- Prison Commons patches WorkGiver_Warden.ShouldSkip on the BASE class. Ward inherits
from WorkGiver_Warden and does not override ShouldSkip, so Ward's warden work respects
prison-commons areas for free, without Ward knowing Prison Commons exists.
-->
<WorkGiverDef>
<defName>Ward_WardenPsychiatricCare</defName>
<label>provide psychiatric care</label>
<giverClass>Ward.WorkGiver_Warden_PsychiatricCare</giverClass>
<workType>Warden</workType>
<verb>treat</verb>
<gerund>treating</gerund>
<!-- Above chat (60) and below feeding: an untreated patient deteriorates, a bored one doesn't. -->
<priorityInType>70</priorityInType>
<requiredCapacities>
<li>Talking</li>
<li>Hearing</li>
</requiredCapacities>
</WorkGiverDef>
<!-- Distinct from the PrisonerInteractionModeDef's defName: [DefOf] binds fields to defNames
by name, so two defs sharing one name cannot both be reached from a DefOf class. -->
<JobDef>
<defName>Ward_ProvidePsychiatricCare</defName>
<driverClass>Ward.JobDriver_PsychiatricCare</driverClass>
<reportString>treating TargetA.</reportString>
<casualInterruptible>false</casualInterruptible>
</JobDef>
<!--
What treatment actually buys the patient: a lower chance of breaking. Severity decays, so
an untreated patient slides back. This is the entire feedback loop: treat them and they
stabilise, neglect them and they don't.
-->
<HediffDef>
<defName>Ward_UnderTreatment</defName>
<label>under psychiatric care</label>
<description>This person is receiving regular counselling. They are less likely to suffer a mental break.</description>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.6, 0.8, 0.9)</defaultLabelColor>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<isBad>false</isBad>
<comps>
<!-- Roughly a week from a full course back to nothing, with no wardens attending. -->
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>-0.15</severityPerDay>
</li>
</comps>
<stages>
<li>
<minSeverity>0</minSeverity>
<statOffsets>
<!-- Negative offset = breaks at a LOWER mood = breaks less often. -->
<MentalBreakThreshold>-0.10</MentalBreakThreshold>
</statOffsets>
</li>
</stages>
</HediffDef>
<ThoughtDef>
<defName>Ward_Counselled</defName>
<thoughtClass>Thought_Memory</thoughtClass>
<durationDays>2</durationDays>
<stackLimit>3</stackLimit>
<stages>
<li>
<label>counselled</label>
<description>Someone sat with me and listened. It helped, a little.</description>
<baseMoodEffect>6</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
<!--
The other half of the design. A ward you do not staff is not a neutral place to keep
someone. It is a worse one. Held under psychiatric care and left untreated, the patient
resents it, which pushes them back toward the break that got them committed.
-->
<ThoughtDef>
<defName>Ward_Neglected</defName>
<thoughtClass>Thought_Memory</thoughtClass>
<durationDays>3</durationDays>
<stackLimit>4</stackLimit>
<stages>
<li>
<label>left in the ward</label>
<description>They locked me in here for my own good and then forgot about me.</description>
<baseMoodEffect>-8</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
<!--
Recovery: the arc that turns commitment from a one-way park into a treatment with an ending.
It only advances once the patient has no treatable condition left (see the job) and, like
everything here, decays without sustained attention. When it reaches the "stabilised" stage the
discharge alert fires: the patient is well enough to let go.
-->
<HediffDef>
<defName>Ward_Recovery</defName>
<label>recovering</label>
<description>This person has worked through what they were committed for and is stabilising. Once fully recovered they can safely be discharged — held longer, they will start to resent it.</description>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.55, 0.85, 0.65)</defaultLabelColor>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<isBad>false</isBad>
<comps>
<!-- Recovery has to be sustained too: a couple of days of no attention and it slips back. -->
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>-0.10</severityPerDay>
</li>
</comps>
<stages>
<li>
<minSeverity>0</minSeverity>
<label>on the mend</label>
</li>
<li>
<minSeverity>0.999</minSeverity>
<label>stabilised</label>
</li>
</stages>
</HediffDef>
<!-- Applied as recovery progresses: the patient can feel it working. -->
<ThoughtDef>
<defName>Ward_Recovering</defName>
<thoughtClass>Thought_Memory</thoughtClass>
<durationDays>2</durationDays>
<stackLimit>3</stackLimit>
<stages>
<li>
<label>on the mend</label>
<description>Whatever was wrong with me, it's easing. I think I might be getting better.</description>
<baseMoodEffect>4</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
<!-- A breakthrough: the rare day the work pays off all at once. -->
<ThoughtDef>
<defName>Ward_Breakthrough</defName>
<thoughtClass>Thought_Memory</thoughtClass>
<durationDays>5</durationDays>
<stackLimit>1</stackLimit>
<stages>
<li>
<label>a breakthrough</label>
<description>Something finally shifted. For the first time in a long while, I feel like myself.</description>
<baseMoodEffect>10</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
</Defs>