Made spaceship parts units instead of buildings (#6203)

* Spaceship parts are units now

* Fixed tests

* Removed commented out lines

* `Spaceship Part` unique can also go on buildings in ods
This commit is contained in:
Xander Lenstra 2022-02-22 10:30:20 +01:00 committed by GitHub
parent ae77ff0f16
commit 90386bd4e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 202 additions and 183 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -622,259 +622,259 @@ BuildingIcons/SS Booster
index: -1
BuildingIcons/SS Cockpit
rotate: false
xy: 1732, 1683
xy: 1840, 1790
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/SS Engine
rotate: false
xy: 1840, 1790
xy: 328, 170
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/SS Stasis Chamber
rotate: false
xy: 220, 62
xy: 544, 386
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Satrap's Court
rotate: false
xy: 436, 278
xy: 868, 710
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Seaport
rotate: false
xy: 760, 602
xy: 1192, 1034
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Shrine
rotate: false
xy: 1084, 932
xy: 1516, 1358
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Sistine Chapel
rotate: false
xy: 1300, 1142
xy: 1732, 1575
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Solar Plant
rotate: false
xy: 1624, 1466
xy: 436, 170
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Spaceship Factory
rotate: false
xy: 1732, 1575
xy: 544, 278
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Stable
rotate: false
xy: 328, 62
xy: 760, 494
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Stadium
rotate: false
xy: 436, 170
xy: 868, 602
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Statue of Liberty
rotate: false
xy: 544, 278
xy: 976, 710
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Statue of Zeus
rotate: false
xy: 652, 386
xy: 1084, 824
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Stele
rotate: false
xy: 868, 602
xy: 1300, 1034
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Stock Exchange
rotate: false
xy: 976, 710
xy: 1408, 1142
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Stone Works
rotate: false
xy: 1084, 824
xy: 1516, 1250
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Stonehenge
rotate: false
xy: 1192, 926
xy: 1624, 1358
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Sydney Opera House
rotate: false
xy: 1516, 1250
xy: 436, 62
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Taj Mahal
rotate: false
xy: 1624, 1358
xy: 544, 170
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Temple
rotate: false
xy: 1840, 1574
xy: 760, 386
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Temple of Artemis
rotate: false
xy: 436, 62
xy: 868, 494
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Terracotta Army
rotate: false
xy: 652, 278
xy: 1084, 716
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/The Great Library
rotate: false
xy: 760, 386
xy: 1192, 818
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/The Great Lighthouse
rotate: false
xy: 868, 494
xy: 1300, 926
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/The Louvre
rotate: false
xy: 976, 602
xy: 1408, 1034
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/The Oracle
rotate: false
xy: 1084, 716
xy: 1516, 1142
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/The Pyramids
rotate: false
xy: 1192, 818
xy: 1624, 1250
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Theatre
rotate: false
xy: 1300, 926
xy: 1732, 1359
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/United Nations
rotate: false
xy: 1840, 1466
xy: 868, 386
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/University
rotate: false
xy: 544, 62
xy: 976, 494
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Utopia Project
rotate: false
xy: 652, 170
xy: 1084, 608
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Walls
rotate: false
xy: 760, 278
xy: 1192, 710
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Walls of Babylon
rotate: false
xy: 868, 386
xy: 1300, 818
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Wat
rotate: false
xy: 1300, 818
xy: 1732, 1251
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Water Mill
rotate: false
xy: 1408, 926
xy: 1840, 1358
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Windmill
rotate: false
xy: 1516, 1034
xy: 760, 170
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
BuildingIcons/Workshop
rotate: false
xy: 1840, 1358
xy: 1084, 500
size: 100, 100
orig: 100, 100
offset: 0, 0
@ -888,105 +888,105 @@ MayaCalendar/0
index: -1
MayaCalendar/1
rotate: false
xy: 1024, 436
xy: 1456, 868
size: 13, 50
orig: 13, 50
offset: 0, 0
index: -1
MayaCalendar/10
rotate: false
xy: 926, 328
xy: 1358, 760
size: 21, 50
orig: 21, 50
offset: 0, 0
index: -1
MayaCalendar/11
rotate: false
xy: 1408, 868
xy: 1840, 1300
size: 35, 50
orig: 35, 50
offset: 0, 0
index: -1
MayaCalendar/12
rotate: false
xy: 1516, 976
xy: 868, 220
size: 35, 50
orig: 35, 50
offset: 0, 0
index: -1
MayaCalendar/13
rotate: false
xy: 1624, 1083
xy: 976, 328
size: 35, 50
orig: 35, 50
offset: 0, 0
index: -1
MayaCalendar/14
rotate: false
xy: 1732, 1193
xy: 1084, 442
size: 35, 50
orig: 35, 50
offset: 0, 0
index: -1
MayaCalendar/15
rotate: false
xy: 1840, 1300
xy: 1192, 544
size: 30, 50
orig: 30, 50
offset: 0, 0
index: -1
MayaCalendar/16
rotate: false
xy: 976, 436
xy: 1408, 868
size: 40, 50
orig: 40, 50
offset: 0, 0
index: -1
MayaCalendar/17
rotate: false
xy: 1084, 550
xy: 1516, 976
size: 40, 50
orig: 40, 50
offset: 0, 0
index: -1
MayaCalendar/18
rotate: false
xy: 1192, 652
xy: 1624, 1084
size: 40, 50
orig: 40, 50
offset: 0, 0
index: -1
MayaCalendar/19
rotate: false
xy: 1300, 760
xy: 1732, 1193
size: 40, 50
orig: 40, 50
offset: 0, 0
index: -1
MayaCalendar/2
rotate: false
xy: 1132, 550
xy: 1564, 976
size: 13, 50
orig: 13, 50
offset: 0, 0
index: -1
MayaCalendar/3
rotate: false
xy: 1240, 652
xy: 1672, 1084
size: 13, 50
orig: 13, 50
offset: 0, 0
index: -1
MayaCalendar/4
rotate: false
xy: 1348, 760
xy: 1780, 1193
size: 13, 50
orig: 13, 50
offset: 0, 0
index: -1
MayaCalendar/5
rotate: false
xy: 1451, 868
xy: 1883, 1300
size: 10, 50
orig: 10, 50
offset: 0, 0
@ -1007,14 +1007,14 @@ MayaCalendar/7
index: -1
MayaCalendar/8
rotate: false
xy: 760, 162
xy: 710, 111
size: 25, 50
orig: 25, 50
offset: 0, 0
index: -1
MayaCalendar/9
rotate: false
xy: 818, 220
xy: 1300, 702
size: 25, 50
orig: 25, 50
offset: 0, 0
@ -1035,14 +1035,14 @@ MayaCalendar/Katun
index: -1
MayaCalendar/Maya
rotate: false
xy: 760, 220
xy: 652, 111
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
MayaCalendar/Tun
rotate: false
xy: 868, 328
xy: 1300, 760
size: 50, 50
orig: 50, 50
offset: 0, 0
@ -1733,170 +1733,198 @@ UnitIcons/Rocket Artillery
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Samurai
UnitIcons/SS Booster
rotate: false
xy: 328, 170
xy: 1732, 1683
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Scout
UnitIcons/SS Cockpit
rotate: false
xy: 544, 386
xy: 220, 62
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Sea Beggar
UnitIcons/SS Engine
rotate: false
xy: 436, 278
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/SS Stasis Chamber
rotate: false
xy: 652, 494
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Settler
UnitIcons/Samurai
rotate: false
xy: 868, 710
xy: 760, 602
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Ship of the Line
UnitIcons/Scout
rotate: false
xy: 976, 818
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Sipahi
UnitIcons/Sea Beggar
rotate: false
xy: 1192, 1034
xy: 1084, 932
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Skirmisher
UnitIcons/Settler
rotate: false
xy: 1300, 1142
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Ship of the Line
rotate: false
xy: 1408, 1250
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Slinger
UnitIcons/Sipahi
rotate: false
xy: 1516, 1358
xy: 1624, 1466
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Spearman
UnitIcons/Skirmisher
rotate: false
xy: 1840, 1682
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Slinger
rotate: false
xy: 328, 62
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Spearman
rotate: false
xy: 652, 386
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Stealth Bomber
rotate: false
xy: 760, 494
xy: 1192, 926
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Submarine
rotate: false
xy: 1300, 1034
xy: 1732, 1467
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Swordsman
rotate: false
xy: 1408, 1142
xy: 1840, 1574
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Tank
rotate: false
xy: 1732, 1467
xy: 652, 278
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Tercio
rotate: false
xy: 544, 170
xy: 976, 602
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Trebuchet
rotate: false
xy: 1408, 1034
xy: 1840, 1466
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Triplane
rotate: false
xy: 1516, 1142
xy: 544, 62
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Trireme
rotate: false
xy: 1624, 1249
xy: 652, 169
size: 100, 101
orig: 100, 101
offset: 0, 0
index: -1
UnitIcons/Turtle Ship
rotate: false
xy: 1732, 1359
xy: 760, 278
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/War Chariot
rotate: false
xy: 976, 494
xy: 1408, 926
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/War Elephant
rotate: false
xy: 1084, 608
xy: 1516, 1034
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Warrior
rotate: false
xy: 1192, 710
xy: 1624, 1142
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Work Boats
rotate: false
xy: 1624, 1141
xy: 868, 278
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Worker
rotate: false
xy: 1732, 1251
xy: 976, 386
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
UnitIcons/Zero
rotate: false
xy: 652, 62
xy: 1192, 602
size: 100, 100
orig: 100, 100
offset: 0, 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 727 KiB

After

Width:  |  Height:  |  Size: 744 KiB

View File

@ -214,20 +214,6 @@ ImprovementIcons/Quarry
orig: 100, 100
offset: 0, 0
index: -1
ImprovementIcons/Railroad
rotate: false
xy: 328, 30
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/Railroad
rotate: false
xy: 328, 30
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
ImprovementIcons/Road
rotate: false
xy: 1054, 1296
@ -2083,6 +2069,20 @@ TileSets/Default/OasisOverlay
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/Railroad
rotate: false
xy: 328, 30
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
ImprovementIcons/Railroad
rotate: false
xy: 328, 30
size: 100, 100
orig: 100, 100
offset: 0, 0
index: -1
TileSets/Default/Road
rotate: false
xy: 404, 1847

View File

@ -1103,12 +1103,6 @@
"requiredTech": "Telecommunications",
"uniques": ["Population loss from nuclear attacks [-75]% [in this city]"]
},
{
"name": "SS Cockpit",
"requiredResource": "Aluminum",
"requiredTech": "Satellites",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
{
"name": "Hubble Space Telescope",
"isWonder": true,
@ -1121,12 +1115,6 @@
"requiredTech": "Satellites",
"quote": "'The wonder is, not that the field of stars is so vast, but that man has measured it.' - Anatole France"
},
{
"name": "SS Booster",
"requiredResource": "Aluminum",
"requiredTech": "Advanced Ballistics",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
{
"name": "Spaceship Factory",
"production": 3,
@ -1148,18 +1136,6 @@
"uniques": ["Triggers voting for the Diplomatic Victory", "Hidden when [Diplomatic] Victory is disabled", "Triggers a global alert upon completion"],
"quote": "'More than ever before in human history, we share a common destiny. We can master it only if we face it together. And that is why we have the United Nations.' - Kofi Annan"
},
{
"name": "SS Engine",
"requiredResource": "Aluminum",
"requiredTech": "Particle Physics",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
{
"name": "SS Stasis Chamber",
"requiredResource": "Aluminum",
"requiredTech": "Nanotechnology",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
// All Eras

View File

@ -1675,18 +1675,18 @@
}
/* Spaceship Parts */
/*
// Must be transported to the Capital for launch.
// Can be destroyed by any hostile military unit walking in their tile.
{
"name": "SS Booster",
"unitType": "Civilian",
"movement": 2,
"cost": 500,
"cost": 750,
"requiredTech": "Advanced Ballistics",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
// costs 750 in G&K, 1500 in BNW
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [3] per Civilization"]
// costs 1500 in BNW
},
{
"name": "SS Cockpit",
@ -1695,7 +1695,7 @@
"cost": 750,
"requiredTech": "Satellites",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"]
// costs 1500 in BNW
},
{
@ -1705,7 +1705,7 @@
"cost": 750,
"requiredTech": "Particle Physics",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"]
// costs 1500 in BNW
},
{
@ -1715,8 +1715,7 @@
"cost": 750,
"requiredTech": "Nanotechnology",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"]
// costs 1500 in BNW
}
*/
]

View File

@ -941,18 +941,6 @@
// Information Era
// Column 15
{
"name": "SS Cockpit",
"requiredResource": "Aluminum",
"requiredTech": "Satellites",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
{
"name": "SS Booster",
"requiredResource": "Aluminum",
"requiredTech": "Robotics",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
{
"name": "Spaceship Factory",
"production": 3,
@ -974,18 +962,6 @@
"uniques": ["Triggers voting for the Diplomatic Victory", "Hidden when [Diplomatic] Victory is disabled", "Triggers a global alert upon completion"],
"quote": "'More than ever before in human history, we share a common destiny. We can master it only if we face it together. And that is why we have the United Nations.' - Kofi Annan"
},
{
"name": "SS Engine",
"requiredResource": "Aluminum",
"requiredTech": "Particle Physics",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
{
"name": "SS Stasis Chamber",
"requiredResource": "Aluminum",
"requiredTech": "Nanotechnology",
"uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased", "Hidden when [Scientific] Victory is disabled"]
},
// All Eras

View File

@ -1351,7 +1351,6 @@
}
/* Spaceship Parts */
/*
// Must be transported to the Capital for launch.
// Can be destroyed by any hostile military unit walking in their tile.
{
@ -1361,8 +1360,8 @@
"cost": 500,
"requiredTech": "Robotics",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
// costs 750 in G&K, 1500 in BNW
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"]
// costs 1500 in BNW
},
{
"name": "SS Cockpit",
@ -1371,7 +1370,7 @@
"cost": 750,
"requiredTech": "Satellites",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"]
// costs 1500 in BNW
},
{
@ -1381,7 +1380,7 @@
"cost": 750,
"requiredTech": "Particle Physics",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"]
// costs 1500 in BNW
},
{
@ -1391,8 +1390,7 @@
"cost": 750,
"requiredTech": "Nanotechnology",
"requiredResource": "Aluminum",
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]"]
"uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"]
// costs 1500 in BNW
}
*/
]

View File

@ -727,6 +727,8 @@ Sleep until healed = Slaap tot geheeld
Moving = Bewegen
Set up = Opstellen
Paradrop = Parachutelanding
Add in capital = In hoofdstad toevoegen
Add to [comment] = Toevoegen aan [comment]
Upgrade to [unitType] ([goldCost] gold) = Waardeer [unitType] op ([goldCost] goud)
Found city = Stad stichten
Promote = Promoveren

View File

@ -726,6 +726,8 @@ Sleep until healed =
Moving =
Set up =
Paradrop =
Add in capital =
Add to [comment] =
Upgrade to [unitType] ([goldCost] gold) =
Found city =
Promote =

View File

@ -145,7 +145,7 @@ enum class RejectionReason(val shouldShow: Boolean, var errorMessage: String) {
MustOwnTile(false, "Must own a specific tile close by"),
WaterUnitsInCoastalCities(false, "May only built water units in coastal cities"),
CanOnlyBeBuiltInSpecificCities(false, "Can only be built in specific cities"),
MaxNumberBuildable(true, "Maximum number being built"),
MaxNumberBuildable(true, "Maximum number have been built or are being constructed"),
UniqueToOtherNation(false, "Unique to another nation"),
ReplacedByOurUnique(false, "Our unique replaces this"),

View File

@ -2,7 +2,9 @@ package com.unciv.logic.civilization
import com.unciv.logic.city.INonPerpetualConstruction
import com.unciv.models.Counter
import com.unciv.models.ruleset.Building
import com.unciv.models.ruleset.unique.UniqueType
import com.unciv.models.ruleset.unit.BaseUnit
import com.unciv.models.stats.Stat
import java.util.*
import kotlin.collections.HashMap
@ -120,4 +122,18 @@ class CivConstructions {
addFreeBuilding(city.id, building)
}
}
fun countConstructedObjects(objectToCount: INonPerpetualConstruction): Int {
val amountInSpaceShip = civInfo.victoryManager.currentsSpaceshipParts[objectToCount.name] ?: 0
return amountInSpaceShip + when (objectToCount) {
is Building -> civInfo.cities.count {
it.cityConstructions.containsBuildingOrEquivalent(objectToCount.name)
|| it.cityConstructions.isBeingConstructedOrEnqueued(objectToCount.name)
}
is BaseUnit -> civInfo.getCivUnits().count { it.name == objectToCount.name } +
civInfo.cities.count { it.cityConstructions.isBeingConstructedOrEnqueued(objectToCount.name) }
else -> 0
}
}
}

View File

@ -140,6 +140,8 @@ enum class UnitActionType(
{ imageGetShowMore() }, KeyCharAndCode(Input.Keys.PAGE_DOWN)),
HideAdditionalActions("Back",
{ imageGetHideMore() }, KeyCharAndCode(Input.Keys.PAGE_UP)),
AddInCapital( "Add in capital",
{ ImageGetter.getUnitIcon("SS Cockpit")}, UncivSound.Chimes),
;
// Allow shorter initializations

View File

@ -436,7 +436,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
if (cityConstructions.isBeingConstructedOrEnqueued(name))
return false
for (unique in getMatchingUniques(UniqueType.MaxNumberBuildable)){
if (cityConstructions.cityInfo.civInfo.cities.count{it.cityConstructions.containsBuildingOrEquivalent(name)}>=unique.params[0].toInt())
if (cityConstructions.cityInfo.civInfo.civConstructions.countConstructedObjects(this) >= unique.params[0].toInt())
return false
}
@ -475,6 +475,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
)
rejectionReasons.add(RejectionReason.ShouldNotBeDisplayed)
// Shouldn't this be "Enables nuclear weapon_s_"?
"Enables nuclear weapon" -> if (!cityConstructions.cityInfo.civInfo.gameInfo.gameParameters.nuclearWeaponsEnabled)
rejectionReasons.add(RejectionReason.DisabledBySetting)
@ -522,13 +523,8 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
rejectionReasons.add(RejectionReason.DisabledBySetting)
UniqueType.MaxNumberBuildable.placeholderText ->
if (civInfo.cities.count {
it.cityConstructions.containsBuildingOrEquivalent(name) ||
it.cityConstructions.isBeingConstructedOrEnqueued(name)
}
>= unique.params[0].toInt()) {
if (civInfo.civConstructions.countConstructedObjects(this) >= unique.params[0].toInt())
rejectionReasons.add(RejectionReason.MaxNumberBuildable)
}
}
}

