Skip to content

Commit

Permalink
support buildable residences
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobharder committed Aug 4, 2024
1 parent f3e9e3e commit b53ba9a
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 154 deletions.
6 changes: 4 additions & 2 deletions mods/cheat-instant-residences/modinfo.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"Version": "1.0",
"Version": "1.0.1",
"ModID": "cheat-instant-residences-jakob",
"ModDependencies": [
"https://github.com/anno-mods/shared-resources/releases/download/v10.5/shared-pools-and-definitions.zip",
"../../sub/jakob-skyscraper-button"
],
"LoadAfterIds": [
"shared-pools-and-definitions"
"*",
"shared-pools-and-definitions",
"buildable_residences"
],
"Category": {
"English": "Cheat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<Include File="./ow-groups.include.xml" />
<Include File="./nw-groups.include.xml" />
<Include File="./other-groups.include.xml" />
<Include File="./residences.include.xml" />
</ModOps>
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<ModOps>
<!-- <Include File="./assets-buildable.include.xml" /> -->
<!-- use skyscraper button mod to fetch unique residence icons -->

<!-- # Picking Asset -->
<Group>
<!-- <Group>
<ModOp Type="merge" GUID="1010344,1010345,1010346,1010347,101255,5405,114437,112652"
Path="/Values/Building"
Content="~/Values/Standard/GUID/text()">
<Building>
<PickingAsset><ModOpContent /></PickingAsset>
</Building>
</ModOp>
</Group>
</Group> -->

<!-- # Icons -->
<Group>
Expand Down Expand Up @@ -102,29 +103,8 @@
<TextOverride>22976</TextOverride>
</Text>
<ConstructionCategory>
<CategoryDescription>1500011569</CategoryDescription>
<BuildingList>
<Item>
<Building>1010343</Building>
<Farmer>0</Farmer>
</Item>
<Item>
<Building>1010344</Building>
<Worker>1</Worker>
</Item>
<Item>
<Building>1010345</Building>
<Artisan>1</Artisan>
</Item>
<Item>
<Building>1010346</Building>
<Engineer>1</Engineer>
</Item>
<Item>
<Building>1010347</Building>
<Investor>1</Investor>
</Item>
</BuildingList>
<CategoryDescription>1500011541</CategoryDescription>
<BuildingList />
</ConstructionCategory>
</Values>
</Asset>
Expand All @@ -140,21 +120,8 @@
<TextOverride>22976</TextOverride>
</Text>
<ConstructionCategory>
<CategoryDescription>1500011569</CategoryDescription>
<BuildingList>
<Item>
<Building>101254</Building>
<Jornalero>0</Jornalero>
</Item>
<Item>
<Building>101255</Building>
<Obrero>1</Obrero>
</Item>
<Item>
<Building>5405</Building>
<Artista>1</Artista>
</Item>
</BuildingList>
<CategoryDescription>1500011541</CategoryDescription>
<BuildingList />
</ConstructionCategory>
</Values>
</Asset>
Expand All @@ -170,7 +137,7 @@
<TextOverride>22976</TextOverride>
</Text>
<ConstructionCategory>
<CategoryDescription>1500011569</CategoryDescription>
<CategoryDescription>1500011541</CategoryDescription>
<BuildingList>
<Item>
<Building>114436</Building>
Expand All @@ -188,15 +155,15 @@
<Template>ConstructionCategory</Template>
<Values>
<Standard>
<GUID>1500011568</GUID>
<GUID>1500011583</GUID>
<Name>Arctic Instant Residences</Name>
<IconFilename>data/ui/2kimages/main/3dicons/icon_resident.png</IconFilename>
</Standard>
<Text>
<TextOverride>22976</TextOverride>
</Text>
<ConstructionCategory>
<CategoryDescription>1500011569</CategoryDescription>
<CategoryDescription>1500011541</CategoryDescription>
<BuildingList>
<Item>
<Building>112091</Building>
Expand All @@ -220,113 +187,93 @@
</Values>
</Asset>
</ModOp>
</Group>

<ModOp Type="addNextSibling" GUID="500092"
Path="/Values/ConstructionCategory/BuildingList/Item[Residence and Farmer&lt;=0][last()]">
<Item>
<Building>1500011566</Building>
<Farmer>0</Farmer>
</Item>
<!-- # OW Construction Menus -->
<!-- trigger when Workers are in the menu -->
<Group Condition="@500092/ConstructionCategory/BuildingList/Item[Building='1010344']">
<ModOp Type="merge" GUID="500092"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='1010343']">
<CompactResidence />
<Farmer>0</Farmer>
</ModOp>
<ModOp Type="remove" GUID="500092"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='1010343']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='1010343']" />

