Skip to content

Commit

Permalink
1.4 update (#253)
Browse files Browse the repository at this point in the history
1.4 update
  • Loading branch information
Hazzer authored Oct 12, 2022
1 parent ca709a2 commit f5f61aa
Show file tree
Hide file tree
Showing 104 changed files with 3,038 additions and 941 deletions.
File renamed without changes.
File renamed without changes.
Binary file added 1.4/Assemblies/0MultiplayerAPI.dll
Binary file not shown.
Binary file added 1.4/Assemblies/PrisonLabor.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
48 changes: 48 additions & 0 deletions 1.4/Defs/ConceptDef.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<ConceptDef>
<defName>PrisonLabor_Indroduction</defName>
<label>Prison labor</label>
<priority>45</priority>
<needsOpportunity>True</needsOpportunity>
<highlightTags>
<li>ITab-Prisoner-Closed</li>
</highlightTags>
<helpText>You can force your prisoners to do labor.\n\nTo do so you must select "Force to work" option from "Prisoner" pane\n\nPrisoners will work on orders and bills that are in allowed area. Make sure prisoners can reach their work.\n\nThey can only cook, mine, cut plants, haul, clean, or grow plants, that do not require special skills.\n\nPrisoner sometimes refuses to work. Reasons can be different. He can be injured, hungry, tired, or not motivated enough.\n\nHINT: You can assign work types in "Work" pane.\n\nHINT: If you put a stove in a prison cell make sure they can reach raw food.\n\nHINT: You can let prioners moving through doors by leaving them open.</helpText>
</ConceptDef>
<ConceptDef>
<defName>PrisonLabor_Motivation</defName>
<label>Motivating prisoners</label>
<priority>100</priority>
<needsOpportunity>True</needsOpportunity>
<helpText>One of yours prisoners stopped working.\nHe won't work any longer, unless he gets motivated.\n\nYou can check status of motivation in "Needs" tab.\n\nMake sure you have enough wardens (check "Work" tab), or draft one of your colonist and order him to stand around your prisoners.\n\nLow motivation of prisoners can lead to revolts.</helpText>
</ConceptDef>
<ConceptDef>
<defName>PrisonLabor_Growing</defName>
<label>Growing by prisoners</label>
<priority>100</priority>
<needsOpportunity>True</needsOpportunity>
<helpText>Prisoners can only grow plants that don't require any special skills like potato or cotton. They can however gather any plant that is ordered to harvest.</helpText>
</ConceptDef>
<ConceptDef>
<defName>PrisonLabor_Management</defName>
<label>Prison labor management</label>
<priority>100</priority>
<needsOpportunity>True</needsOpportunity>
<helpText>You can manage your prison labor in several ways.\n\nYou can assign work types to prisoners by accessing "Work" tab.\n\nYou can restrict when prisoners should work, rest, or sleep by accessing "Restrict" tab.\n\nYou can restrict work to "Prisoners only". For work orders that covers area you can choose "Labor area" tool from "Architect"->"Orders" panel.\nFor bills there is an option "Prisoners only".</helpText>
</ConceptDef>
<ConceptDef>
<defName>PrisonLabor_Timetable</defName>
<label>Prisoners time restrictions</label>
<priority>100</priority>
<needsOpportunity>True</needsOpportunity>
<helpText>You can make time restrictions for prisoners.\n\n"Work" time will force them to work even when they're hungry or tired.\n\n"Joy" time will let them rest from job and get motivation bonus.\n\n"Sleep" time will force them to stay in prison cell.\n\n"Anything" is default setting.</helpText>
</ConceptDef>
<ConceptDef>
<defName>PrisonLabor_Treatment</defName>
<label>Treatment system</label>
<priority>50</priority>
<needsOpportunity>True</needsOpportunity>
<helpText>In prison labor you need to take care for prisoners. Good treatment can prevent revolts, and can provoke recruit proposition (without recruting process!).\n\nTo maintain good treatment status you need to feed prisoners regularly and set some free time so they can regenerate their strength\n\nTreatment will go lower if you beat prisoners, starve them, or exploit in terms of labor.\nGood treatment will result in:\n - Random offers with request to join colony\n - Preventing revolts\n - Preventing suicide</helpText>
</ConceptDef>
</Defs>
88 changes: 88 additions & 0 deletions 1.4/Defs/Hediffs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<HediffDef>
<defName>PrisonLabor_PrisonerChains</defName>
<description>This pawn has prisoners chains. Note: it is default Vanilla mechanics, but in hediff state</description>
<label>prisoners chains</label>
<stages>
<li>
<label>not active</label>
<becomeVisible>false</becomeVisible>
</li>
<li>
<label>unchained totaly unchained</label>
<becomeVisible>false</becomeVisible>
<minSeverity>0.01</minSeverity>
</li>
<li>
<label>unchained legs</label>
<becomeVisible>false</becomeVisible>
<minSeverity>0.60</minSeverity>
<capMods>
<li>
<capacity>Manipulation</capacity>
<offset>-0.3</offset>
</li>
</capMods>
</li>
<li>
<label>unchained hands</label>
<becomeVisible>false</becomeVisible>
<minSeverity>0.80</minSeverity>
<capMods>
<li>
<capacity>Moving</capacity>
<postFactor>0.5</postFactor>
</li>
</capMods>
</li>
<li>
<label>active</label>
<becomeVisible>false</becomeVisible>
<minSeverity>0.90</minSeverity>
<capMods>
<li>
<capacity>Manipulation</capacity>
<offset>-0.3</offset>
</li>
<li>
<capacity>Moving</capacity>
<postFactor>0.5</postFactor>
</li>
</capMods>
</li>
</stages>
</HediffDef>
<HediffDef>
<defName>PrisonLabor_RemovedHandscuffs</defName>
<description>Prisoner has removed handscuffs</description>
<label>Removed Handscuff</label>
<stages>
<li>
<label>not active</label>
<becomeVisible>false</becomeVisible>
</li>
<li>
<label>active</label>
<becomeVisible>true</becomeVisible>
<minSeverity>0.01</minSeverity>
</li>
</stages>
</HediffDef>
<HediffDef>
<defName>PrisonLabor_RemovedLegscuffs</defName>
<description>Prisoner has removed legscuffs</description>
<label>Removed legscuffs</label>
<stages>
<li>
<label>not active</label>
<becomeVisible>false</becomeVisible>
</li>
<li>
<label>active</label>
<becomeVisible>true</becomeVisible>
<minSeverity>0.01</minSeverity>
</li>
</stages>
</HediffDef>
</Defs>
49 changes: 49 additions & 0 deletions 1.4/Defs/Incidents.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<Defs>
<IncidentDef>
<defName>PrisonLabor_Revolt</defName>
<label>revolt</label>
<targetTags>
<li>Map_PlayerHome</li>
</targetTags>
<workerClass>PrisonLabor.Core.Incidents.IncidentWorker_Revolt</workerClass>
<letterLabel>Revolt</letterLabel>
<letterText>Revolt has been started by {0}. The prisoners united under faction {1}, and began uprising with self-made weapons</letterText>
<letterDef>ThreatBig</letterDef>
<baseChance>5.4</baseChance>
<minRefireDays>20</minRefireDays>
<category>ThreatBig</category>
<pointsScaleable>true</pointsScaleable>
<minThreatPoints>200</minThreatPoints>
</IncidentDef>

<IncidentDef>
<defName>PrisonLabor_ResocializationOffer</defName>
<label>resocialization offer</label>
<category>Misc</category>
<targetTags>
<li>Map_PlayerHome</li>
</targetTags>
<workerClass>PrisonLabor.Core.Incidents.IncidentWorker_ResocializationOffer</workerClass>
<letterLabel>Resocialization offer</letterLabel>
<letterText>Offer by {0}.</letterText>
<letterDef>PositiveEvent</letterDef>
<baseChance>10</baseChance>
<populationEffect>IncreaseEasy</populationEffect>
</IncidentDef>

<IncidentDef>
<defName>PrisonLabor_Suicide</defName>
<label>prisoner suicide</label>
<category>Misc</category>
<targetTags>
<li>Map_PlayerHome</li>
</targetTags>
<workerClass>PrisonLabor.Core.Incidents.IncidentWorker_Suicide</workerClass>
<letterLabel>Prisoner suicide</letterLabel>
<letterText>{0} has commited suicide, because of bad treatment.</letterText>
<letterDef>NegativeEvent</letterDef>
<baseChance>2</baseChance>
<minThreatPoints>500</minThreatPoints>
<pointsScaleable>false</pointsScaleable>
</IncidentDef>
</Defs>
29 changes: 29 additions & 0 deletions 1.4/Defs/JobDef.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<JobDef>
<defName>PrisonLabor_PrisonerSupervise</defName>
<driverClass>PrisonLabor.Core.AI.JobDrivers.JobDriver_Supervise</driverClass>
<reportString>watching prisoner TargetA.</reportString>
<alwaysShowWeapon>true</alwaysShowWeapon>
</JobDef>
<JobDef>
<defName>PrisonLabor_Arrest</defName>
<driverClass>JobDriver_TakeToBed</driverClass>
<reportString>arresting TargetA.</reportString>
<alwaysShowWeapon>true</alwaysShowWeapon>
<makeTargetPrisoner>true</makeTargetPrisoner>
<casualInterruptible>false</casualInterruptible>
</JobDef>
<JobDef>
<defName>PrisonLabor_HandlePrisonersLegChain</defName>
<driverClass>PrisonLabor.Core.AI.JobDrivers.JobDriver_UnchainLegs</driverClass>
<reportString>handling legcuffs of prisoner TargetA.</reportString>
<alwaysShowWeapon>true</alwaysShowWeapon>
</JobDef>
<JobDef>
<defName>PrisonLabor_HandlePrisonersHandChain</defName>
<driverClass>PrisonLabor.Core.AI.JobDrivers.JobDriver_UnchainHands</driverClass>
<reportString>handling handcuffs of prisoner TargetA.</reportString>
<alwaysShowWeapon>true</alwaysShowWeapon>
</JobDef>
</Defs>
147 changes: 147 additions & 0 deletions 1.4/Defs/MainButton.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<MainButtonDef>
<defName>PL_Prisoners_Menu</defName>
<label>Prisoners</label>
<description>Manage your faction prisoners</description>
<tabWindowClass>PrisonLabor.Core.MainButton_Window.PrisonerButtonWindow</tabWindowClass>
<iconPath>PL_TabIcon</iconPath>
<order>35</order>
<closesWorldView>true</closesWorldView>
</MainButtonDef>

<!-- Tabs for main windows-->
<PrisonLabor.Core.MainButton_Window.PrisonersTabDef>
<defName>PL_Overview</defName>
<label>overview</label>
<workerClass>PrisonLabor.Core.MainButton_Window.MainTabWindow_Overview</workerClass>
<order>10</order>
</PrisonLabor.Core.MainButton_Window.PrisonersTabDef>

<PrisonLabor.Core.MainButton_Window.PrisonersTabDef>
<defName>PL_LaborWindow</defName>
<label>work</label>
<workerClass>PrisonLabor.Core.MainButton_Window.MainTabWindow_Labor</workerClass>
<order>20</order>
</PrisonLabor.Core.MainButton_Window.PrisonersTabDef>

<PrisonLabor.Core.MainButton_Window.PrisonersTabDef>
<defName>PL_ScheduleWindow</defName>
<label>Schedule</label>
<workerClass>PrisonLabor.Core.MainButton_Window.MainTabWindow_Schedule</workerClass>
<order>30</order>
</PrisonLabor.Core.MainButton_Window.PrisonersTabDef>

<PrisonLabor.Core.MainButton_Window.PrisonersTabDef>
<defName>PL_AssignWindow</defName>
<label>Assign</label>
<workerClass>PrisonLabor.Core.MainButton_Window.MainTabWindow_Assign</workerClass>
<order>40</order>
</PrisonLabor.Core.MainButton_Window.PrisonersTabDef>

<PrisonLabor.Core.MainButton_Window.PrisonersTabDef>
<defName>PL_DevWindow</defName>
<label>Dev</label>
<workerClass>PrisonLabor.Core.MainButton_Window.MainTabWindow_Dev</workerClass>
<dev>true</dev>
<order>100</order>
</PrisonLabor.Core.MainButton_Window.PrisonersTabDef>


<PawnTableDef>
<defName>PL_Assign</defName>
<workerClass>PawnTable_PlayerPawns</workerClass>
<columns>
<li>Label</li>
<li>MedicalCare</li>
<li>GapTiny</li>
<li>FoodRestriction</li>
<li>GapTiny</li>
<li>DrugPolicy</li>
<li>RemainingSpace</li>
</columns>
</PawnTableDef>

<PawnTableDef>
<defName>PL_Overview</defName>
<workerClass>PawnTable_PlayerPawns</workerClass>
<columns>
<li>Label</li>
<li>GapTiny</li>
<li>PL_InteractionColumn</li>
<li>GapTiny</li>
<li>PL_MotivationColumn</li>
<li>GapTiny</li>
<li>PL_HasLegcuffs</li>
<li>GapTiny</li>
<li>PL_HasHandcuffs</li>
<li>GapTiny</li>
<li>PL_Resocialization</li>
<li>RemainingSpace</li>
</columns>
</PawnTableDef>

<PawnTableDef>
<defName>PL_DevTable</defName>
<workerClass>PawnTable_PlayerPawns</workerClass>
<columns>
<li>Label</li>
<li>GapTiny</li>
<li>PL_EscapeColumn</li>
<li>GapTiny</li>
<li>PL_TreatmentColumn</li>
<li>RemainingSpace</li>
</columns>
</PawnTableDef>


<PawnColumnDef>
<defName>PL_InteractionColumn</defName>
<label>Interaction</label>
<headerTip>Interaction mode</headerTip>
<workerClass>PrisonLabor.Core.MainButton_Window.ColumnWorker_Interaction</workerClass>
<sortable>true</sortable>
</PawnColumnDef>

<PawnColumnDef>
<defName>PL_Resocialization</defName>
<label>Resocialization</label>
<headerTip>Prisoner wants to join to your colony</headerTip>
<workerClass>PrisonLabor.Core.MainButton_Window.ColumnWorker_Resocialization</workerClass>
</PawnColumnDef>

<PawnColumnDef>
<defName>PL_HasLegcuffs</defName>
<label>Has Legcuffs</label>
<workerClass>PrisonLabor.Core.MainButton_Window.ColumnWorker_HasLegcuffs</workerClass>
<sortable>true</sortable>
</PawnColumnDef>

<PawnColumnDef>
<defName>PL_HasHandcuffs</defName>
<label>Has Handcuffs</label>
<workerClass>PrisonLabor.Core.MainButton_Window.ColumnWorker_HasHandscuffs</workerClass>
<sortable>true</sortable>
</PawnColumnDef>

<PawnColumnDef>
<defName>PL_EscapeColumn</defName>
<label>Ready to escape</label>
<workerClass>PrisonLabor.Core.MainButton_Window.ColumnWorker_EscapeTracker</workerClass>
</PawnColumnDef>

<PawnColumnDef>
<defName>PL_MotivationColumn</defName>
<label>Motivation</label>
<workerClass>PrisonLabor.Core.MainButton_Window.ColumnWorker_Motivation</workerClass>
<sortable>true</sortable>
</PawnColumnDef>

<PawnColumnDef>
<defName>PL_TreatmentColumn</defName>
<label>Treatment</label>
<workerClass>PrisonLabor.Core.MainButton_Window.ColumnWorker_Treatment</workerClass>
<sortable>true</sortable>
</PawnColumnDef>

</Defs>
22 changes: 22 additions & 0 deletions 1.4/Defs/Needs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<NeedDef>
<defName>PrisonLabor_Motivation</defName>
<needClass>PrisonLabor.Core.Needs.Need_Motivation</needClass>
<label>Motivation</label>
<description>Motivation represents how motivated to work is prisoner. Motivation can be improved by colonists standing nearby.</description>
<listPriority>90</listPriority>
<major>false</major>
<showForCaravanMembers>false</showForCaravanMembers>
</NeedDef>
<NeedDef>
<defName>PrisonLabor_Treatment</defName>
<needClass>PrisonLabor.Core.Needs.Need_Treatment</needClass>
<label>Treatment happiness</label>
<description>Treatment happiness represents how prisoners are content of treatment in colony.</description>
<listPriority>89</listPriority>
<major>false</major>
<showForCaravanMembers>false</showForCaravanMembers>
<showOnNeedList>false</showOnNeedList>
</NeedDef>
</Defs>
Loading

0 comments on commit f5f61aa

Please sign in to comment.