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.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<JobDef>
|
||||
<defName>Institution_Investigate</defName>
|
||||
<driverClass>Contraband.JobDriver_Investigate</driverClass>
|
||||
<reportString>investigating a crime scene.</reportString>
|
||||
<casualInterruptible>true</casualInterruptible>
|
||||
</JobDef>
|
||||
|
||||
</Defs>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<!--
|
||||
The "locked cabinet of sedatives" in the treatment station's description, made real. Sedation is
|
||||
the other lever a ward has: not therapy, but a way to buy calm through a crisis. It costs a dose
|
||||
and a groggy, useless day from the patient — it settles a breakdown, it does not treat what
|
||||
causes them. A warden administers one to a patient at the edge of a break.
|
||||
-->
|
||||
<ThingDef ParentName="ResourceBase">
|
||||
<defName>Ward_Sedative</defName>
|
||||
<label>sedative</label>
|
||||
<description>A measured dose of fast-acting sedative. A warden can administer one to a patient on the edge of a breakdown to buy calm — at the cost of a groggy, near-useless day. It settles a crisis; it does not treat one.</description>
|
||||
<graphicData>
|
||||
<!-- Placeholder: reuse vanilla industrial medicine's art until Ward ships its own. -->
|
||||
<texPath>Things/Item/Resource/Medicine/MedicineIndustrial</texPath>
|
||||
<graphicClass>Graphic_StackCount</graphicClass>
|
||||
</graphicData>
|
||||
<stackLimit>25</stackLimit>
|
||||
<healthAffectsPrice>false</healthAffectsPrice>
|
||||
<statBases>
|
||||
<MarketValue>14</MarketValue>
|
||||
<Mass>0.05</Mass>
|
||||
<Flammability>0.7</Flammability>
|
||||
<DeteriorationRate>2</DeteriorationRate>
|
||||
</statBases>
|
||||
<thingCategories>
|
||||
<li>Medicine</li>
|
||||
</thingCategories>
|
||||
<tradeTags>
|
||||
<li>Medicine</li>
|
||||
</tradeTags>
|
||||
</ThingDef>
|
||||
|
||||
<RecipeDef>
|
||||
<defName>Ward_MakeSedative</defName>
|
||||
<label>make sedatives</label>
|
||||
<description>Synthesize a batch of sedatives from neutroamine.</description>
|
||||
<jobString>Making sedatives.</jobString>
|
||||
<workAmount>800</workAmount>
|
||||
<workSpeedStat>DrugSynthesisSpeed</workSpeedStat>
|
||||
<effectWorking>Cook</effectWorking>
|
||||
<soundWorking>Recipe_Drug</soundWorking>
|
||||
<workSkill>Intellectual</workSkill>
|
||||
<ingredients>
|
||||
<li>
|
||||
<filter>
|
||||
<thingDefs>
|
||||
<li>Neutroamine</li>
|
||||
</thingDefs>
|
||||
</filter>
|
||||
<count>1</count>
|
||||
</li>
|
||||
</ingredients>
|
||||
<fixedIngredientFilter>
|
||||
<thingDefs>
|
||||
<li>Neutroamine</li>
|
||||
</thingDefs>
|
||||
</fixedIngredientFilter>
|
||||
<products>
|
||||
<Ward_Sedative>4</Ward_Sedative>
|
||||
</products>
|
||||
<recipeUsers>
|
||||
<li>DrugLab</li>
|
||||
</recipeUsers>
|
||||
<researchPrerequisite>DrugProduction</researchPrerequisite>
|
||||
</RecipeDef>
|
||||
|
||||
<!--
|
||||
The sedated state: very calm (a large negative break-threshold offset = breaks far less), but
|
||||
groggy and barely productive, and gone in about a day. Deliberately a bad hediff — it is a crutch
|
||||
with a cost, not free stability.
|
||||
-->
|
||||
<HediffDef>
|
||||
<defName>Ward_Sedated</defName>
|
||||
<label>sedated</label>
|
||||
<description>Dosed with a sedative. Very unlikely to break — and too groggy to do much of anything.</description>
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defaultLabelColor>(0.6, 0.6, 0.9)</defaultLabelColor>
|
||||
<scenarioCanAdd>false</scenarioCanAdd>
|
||||
<isBad>true</isBad>
|
||||
<maxSeverity>1.0</maxSeverity>
|
||||
<comps>
|
||||
<!-- About one in-game day from a full dose to nothing. -->
|
||||
<li Class="HediffCompProperties_SeverityPerDay">
|
||||
<severityPerDay>-1.0</severityPerDay>
|
||||
</li>
|
||||
</comps>
|
||||
<stages>
|
||||
<li>
|
||||
<statOffsets>
|
||||
<!-- Negative = breaks at a much lower mood = breaks far less. -->
|
||||
<MentalBreakThreshold>-0.40</MentalBreakThreshold>
|
||||
</statOffsets>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.25</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Moving</capacity>
|
||||
<offset>-0.15</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
<!--
|
||||
A NEW warden work-giver, above treatment in priority: a crisis pre-empts a counselling session.
|
||||
Like the treatment giver it inherits WorkGiver_Warden.ShouldSkip, so it respects prison-commons
|
||||
areas for free.
|
||||
-->
|
||||
<WorkGiverDef>
|
||||
<defName>Ward_WardenAdministerSedative</defName>
|
||||
<label>administer sedative</label>
|
||||
<giverClass>Ward.WorkGiver_Warden_Sedate</giverClass>
|
||||
<workType>Warden</workType>
|
||||
<verb>sedate</verb>
|
||||
<gerund>sedating</gerund>
|
||||
<priorityInType>90</priorityInType>
|
||||
<requiredCapacities>
|
||||
<li>Manipulation</li>
|
||||
</requiredCapacities>
|
||||
</WorkGiverDef>
|
||||
|
||||
<JobDef>
|
||||
<defName>Ward_AdministerSedative</defName>
|
||||
<driverClass>Ward.JobDriver_AdministerSedative</driverClass>
|
||||
<reportString>administering a sedative to TargetA.</reportString>
|
||||
<casualInterruptible>false</casualInterruptible>
|
||||
</JobDef>
|
||||
|
||||
</Defs>
|
||||
@@ -0,0 +1,165 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<!--
|
||||
The whole mod hangs off this def.
|
||||
|
||||
RimWorld.GuestStatus is a compiled 3-value enum (Guest / Prisoner / Slave). A mod cannot
|
||||
add a fourth. That is exactly why Hospitality carries ~74 Harmony patches: it wants a pawn
|
||||
who is in your colony but is not your colonist, the enum has no slot for one, so it keeps a
|
||||
shadow guest system alive by patching bed validity, allowed areas and the work JobGiver.
|
||||
|
||||
Ward does not pay that tax. A committed pawn IS a prisoner in vanilla's own sense of the
|
||||
word. Arresting your own colonist already performs the colonist to prisoner transition.
|
||||
All Ward adds is a new *mode* to hold them under, and PrisonerInteractionModeDef is a Def,
|
||||
not an enum. Prison Labor already proves this works: it ships seven of them.
|
||||
|
||||
Non-exclusive, so it stacks rather than competing for the radio button. That is what lets
|
||||
Ward coexist with Prison Labor's work modes and with Custom Prisoner Interactions instead
|
||||
of fighting them for the same slot.
|
||||
-->
|
||||
<PrisonerInteractionModeDef>
|
||||
<defName>Ward_PsychiatricCare</defName>
|
||||
<label>psychiatric care</label>
|
||||
<listOrder>150</listOrder> <!-- between ReduceResistance (100) and Release (200) -->
|
||||
<isNonExclusiveInteraction>true</isNonExclusiveInteraction>
|
||||
<mustBeAwake>false</mustBeAwake>
|
||||
<allowOnWildMan>false</allowOnWildMan>
|
||||
<allowInClassicIdeoMode>true</allowInClassicIdeoMode>
|
||||
</PrisonerInteractionModeDef>
|
||||
|
||||
</Defs>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<!--
|
||||
RoomRoleDef.workerClass is a public field, so a new room role is XML plus one worker class
|
||||
and zero patches. Vanilla already ships PrisonCell, PrisonBarracks and Hospital on exactly
|
||||
this rail; the ward is the fourth sibling.
|
||||
|
||||
The score has to beat PrisonCell's, or a ward full of prisoner beds just reads as a cell.
|
||||
RoomRoleWorker_PsychWard only scores at all when a treatment station is present, so an
|
||||
ordinary prison cell is untouched and keeps its vanilla role.
|
||||
-->
|
||||
<RoomRoleDef>
|
||||
<defName>Ward_PsychWard</defName>
|
||||
<label>psychiatric ward</label>
|
||||
<workerClass>Ward.RoomRoleWorker_PsychWard</workerClass>
|
||||
<relatedStats>
|
||||
<li>Impressiveness</li>
|
||||
<li>Cleanliness</li>
|
||||
<li>Space</li>
|
||||
</relatedStats>
|
||||
</RoomRoleDef>
|
||||
|
||||
</Defs>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<!--
|
||||
The thing that turns a room full of prisoner beds into a ward rather than a cell block.
|
||||
It is deliberately cheap: the cost of a ward is not the furniture, it is the warden hours
|
||||
and the labour you give up by not putting the patient to work.
|
||||
-->
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>Ward_TreatmentStation</defName>
|
||||
<label>treatment station</label>
|
||||
<description>A desk, a chair bolted to the floor, and a locked cabinet of sedatives. A warden set to psychiatric care will use it to counsel patients held in this room.\n\nA room containing one is treated as a psychiatric ward rather than a prison cell. Whether that is a mercy depends entirely on how you run it.</description>
|
||||
<thingClass>Building</thingClass>
|
||||
<graphicData>
|
||||
<texPath>Things/Building/Ward/TreatmentStation</texPath>
|
||||
<!-- Single, not Multi: one texture, no _north/_east/_south/_west set to keep in sync. -->
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>(2,1)</drawSize>
|
||||
<damageData>
|
||||
<rect>(0,0.05,2,0.9)</rect>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<castEdgeShadows>true</castEdgeShadows>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<pathCost>60</pathCost>
|
||||
<blockWind>false</blockWind>
|
||||
<fillPercent>0.4</fillPercent>
|
||||
<statBases>
|
||||
<MaxHitPoints>120</MaxHitPoints>
|
||||
<WorkToBuild>1600</WorkToBuild>
|
||||
<Flammability>1.0</Flammability>
|
||||
<Beauty>0</Beauty>
|
||||
</statBases>
|
||||
<size>(2,1)</size>
|
||||
<costList>
|
||||
<Steel>40</Steel>
|
||||
<MedicineIndustrial>2</MedicineIndustrial>
|
||||
</costList>
|
||||
<researchPrerequisites>
|
||||
<li>MedicineProduction</li>
|
||||
</researchPrerequisites>
|
||||
<designationCategory>Misc</designationCategory>
|
||||
<rotatable>true</rotatable>
|
||||
<selectable>true</selectable>
|
||||
<terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
|
||||
<building>
|
||||
<ai_chillDestination>false</ai_chillDestination>
|
||||
</building>
|
||||
</ThingDef>
|
||||
|
||||
</Defs>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<WorkGiverDef>
|
||||
<defName>Institution_Investigate</defName>
|
||||
<label>investigate crimes</label>
|
||||
<giverClass>Contraband.WorkGiver_Investigate</giverClass>
|
||||
<workType>Institution_Investigating</workType>
|
||||
<verb>investigate</verb>
|
||||
<gerund>investigating</gerund>
|
||||
<priorityInType>100</priorityInType>
|
||||
<requiredCapacities>
|
||||
<li>Manipulation</li>
|
||||
<li>Sight</li>
|
||||
</requiredCapacities>
|
||||
</WorkGiverDef>
|
||||
|
||||
</Defs>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<WorkTypeDef>
|
||||
<defName>Institution_Investigating</defName>
|
||||
<labelShort>police</labelShort>
|
||||
<pawnLabel>Constable</pawnLabel>
|
||||
<gerundLabel>investigating</gerundLabel>
|
||||
<description>Working open crime scenes to gather evidence and identify the culprit.</description>
|
||||
<verb>investigate</verb>
|
||||
<naturalPriority>455</naturalPriority>
|
||||
<relevantSkills>
|
||||
<li>Intellectual</li>
|
||||
<li>Social</li>
|
||||
</relevantSkills>
|
||||
<workTags>
|
||||
<li>Intellectual</li>
|
||||
<li>Social</li>
|
||||
</workTags>
|
||||
</WorkTypeDef>
|
||||
|
||||
</Defs>
|
||||
Reference in New Issue
Block a user