Skip to content

Commit

Permalink
Prisoners should now be able to do cleaning. Fixed wrong namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
emipa606 committed Sep 29, 2024
1 parent 1f5e9eb commit a38e9ba
Show file tree
Hide file tree
Showing 25 changed files with 49 additions and 44 deletions.
4 changes: 2 additions & 2 deletions 1.0/Patches/WorkGiverPatch.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>Defs/WorkGiverDef[defName="CleanFilth"]/giverClass</xpath>
<value>
<giverClass>CleaningPriority.WorkGiver_CleanFilthPrioritized</giverClass>
</value>
</Operation>
</Patch>
</Patch>
4 changes: 2 additions & 2 deletions 1.1/Patches/WorkGiverPatch.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>Defs/WorkGiverDef[defName="CleanFilth"]/giverClass</xpath>
<value>
<giverClass>CleaningPriority.WorkGiver_CleanFilthPrioritized</giverClass>
</value>
</Operation>
</Patch>
</Patch>
4 changes: 2 additions & 2 deletions 1.2/Patches/WorkGiverPatch.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>Defs/WorkGiverDef[defName="CleanFilth"]/giverClass</xpath>
<value>
<giverClass>CleaningPriority.WorkGiver_CleanFilthPrioritized</giverClass>
</value>
</Operation>
</Patch>
</Patch>
4 changes: 2 additions & 2 deletions 1.3/Patches/WorkGiverPatch.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>Defs/WorkGiverDef[defName="CleanFilth"]/giverClass</xpath>
<value>
<giverClass>CleaningPriority.WorkGiver_CleanFilthPrioritized</giverClass>
</value>
</Operation>
</Patch>
</Patch>
4 changes: 2 additions & 2 deletions 1.4/Patches/WorkGiverPatch.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>Defs/WorkGiverDef[defName="CleanFilth"]/giverClass</xpath>
<value>
<giverClass>CleaningPriority.WorkGiver_CleanFilthPrioritized</giverClass>
</value>
</Operation>
</Patch>
</Patch>
Binary file modified 1.5/Assemblies/CleaningPriority.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions 1.5/Patches/WorkGiverPatch.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>Defs/WorkGiverDef[defName="CleanFilth"]/giverClass</xpath>
<value>
<giverClass>CleaningPriority.WorkGiver_CleanFilthPrioritized</giverClass>
</value>
</Operation>
</Patch>
</Patch>
3 changes: 2 additions & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ https://steamcommunity.com/sharedfiles/filedetails/?id=1543157124
- Added Russian Translation, by Vladimir Saenko
- Added correct reservation of filth so pawns dont clean the same filth
- Pawns that is not allowed in a higher priority cleaning zone should now clean filth in lower priority zones instead of not cleaning at all
- There's a soft incompatibility with Dubs Bad Hygiene: pawns clean outside of the designated zone. Turning off "prefer indoor cleaning" in DBH options solves the problem.

[img]https://i.imgur.com/pufA0kM.png[/img]

Expand Down Expand Up @@ -88,5 +89,5 @@ As this is the first version, expect bugs. However, don't be too scared, they pr
[/list]

[url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2018316486][img]https://img.shields.io/github/v/release/emipa606/CleaningPriority?label=latest%20version&amp;style=plastic&amp;color=9f1111&amp;labelColor=black[/img][/url]</description>
<modVersion IgnoreIfNoMatchingField="True">1.5.1</modVersion>
<modVersion IgnoreIfNoMatchingField="True">1.5.2</modVersion>
</ModMetaData>
3 changes: 3 additions & 0 deletions About/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for CleaningPriority

1.5.2 - Prisoners should now be able to do cleaning. Fixed wrong namespace.


1.5.1 - Updated Chinese translation by Buyue-z


Expand Down
3 changes: 2 additions & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>CleaningPriority</identifier>
<version>1.5.1</version>
<version>1.5.2</version>
<dependencies />
<incompatibleWith />
<loadBefore />
<loadAfter />
<manifestUri>https://raw.githubusercontent.com/emipa606/CleaningPriority/master/About/Manifest.xml</manifestUri>
<downloadUri>https://github.com/emipa606/CleaningPriority/releases</downloadUri>
</Manifest>

3 changes: 2 additions & 1 deletion About/ModSync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModSyncNinjaData>
<ID>f4f05f6a-8ae3-4d42-b2f5-734cae07b45f</ID>
<ModName>Cleaning Priority (Continued)</ModName>
<Version>1.5.1</Version>
<Version>1.5.2</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Github">
<Owner>emipa606</Owner>
Expand All @@ -12,3 +12,4 @@
<Branch>master</Branch>
</Host>
</ModSyncNinjaData>

