rimworld-blax-castes/Patches/BlaxCastes_ScheduleWork.xml

64 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Patch>
<!-- The Caste column in the Schedule tab goes right after the timetable. The tab draws its time assignment
selector over the top of the header left of the timetable, where the column's buttons would sit, so
the column stays clear of it. Without the timetable it goes right before the allowed area column, and
without both right after the name column. -->
<Operation Class="PatchOperationConditional">
<xpath>Defs/PawnTableDef[defName="Restrict"]/columns/li[text()="Timetable"]</xpath>
<match Class="PatchOperationInsert">
<xpath>Defs/PawnTableDef[defName="Restrict"]/columns/li[text()="Timetable"]</xpath>
<order>Append</order>
<value>
<li>BlaxCastes_Caste</li>
</value>
</match>
<nomatch Class="PatchOperationConditional">
<xpath>Defs/PawnTableDef[defName="Restrict"]/columns/li[text()="AllowedArea"]</xpath>
<match Class="PatchOperationInsert">
<xpath>Defs/PawnTableDef[defName="Restrict"]/columns/li[text()="AllowedArea"]</xpath>
<order>Prepend</order>
<value>
<li>BlaxCastes_Caste</li>
</value>
</match>
<nomatch Class="PatchOperationConditional">
<xpath>Defs/PawnTableDef[defName="Restrict"]/columns/li[text()="LabelShortWithIcon"]</xpath>
<match Class="PatchOperationInsert">
<xpath>Defs/PawnTableDef[defName="Restrict"]/columns/li[text()="LabelShortWithIcon"]</xpath>
<order>Append</order>
<value>
<li>BlaxCastes_Caste</li>
</value>
</match>
</nomatch>
</nomatch>
</Operation>
<!-- In the Work tab it goes right before the copy and paste column. The game adds the work columns after
that column when it builds the table, so the Caste column ends up just left of them. Without the copy
and paste column it goes right after the name column. -->
<Operation Class="PatchOperationConditional">
<xpath>Defs/PawnTableDef[defName="Work"]/columns/li[text()="CopyPasteWorkPriorities"]</xpath>
<match Class="PatchOperationInsert">
<xpath>Defs/PawnTableDef[defName="Work"]/columns/li[text()="CopyPasteWorkPriorities"]</xpath>
<order>Prepend</order>
<value>
<li>BlaxCastes_Caste</li>
</value>
</match>
<nomatch Class="PatchOperationConditional">
<xpath>Defs/PawnTableDef[defName="Work"]/columns/li[text()="LabelWithIcon"]</xpath>
<match Class="PatchOperationInsert">
<xpath>Defs/PawnTableDef[defName="Work"]/columns/li[text()="LabelWithIcon"]</xpath>
<order>Append</order>
<value>
<li>BlaxCastes_Caste</li>
</value>
</match>
</nomatch>
</Operation>
</Patch>