Index: binaries/data/mods/public/simulation/components/Player.js
===================================================================
--- binaries/data/mods/public/simulation/components/Player.js (révision 17782)
+++ binaries/data/mods/public/simulation/components/Player.js (copie de travail)
@@ -144,7 +144,7 @@
Player.prototype.GetMaxPopulation = function()
{
- return Math.round(ApplyValueModificationsToPlayer("Player/MaxPopulation", this.maxPop, this.entity));
+ return Math.round(ApplyValueModificationsToPlayer("Player/MaxPopulation", this.maxPop, this.entity, this.playerID));
};
Player.prototype.SetGatherRateMultiplier = function(value)
Index: binaries/data/mods/public/simulation/helpers/ValueModification.js
===================================================================
--- binaries/data/mods/public/simulation/helpers/ValueModification.js (révision 17782)
+++ binaries/data/mods/public/simulation/helpers/ValueModification.js (copie de travail)
@@ -1,4 +1,4 @@
-// Little helper functions to make applying technology more convenient
+// Little helper functions to make applying technology and auras more convenient
function ApplyValueModificationsToEntity(tech_type, current_value, entity)
{
@@ -13,14 +13,19 @@
return cmpAuraManager.ApplyModifications(tech_type, value, entity);
}
-function ApplyValueModificationsToPlayer(tech_type, current_value, player_entity)
+function ApplyValueModificationsToPlayer(tech_type, current_value, playerEntity,playerID)
{
- let cmpTechnologyManager = Engine.QueryInterface(player_entity, IID_TechnologyManager);
-
- if (!cmpTechnologyManager)
- return current_value;
-
- return cmpTechnologyManager.ApplyModifications(tech_type, current_value, player_entity);
+ let value = current_value;
+ let cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager);
+ let entityTemplateName = cmpTemplateManager.GetCurrentTemplateName(playerEntity);
+ let entityTemplate = cmpTemplateManager.GetTemplate(entityTemplateName);
+ let cmpTechnologyManager = QueryPlayerIDInterface(playerID, IID_TechnologyManager);
+ if (cmpTechnologyManager)
+ value = cmpTechnologyManager.ApplyModificationsTemplate(tech_type, current_value, entityTemplate);
+ let cmpAuraManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_AuraManager);
+ if (!cmpAuraManager)
+ return value;
+ return cmpAuraManager.ApplyTemplateModifications(tech_type, value, playerID, entityTemplate);
}
function ApplyValueModificationsToTemplate(tech_type, current_value, playerID, template)
Index: binaries/data/mods/public/simulation/templates/special/player.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/special/player.xml (révision 17782)
+++ binaries/data/mods/public/simulation/templates/special/player.xml (copie de travail)
@@ -48,8 +48,13 @@
+
+
+ Player
+ Player
+
- unlock_shared_los
+ unlock_shared_los
Index: binaries/data/mods/public/simulation/templates/template_structure_wonder.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_structure_wonder.xml (révision 17782)
+++ binaries/data/mods/public/simulation/templates/template_structure_wonder.xml (copie de travail)
@@ -10,20 +10,31 @@
2
+
+
+ global
+ Player
+
+ 50
+
+ Glorious Expansion
+ +50 maximum population cap.
+
+
Wonder
- 1500
+ 2000
5.0
1000
- 0
- 1000
- 1000
- 1000
+ 3000
+ 4000
+ 1500
+ 1500
@@ -30,7 +41,14 @@
10.0
-
+
+ 20
+ 0.1
+ Unit
+ Support Infantry Cavalry
+ 1
+ 1
+
5000
rubble/rubble_stone_6x6
@@ -41,7 +59,7 @@
City
Wonder
-
+
structures/wonder.png
phase_city
@@ -55,12 +73,6 @@
-
- 0.7
-
- pop_wonder
-
-