View File

@ -451,7 +451,8 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags:
CannotBeBarbarian("Never appears as a Barbarian unit", UniqueTarget.Unit, flags = listOf(UniqueFlag.HiddenToUsers)),
ReligiousUnit("Religious Unit", UniqueTarget.Unit),
SpaceshipPart("Spaceship part", UniqueTarget.Building, UniqueTarget.Unit),
SpaceshipPart("Spaceship part", UniqueTarget.Unit, UniqueTarget.Building), // Usage for buildings is deprecated
AddInCapital("Can be added to [comment] in the Capital", UniqueTarget.Unit),
//endregion

View File

@ -425,12 +425,15 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction {
rejectionReasons.add(RejectionReason.NoSettlerForOneCityPlayers)
}
if (civInfo.getMatchingUniques(UniqueType.CannotBuildUnits, StateForConditionals(civInfo=civInfo))
.any { matchesFilter(it.params[0]) }
) {
if (civInfo.getMatchingUniques(UniqueType.CannotBuildUnits).any { matchesFilter(it.params[0]) }) {
rejectionReasons.add(RejectionReason.CannotBeBuilt)
}
for (unique in getMatchingUniques(UniqueType.MaxNumberBuildable)) {
if (civInfo.civConstructions.countConstructedObjects(this) >= unique.params[0].toInt())
rejectionReasons.add(RejectionReason.MaxNumberBuildable)
}
return rejectionReasons
}