<ModOp Type="addNextSibling" GUID="500137"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='101254'][last()]">
<Item>
<Building>1500011567</Building>
<Jornalero>0</Jornalero>
</Item>
<ModOp Type="merge" GUID="500092"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='1010344']">
<CompactResidence />
<Worker>0</Worker>
</ModOp>
<ModOp Type="remove" GUID="500137"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='101254']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='101254']" />

<ModOp Type="addNextSibling" GUID="119012"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='114436'][last()]">
<Item>
<Building>114437</Building>
<Elder>0</Elder>
</Item>
</ModOp>
<!-- <ModOp Type="remove" GUID="119012"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='114436']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='114436']" /> -->

<ModOp Type="addNextSibling" GUID="116343"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='112091'][last()]">
<Item>
<Building>112652</Building>
<Technician>0</Technician>
</Item>
<ModOp Type="merge" GUID="500092"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='1010345']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='1010345']">
<CompactResidence />
<Artisan>0</Artisan>
</ModOp>
<!-- <ModOp Type="remove" GUID="119012"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='112091']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='112091']" /> -->
</Group>

<!-- # OW Construction Menus -->
<Group>
<ModOp Type="addPrevSibling" GUID="25000190"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<Item>
<Building>1010344</Building>
</Item>
<ModOp Type="merge" GUID="500092"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='1010346']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='1010346']">
<CompactResidence />
<Engineer>0</Engineer>
</ModOp>
<ModOp Type="addPrevSibling" GUID="25000191"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<Item>
<Building>1010345</Building>
</Item>
<ModOp Type="merge" GUID="500092"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='1010347']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='1010347']">
<CompactResidence />
<Investor>0</Investor>
</ModOp>
<ModOp Type="addPrevSibling" GUID="25000192"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<ModOp Type="addNextSibling" GUID="500092"
Path="/Values/ConstructionCategory/BuildingList/Item[Residence and Farmer&lt;=0][last()]">
<Item>
<Building>1010346</Building>
<Building>1500011566</Building>
<Farmer>0</Farmer>
</Item>
</ModOp>
<ModOp Type="addPrevSibling" GUID="500447"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<Item>
<Building>1010347</Building>
</Item>
<ModOp Type="add" GUID="1500011566"
Path="/Values/ConstructionCategory/BuildingList"
Content="@500092/ConstructionCategory/BuildingList/Item[CompactResidence]">
</ModOp>
<ModOp Type="remove" GUID="500092"
Condition="/Values/ConstructionCategory/BuildingList/Item[CompactResidence]"
Path="/Values/ConstructionCategory/BuildingList/Item[CompactResidence]" />
<ModOp Type="remove" GUID="1500011566"
Condition="/Values/ConstructionCategory/BuildingList/Item/PlatformVisibility[text()='Console']"
Path="/Values/ConstructionCategory/BuildingList/Item/PlatformVisibility[text()='Console']" />
</Group>

<!-- # NW Construction Menus -->
<Group>
<ModOp Type="addPrevSibling" GUID="25000194"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<Item>
<Building>101255</Building>
</Item>
<!-- trigger when Obreros are in the menu -->
<Group Condition="@500137/ConstructionCategory/BuildingList/Item[Building='101255']">
<ModOp Type="merge" GUID="500137"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='101254']">
<CompactResidence />
<Jornalero>0</Jornalero>
</ModOp>
<ModOp Type="addPrevSibling" GUID="5466"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<Item>
<Building>5405</Building>
</Item>
<ModOp Type="merge" GUID="500137"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='101255']">
<CompactResidence />
<Obrero>0</Obrero>
</ModOp>
</Group>