4 changes: 2 additions & 2 deletions Defs/Jobs_Work.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<JobDef>
<defName>Clean_Prioritized</defName>
<driverClass>CleaningPriority.JobDriver_CleanPrioritizedFilth</driverClass>
<reportString>cleaning TargetA in area.</reportString>
<allowOpportunisticPrefix>true</allowOpportunisticPrefix>
</JobDef>
</Defs>
</Defs>
4 changes: 2 additions & 2 deletions Languages/ChineseSimplified/DefInjected/JobDef/Jobs_Work.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<Clean_Prioritized.reportString>正在清理区域中的TargetA。</Clean_Prioritized.reportString>
</LanguageData>
</LanguageData>
4 changes: 2 additions & 2 deletions Languages/ChineseSimplified/Keyed/CleaningPriority.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<OpenCleaningPriorityDialog>打开清洁优先级窗口。\n\n在这里,你可以设置殖民者优先清洁的区域、最后清洁的区域或介于两者之间的区域。</OpenCleaningPriorityDialog>
<AddAreaAsCleaningArea>如果你对哪些区域被优先清洁感到困惑,请将鼠标悬停在列表中的区域上并阅读提示。</AddAreaAsCleaningArea>
Expand All @@ -9,4 +9,4 @@
<CleaningAreaFirst>该区域将优先被清洁。</CleaningAreaFirst>
<CleaningAreaLast>该区域将最后被清洁。</CleaningAreaLast>
<CleaningAreaMiddle>该区域将在{0}之后,{1}之前被清洁。</CleaningAreaMiddle>
</LanguageData>
</LanguageData>
4 changes: 2 additions & 2 deletions Languages/English/Keyed/CleaningPriority.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<OpenCleaningPriorityDialog>Open cleaning priorities window.\n\nHere you can set which areas colonists will clean first, last or anything in between.</OpenCleaningPriorityDialog>
<AddAreaAsCleaningArea>Click to add an area to prioritize for cleaning.\n\nIf you are confused about which areas are prioritized, hover over each area in the list and read the tooltips.</AddAreaAsCleaningArea>
Expand All @@ -9,4 +9,4 @@
<CleaningAreaFirst>Filth in this area will be cleaned first.</CleaningAreaFirst>
<CleaningAreaLast>Filth in this area will the cleaned last.</CleaningAreaLast>
<CleaningAreaMiddle>Filth in this area will be cleaned after filth in {0} and before filth in {1}</CleaningAreaMiddle>
</LanguageData>
</LanguageData>
4 changes: 2 additions & 2 deletions Languages/French/Keyed/CleaningPriority.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<!--The following translations were generated by https://www.deepl.com/-->
<OpenCleaningPriorityDialog>Ouvrir la fenêtre des priorités de nettoyage.\NVous pouvez ici définir les zones que les colons nettoieront en premier, en dernier ou entre les deux.</OpenCleaningPriorityDialog>
Expand All @@ -10,4 +10,4 @@
<CleaningAreaFirst>La saleté dans cette zone sera nettoyée en premier.</CleaningAreaFirst>
<CleaningAreaLast>La saleté dans cette zone sera nettoyée en dernier.</CleaningAreaLast>
<CleaningAreaMiddle>Les déchets de cette zone seront nettoyés après ceux de {0} et avant ceux de {1}</CleaningAreaMiddle>
</LanguageData>
</LanguageData>
4 changes: 2 additions & 2 deletions Languages/German/Keyed/CleaningPriority.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<!--The following translations were generated by https://www.deepl.com/-->
<OpenCleaningPriorityDialog>Öffnen Sie das Fenster mit den Reinigungsprioritäten.\n\n Hier können Sie festlegen, welche Bereiche die Kolonisten zuerst, zuletzt oder dazwischen reinigen sollen.</OpenCleaningPriorityDialog>
Expand All @@ -10,4 +10,4 @@
<CleaningAreaFirst>Der Dreck in diesem Bereich wird zuerst gereinigt.</CleaningAreaFirst>
<CleaningAreaLast>Die Verschmutzung in diesem Bereich wird zuletzt gereinigt.</CleaningAreaLast>
<CleaningAreaMiddle>Verschmutzungen in diesem Bereich werden nach Verschmutzungen in {0} und vor Verschmutzungen in {1} gereinigt.</CleaningAreaMiddle>
</LanguageData>
</LanguageData>
4 changes: 2 additions & 2 deletions Languages/Russian/DefInjected/JobDef/Jobs_Work.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<Clean_Prioritized.reportString>убирает TargetA в области.</Clean_Prioritized.reportString>
</LanguageData>
</LanguageData>
4 changes: 2 additions & 2 deletions Languages/Russian/Keyed/CleaningPriority.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<OpenCleaningPriorityDialog>Откройте окно приоритетов очистки. \n\nЗдесь вы можете указать, какие области колонисты будут чистить первыми, последними или между ними.</OpenCleaningPriorityDialog>
<AddAreaAsCleaningArea>Нажмите, чтобы добавить область для определения приоритетов для очистки.\n\nЕсли вы не уверены, какие области имеют приоритет, наведите курсор на каждую область в списке и прочитайте подсказки.</AddAreaAsCleaningArea>
Expand All @@ -9,4 +9,4 @@
<CleaningAreaFirst>Грязь в этой области будет очищена в первую очередь.</CleaningAreaFirst>
<CleaningAreaLast>Грязь в этой области будет убрана последней.</CleaningAreaLast>
<CleaningAreaMiddle>Грязь в этой области будет очищена после грязи в {0} и перед грязью в {1}</CleaningAreaMiddle>
</LanguageData>
</LanguageData>
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CleaningPriority
# [Cleaning Priority (Continued)](https://steamcommunity.com/sharedfiles/filedetails/?id=2018316486)
![Image](https://i.imgur.com/buuPQel.png)

Expand All @@ -8,13 +8,12 @@ https://steamcommunity.com/sharedfiles/filedetails/?id=1543157124
- Added Russian Translation, by Vladimir Saenko
- Added correct reservation of filth so pawns dont clean the same filth
- Pawns that is not allowed in a higher priority cleaning zone should now clean filth in lower priority zones instead of not cleaning at all
- There's a soft incompatibility with Dubs Bad Hygiene: pawns clean outside of the designated zone. Turning off "prefer indoor cleaning" in DBH options solves the problem.

![Image](https://i.imgur.com/pufA0kM.png)


![Image](https://i.imgur.com/Z4GOv8H.png)


**Legacy 1.0 Version**
For now, please use the updated version by Mlie here:
https://steamcommunity.com/sharedfiles/filedetails/?id=2018316486
Expand Down Expand Up @@ -53,13 +52,12 @@ As this is the first version, expect bugs. However, don't be too scared, they pr

- See if the the error persists if you just have this mod and its requirements active.
- If not, try adding your other mods until it happens again.
- Post your error-log using https://steamcommunity.com/workshop/filedetails/?id=818773962]HugsLib or the standalone https://steamcommunity.com/sharedfiles/filedetails/?id=2873415404]Uploader and command Ctrl+F12
- Post your error-log using [HugsLib](https://steamcommunity.com/workshop/filedetails/?id=818773962) or the standalone [Uploader](https://steamcommunity.com/sharedfiles/filedetails/?id=2873415404) and command Ctrl+F12
- For best support, please use the Discord-channel for error-reporting.
- Do not report errors by making a discussion-thread, I get no notification of that.
- If you have the solution for a problem, please post it to the GitHub repository.
- Use https://github.com/RimSort/RimSort/releases/latest]RimSort to sort your mods
- Use [RimSort](https://github.com/RimSort/RimSort/releases/latest) to sort your mods



https://steamcommunity.com/sharedfiles/filedetails/changelog/2018316486]![Image](https://img.shields.io/github/v/release/emipa606/CleaningPriority?label=latest%20version&style=plastic&color=9f1111&labelColor=black)

[![Image](https://img.shields.io/github/v/release/emipa606/CleaningPriority?label=latest%20version&style=plastic&color=9f1111&labelColor=black)](https://steamcommunity.com/sharedfiles/filedetails/changelog/2018316486)
Expand Down
2 changes: 1 addition & 1 deletion Source/CleaningPriority/CleaningManager_MapComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using UnityEngine;
using Verse;

namespace RepairingPriority;
namespace CleaningPriority;

internal class CleaningManager_MapComponent : MapComponent, ICellBoolGiver
{
Expand Down
4 changes: 2 additions & 2 deletions Source/CleaningPriority/CleaningPriority.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<DebugType>None</DebugType>
<LangVersion>latest</LangVersion>
<FileVersion>1.5.0</FileVersion>
<FileVersion>1.5.2</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref">
<Version>1.5.4035-beta</Version>
<Version>*</Version>
<ExcludeAssets>runtime</ExcludeAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion Source/CleaningPriority/WorkGiver_CleanFilthPrioritized.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public override bool ShouldSkip(Pawn pawn, bool forced = false)

public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false)
{
if (pawn.Faction != Faction.OfPlayer)
if (pawn.Faction != Faction.OfPlayer && !pawn.IsPrisonerOfColony)
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<DebugType>None</DebugType>
<LangVersion>latest</LangVersion>
<FileVersion>1.5.0</FileVersion>
<FileVersion>1.5.2</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref">
Expand Down
3 changes: 2 additions & 1 deletion Source/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"Continued": true,
"CanAdd": "0",
"CanRemove": "0",
"PreviewVersion": "1.5"
"PreviewVersion": "1.5",
"SocialImageSet": true
}

0 comments on commit a38e9ba

Please sign in to comment.