1
0
forked from 0ad/0ad

Elephant_stables -> elephant_stable.

- Renames the elephant_stables.xml templates to elephant_stable.xml
(without plural s), as well as their generic template_*.xml parent,
consistent with e.g the stable.
- Corrects all occurrences in simulation and map files accordingly.
- Renames the stable and elephant stable audio files.
- Drops pers_ from the barrack.png and stable.png icons.

Patch by: @Nescio
Differential revision: D3343
This was SVN commit r25053.
This commit is contained in:
Freagarach 2021-03-15 08:45:09 +00:00
parent 8dc86d20bb
commit 6bd30fe150
28 changed files with 40 additions and 40 deletions

View File

@ -11,5 +11,5 @@
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/complete/building</Path>
<Sound>complete_cavalry_stables.ogg</Sound>
<Sound>complete_elephant_stable.ogg</Sound>
</SoundGroup>

View File

@ -11,5 +11,5 @@
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/complete/building</Path>
<Sound>complete_elephant_stables.ogg</Sound>
<Sound>complete_stable.ogg</Sound>
</SoundGroup>

View File

@ -10,5 +10,5 @@
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/select/building</Path>
<Sound>sel_cavalry_stables.ogg</Sound>
<Sound>sel_elephant_stable.ogg</Sound>
</SoundGroup>

View File

@ -10,5 +10,5 @@
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/select/building</Path>
<Sound>sel_elephant_stables.ogg</Sound>
<Sound>sel_stable.ogg</Sound>
</SoundGroup>

View File