View File

@ -41,7 +41,8 @@ object UnitActions {
val unitTable = worldScreen.bottomUnitTable
val actionList = ArrayList<UnitAction>()
if (unit.isMoving()) actionList += UnitAction(UnitActionType.StopMovement) { unit.action = null }
if (unit.isMoving())
actionList += UnitAction(UnitActionType.StopMovement) { unit.action = null }
if (unit.isExploring())
actionList += UnitAction(UnitActionType.StopExploration) { unit.action = null }
if (unit.isAutomated())
@ -66,6 +67,8 @@ object UnitActions {
addExplorationActions(unit, actionList)
addAutomateBuildingImprovementsAction(unit, actionList)
addTriggerUniqueActions(unit, actionList)
addAddInCapitalAction(unit, actionList, tile)
addToggleActionsAction(unit, actionList, unitTable)
@ -407,6 +410,18 @@ object UnitActions {
)
}
private fun addAddInCapitalAction(unit: MapUnit, actionList: ArrayList<UnitAction>, tile: TileInfo) {
if (!unit.hasUnique(UniqueType.AddInCapital)) return
actionList += UnitAction(UnitActionType.AddInCapital,
title = "Add to [${unit.getMatchingUniques(UniqueType.AddInCapital).first().params[0]}]",
action = {
unit.civInfo.victoryManager.currentsSpaceshipParts.add(unit.name, 1)
unit.destroy()
}.takeIf { tile.isCityCenter() && tile.getCity()!!.isCapital() && tile.getCity()!!.civInfo == unit.civInfo }
)
}
private fun addGreatPersonActions(unit: MapUnit, actionList: ArrayList<UnitAction>, tile: TileInfo) {

View File

@ -143,6 +143,10 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
* [Modern Armor](https://thenounproject.com/search/?q=tank&i=218) By Public Domain Nouns for Modern Armor
* [Nuclear Missile](https://thenounproject.com/marialuisa.iborra/collection/missiles-bombs/?i=1022574) By Lluisa Iborra, ES
* [Robot](https://thenounproject.com/term/robot/1182459/) by Lluisa Iborra, ES for Giant Death Robot
* [Missile](https://thenounproject.com/term/missile/799922/) By ProSymbols for SS Booster
* [Rocket](https://thenounproject.com/term/rocket/937173/) By BomSymbols for SS Cockpit
* [Engine](https://thenounproject.com/term/engine/1877958/) By Andre for SS Engine
* [Chamber](https://thenounproject.com/term/chamber/1242689/) By IYIKON for SS Stasis Chamber
### All Eras
@ -334,13 +338,9 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
### Information Era
* [CN Tower Toronto](https://thenounproject.com/search/?q=cn%20tower&i=807678) By mikicon for CN tower
* [War Shelter](https://www.flaticon.com/free-icon/war-shelter_978661) by [Frepik](www.freepik.com) for Bomb Shelter
* [Missile](https://thenounproject.com/term/missile/799922/) By ProSymbols for SS Booster
* [Rocket](https://thenounproject.com/term/rocket/937173/) By BomSymbols for SS Cockpit
* [Hubble Telescope](https://thenounproject.com/search/?q=hubble%20space&i=445502) By Scott Lewis for Hubble Space Telescope
* [Build](https://thenounproject.com/term/build/1156478/) By Michael G Brown for Spaceship Factory
* [United Nations](https://thenounproject.com/search/?q=united+nations&i=3104698) by Imam for United Nations
* [Engine](https://thenounproject.com/term/engine/1877958/) By Andre for SS Engine
* [Chamber](https://thenounproject.com/term/chamber/1242689/) By IYIKON for SS Stasis Chamber
### All Era's
* [Illuminati](https://thenounproject.com/term/illuminati/1617812) by emilegraphics for the Utopia Project

View File

@ -816,9 +816,6 @@ Applicable to: Building, Improvement, Resource
#### Remove extra unhappiness from annexed cities
Applicable to: Building
#### Spaceship part
Applicable to: Building, Unit
#### Hidden when religion is disabled
Applicable to: Building, Unit, Ruins
@ -984,6 +981,14 @@ Applicable to: Unit
#### Religious Unit
Applicable to: Unit
#### Spaceship part
Applicable to: Unit
#### Can be added to [comment] in the Capital
Example: "Can be added to [comment] in the Capital"
Applicable to: Unit
## Promotion uniques
#### Heal this unit by [amount] HP
Example: "Heal this unit by [20] HP"