<!-- # Enbesa Construction Menus -->
<Group>
<ModOp Type="addPrevSibling" GUID="114554"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<Item>
<Building>114437</Building>
</Item>
<ModOp Type="merge" GUID="500137"
Condition="/Values/ConstructionCategory/BuildingList/Item[Building='5405']"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='5405']">
<CompactResidence />
<Artista>0</Artista>
</ModOp>
</Group>

<!-- # Arctic Construction Menus -->
<Group>
<ModOp Type="addPrevSibling" GUID="112791"
Path="/Values/ConstructionCategory/BuildingList/Item[1]">
<ModOp Type="addNextSibling" GUID="500137"
Path="/Values/ConstructionCategory/BuildingList/Item[Building='101254'][last()]">
<Item>
<Building>112652</Building>
<Building>1500011567</Building>
<Jornalero>0</Jornalero>
</Item>
</ModOp>
<ModOp Type="add" GUID="1500011567"
Path="/Values/ConstructionCategory/BuildingList"
Content="@500137/ConstructionCategory/BuildingList/Item[CompactResidence]">
</ModOp>
<ModOp Type="remove" GUID="500137"
Condition="/Values/ConstructionCategory/BuildingList/Item[CompactResidence]"
Path="/Values/ConstructionCategory/BuildingList/Item[CompactResidence]" />
<ModOp Type="remove" GUID="1500011567"
Condition="/Values/ConstructionCategory/BuildingList/Item/PlatformVisibility[text()='Console']"
Path="/Values/ConstructionCategory/BuildingList/Item/PlatformVisibility[text()='Console']" />
</Group>
</ModOps>
6 changes: 5 additions & 1 deletion mods/ui-compact-menu/modinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
"ModDependencies": [
"https://github.com/anno-mods/shared-resources/releases/download/v10.5/shared-pools-and-definitions.zip"
],
"DeprecateIds": [
"cheat-instant-residences-jakob"
],
"LoadAfterIds": [
"*",
"shared-pools-and-definitions"
"shared-pools-and-definitions",
"buildable_residences"
],
"OptionalDependencies": [
"jakob_small_hotels",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
</Asset>
</ModOp>

<ModOp Type="merge" GUID="1500011561"
Condition="#cheat-instant-residences-jakob"
Path="/Values">
<ModOp Condition="#cheat-instant-residences-jakob" Type="merge" GUID="1500011561" Path="/Values">
<InstantResidences />
</ModOp>
<ModOp Type="merge" GUID="1500011561"
Condition="#Insta_Residences"
Path="/Values">
<ModOp Condition="#Insta_Residences" Type="merge" GUID="1500011561" Path="/Values">
<InstantResidences />
</ModOp>
<ModOp Condition="#buildable_residences" Type="merge" GUID="1500011561" Path="/Values">
<InstantResidences />
</ModOp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
Path="/Values/ConstructionCategory/BuildingList/Item[Worker&lt;=1][last()]">
<Item>
<Building>1500010143</Building>
<CompactResidence />
<Worker>1</Worker>
</Item>
</ModOp>
Expand All @@ -138,6 +139,7 @@
Path="/Values/ConstructionCategory/BuildingList/Item[Farmer or Worker&lt;=1][last()]">
<Item>
<Building>1500010143</Building>
<CompactResidence />
<Worker>1</Worker>
</Item>
</ModOp>
Expand All @@ -148,11 +150,12 @@
<Artisan>900</Artisan>
</Item>
</ModOp> -->
<ModOp Type="addNextSibling" GUID="1500011566"
Condition="#cheat-instant-residences-jakob"
<ModOp Type="addNextSibling" GUID="500092"
Condition="#jakob_compact_menus"
Path="/Values/ConstructionCategory/BuildingList/Item[Farmer or Worker&lt;=1][last()]">
<Item>
<Building>1500010143</Building>
<CompactResidence />
<Worker>1</Worker>
</Item>
</ModOp>
Expand Down
2 changes: 1 addition & 1 deletion sub/ow-pescatarians-jakob/modinfo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Version": "3.0.8",
"Version": "3.0.9",
"ModID": "jakob_pescatarians",
"ModioResourceId": 3229941,
"DeprecateIds": [
Expand Down
Loading

0 comments on commit b53ba9a

Please sign in to comment.