@ -77,7 +77,7 @@ const oNobaCamp = "structures/kush/camp_noba";
const oCivicCenter = "structures/kush/civil_centre";
const oBarracks = "structures/kush/barracks";
const oStable = "structures/kush/stable";
const oElephantStables = "structures/kush/elephant_stables";
const oElephantStable = "structures/kush/elephant_stable";
const oWallMedium = "structures/kush/wall_medium";
const oWallGate = "structures/kush/wall_gate";
const oWallTower = "structures/kush/wall_tower";
@ -183,7 +183,7 @@ const clPyramid = g_Map.createTileClass();
const clHouse = g_Map.createTileClass();
const clForge = g_Map.createTileClass();
const clStable = g_Map.createTileClass();
const clElephantStables = g_Map.createTileClass();
const clElephantStable = g_Map.createTileClass();
const clCivicCenter = g_Map.createTileClass();
const clBarracks = g_Map.createTileClass();
const clBlemmyeCamp = g_Map.createTileClass();
@ -270,10 +270,10 @@ const layoutKushCity = [
"painters": new TileClassPainter(clCivicCenter)
},
{
"templateName": oElephantStables,
"templateName": oElephantStable,
"difficulty": "Easy",
"constraints": avoidClasses(clElephantStables, 10),
"painters": new TileClassPainter(clElephantStables)
"constraints": avoidClasses(clElephantStable, 10),
"painters": new TileClassPainter(clElephantStable)
},
{
"templateName": oStable,
@ -1062,7 +1062,7 @@ var areaCityBushes =
clFortress, 1,
clHouse, 1,
clForge, 1,
clElephantStables, 1,
clElephantStable, 1,
clStable, 1,
clCivicCenter, 1,
clBarracks, 1,
@ -1078,7 +1078,7 @@ var areaCityPalms =
undefined,
[
new StayAreasConstraint([areaCityBushes]),
avoidClasses(clElephantStables, 3)
avoidClasses(clElephantStable, 3)
]);
g_Map.log("Placing city palms");

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1913,7 +1913,7 @@ PETRA.HQ.prototype.buildForge = function(gameState, queues)
};
/**
* Deals with constructing military buildings (barracks, stables)
* Deals with constructing military buildings (e.g. barracks, stable).
* They are mostly defined by Config.js. This is unreliable since changes could be done easily.
*/
PETRA.HQ.prototype.constructTrainingBuildings = function(gameState, queues)
@ -1936,7 +1936,7 @@ PETRA.HQ.prototype.constructTrainingBuildings = function(gameState, queues)
if (this.getAccountedPopulation(gameState) > this.Config.Military.popForBarracks1 ||
this.phasing == 2 && gameState.getOwnStructures().filter(API3.Filters.byClass("Village")).length < 5)
{
// first barracks/range and stables.
// First barracks/range and stable.
if (numBarracks + numRanges == 0)
{
let template = barracksTemplate || rangeTemplate;
@ -1955,7 +1955,7 @@ PETRA.HQ.prototype.constructTrainingBuildings = function(gameState, queues)
return;
}
// Second range/barracks and stables
// Second barracks/range and stable.
if (numBarracks + numRanges == 1 && this.getAccountedPopulation(gameState) > this.Config.Military.popForBarracks2)
{
let template = numBarracks == 0 ? (barracksTemplate || rangeTemplate) : (rangeTemplate || barracksTemplate);
@ -1971,7 +1971,7 @@ PETRA.HQ.prototype.constructTrainingBuildings = function(gameState, queues)
return;
}
// Then 3rd barracks/range/stables if needed
// Third barracks/range and stable, if needed.
if (numBarracks + numRanges + numStables == 2 && this.getAccountedPopulation(gameState) > this.Config.Military.popForBarracks2 + 30)
{
let template = barracksTemplate || stableTemplate || rangeTemplate;
@ -1989,9 +1989,9 @@ PETRA.HQ.prototype.constructTrainingBuildings = function(gameState, queues)
if (this.currentPhase < 3)
return;
if (this.canBuild(gameState, "structures/{civ}/elephant_stables") && !gameState.getOwnEntitiesByClass("ElephantStable", true).hasEntities())
if (this.canBuild(gameState, "structures/{civ}/elephant_stable") && !gameState.getOwnEntitiesByClass("ElephantStable", true).hasEntities())
{
queues.militaryBuilding.addPlan(new PETRA.ConstructionPlan(gameState, "structures/{civ}/elephant_stables", { "militaryBase": true }));
queues.militaryBuilding.addPlan(new PETRA.ConstructionPlan(gameState, "structures/{civ}/elephant_stable", { "militaryBase": true }));
return;
}

View File

@ -316,7 +316,7 @@ PETRA.ConstructionPlan.prototype.findGoodPosition = function(gameState)
let radius = 0;
if (template.hasClass("Fortress") || template.hasClass("Arsenal") ||
this.type == gameState.applyCiv("structures/{civ}/elephant_stables"))
this.type == gameState.applyCiv("structures/{civ}/elephant_stable"))
radius = Math.floor((template.obstructionRadius().max + 8) / obstructions.cellSize);
else if (template.resourceDropsiteTypes() === undefined && !template.hasClass("House") &&
!template.hasClass("Field") && !template.hasClass("Market"))

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_elephant_stables">
<Entity parent="template_structure_military_elephant_stable">
<Identity>
<Civ>cart</Civ>
</Identity>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_elephant_stables">
<Entity parent="template_structure_military_elephant_stable">
<Identity>
<Civ>kush</Civ>
<SpecificName>Ỉḥ Abu</SpecificName>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_elephant_stables">
<Entity parent="template_structure_military_elephant_stable">
<Identity>
<Civ>maur</Civ>
<SpecificName>Vāraṇaśālā</SpecificName>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_elephant_stables">
<Entity parent="template_structure_military_elephant_stable">
<Identity>
<Civ>pers</Civ>
</Identity>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_elephant_stables">
<Entity parent="template_structure_military_elephant_stable">
<Identity>
<Civ>ptol</Civ>
<SpecificName>Stathmos tōn Elepantōn</SpecificName>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_elephant_stables">
<Entity parent="template_structure_military_elephant_stable">
<Identity>
<Civ>sele</Civ>
<SpecificName>Stathmos tōn Elepantōn</SpecificName>

View File

@ -27,7 +27,7 @@
<SelectionGroupName>template_structure_military_barracks</SelectionGroupName>
<Tooltip>Train Infantry and research Infantry technologies.</Tooltip>
<VisibleClasses datatype="tokens">Village Barracks</VisibleClasses>
<Icon>structures/pers_barracks.png</Icon>
<Icon>structures/barracks.png</Icon>
<RequiredTechnology>phase_village</RequiredTechnology>
</Identity>
<Loot>

View File

@ -21,7 +21,7 @@
</Health>
<Identity>
<GenericName>Elephant Stable</GenericName>
<SelectionGroupName>template_structure_military_elephant_stables</SelectionGroupName>
<SelectionGroupName>template_structure_military_elephant_stable</SelectionGroupName>
<Tooltip>Train Elephants and research Elephant technologies.</Tooltip>
<VisibleClasses datatype="tokens">City ElephantStable</VisibleClasses>
<RequiredTechnology>phase_city</RequiredTechnology>
@ -44,8 +44,8 @@
</ProductionQueue>
<Sound>
<SoundGroups>
<constructed>interface/complete/building/complete_elephant_stables.xml</constructed>
<select>interface/select/building/sel_elephant_stables.xml</select>
<constructed>interface/complete/building/complete_elephant_stable.xml</constructed>
<select>interface/select/building/sel_elephant_stable.xml</select>
</SoundGroups>
</Sound>
<TerritoryInfluence>

View File

@ -24,7 +24,7 @@
<SelectionGroupName>template_structure_military_stable</SelectionGroupName>
<Tooltip>Train Cavalry and research Cavalry technologies.</Tooltip>
<VisibleClasses datatype="tokens">Village Stable</VisibleClasses>
<Icon>structures/pers_stable.png</Icon>
<Icon>structures/stable.png</Icon>
<RequiredTechnology>phase_village</RequiredTechnology>
</Identity>
<Loot>
@ -58,8 +58,8 @@
</ProductionQueue>
<Sound>
<SoundGroups>
<select>interface/select/building/sel_cavalry_stables.xml</select>
<constructed>interface/complete/building/complete_cavalry_stables.xml</constructed>
<select>interface/select/building/sel_stable.xml</select>
<constructed>interface/complete/building/complete_stable.xml</constructed>
</SoundGroups>
</Sound>
<Vision>

View File

@ -31,7 +31,7 @@
structures/{civ}/dock
structures/{civ}/barracks
structures/{civ}/stable
structures/{civ}/elephant_stables
structures/{civ}/elephant_stable
structures/{civ}/arsenal
structures/{civ}/forge
structures/{civ}/temple

View File

@ -33,7 +33,7 @@
structures/{civ}/dock
structures/{civ}/barracks
structures/{civ}/stable
structures/{civ}/elephant_stables
structures/{civ}/elephant_stable
structures/{civ}/arsenal
structures/{civ}/forge
structures/{civ}/temple

View File

@ -15,7 +15,7 @@
structures/{civ}/dock
structures/{civ}/barracks
structures/{civ}/stable
structures/{civ}/elephant_stables
structures/{civ}/elephant_stable
structures/{civ}/arsenal
structures/{civ}/forge
structures/{civ}/temple