diff --git a/binaries/data/mods/public/maps/skirmishes/Acropolis Bay (2).xml b/binaries/data/mods/public/maps/skirmishes/Acropolis Bay (2).xml
index 05500c3..f164040 100644
a
|
b
|
|
27788 | 27788 | </Entity> |
27789 | 27789 | </Entities> |
27790 | 27790 | <Paths/> |
27791 | | </Scenario> |
27792 | | No newline at end of file |
| 27791 | </Scenario> |
diff --git a/binaries/data/mods/public/simulation/components/Player.js b/binaries/data/mods/public/simulation/components/Player.js
index 6533801..045d0af 100644
a
|
b
|
Player.prototype.Init = function()
|
23 | 23 | { "goods": "wood", "proba": 30 }, |
24 | 24 | { "goods": "stone", "proba": 35 }, |
25 | 25 | { "goods": "metal", "proba": 35 } ]; |
| 26 | this.startingTech = []; |
| 27 | this.disabledTech = []; |
26 | 28 | this.team = -1; // team number of the player, players on the same team will always have ally diplomatic status - also this is useful for team emblems, scoring, etc. |
27 | 29 | this.teamsLocked = false; |
28 | 30 | this.state = "active"; // game state - one of "active", "defeated", "won" |
… |
… |
Player.prototype.SetTradingGoods = function(tradingGoods)
|
319 | 321 | this.tradingGoods.push( {"goods": resource, "proba": tradingGoods[resource]} ); |
320 | 322 | }; |
321 | 323 | |
| 324 | Player.prototype.SetStartingTech = function(tech) |
| 325 | { |
| 326 | this.startingTech = tech; |
| 327 | }; |
| 328 | |
| 329 | Player.prototype.SetDisabledTech = function(tech) |
| 330 | { |
| 331 | this.disabledTech = tech; |
| 332 | }; |
| 333 | |
| 334 | Player.prototype.GetStartingTech = function(tech) |
| 335 | { |
| 336 | return this.startingTech; |
| 337 | }; |
| 338 | |
| 339 | Player.prototype.GetDisabledTech = function(tech) |
| 340 | { |
| 341 | return this.disabledTech; |
| 342 | }; |
| 343 | |
322 | 344 | Player.prototype.GetState = function() |
323 | 345 | { |
324 | 346 | return this.state; |
diff --git a/binaries/data/mods/public/simulation/components/ProductionQueue.js b/binaries/data/mods/public/simulation/components/ProductionQueue.js
index 6cc47d6..e12e268 100644
a
|
b
|
ProductionQueue.prototype.GetTechnologiesList = function()
|
146 | 146 | if (!cmpTechnologyManager) |
147 | 147 | return []; |
148 | 148 | |
| 149 | var cmpPlayer = QueryOwnerInterface(this.entity, IID_Player); |
| 150 | var disabledTech = cmpPlayer.GetDisabledTech(); |
| 151 | |
149 | 152 | var techs = string.split(/\s+/); |
150 | 153 | var techList = []; |
151 | 154 | var superseded = {}; // Stores the tech which supersedes the key |
… |
… |
ProductionQueue.prototype.GetTechnologiesList = function()
|
155 | 158 | for (var i in techs) |
156 | 159 | { |
157 | 160 | var tech = techs[i]; |
158 | | var template = cmpTechnologyManager.GetTechnologyTemplate(tech); |
159 | | if (!template.supersedes || techs.indexOf(template.supersedes) === -1) |
160 | | techList.push(tech); |
161 | | else |
162 | | superseded[template.supersedes] = tech; |
| 161 | if(disabledTech.indexOf(tech)==-1){ |
| 162 | var template = cmpTechnologyManager.GetTechnologyTemplate(tech); |
| 163 | if (!template.supersedes || techs.indexOf(template.supersedes) === -1) |
| 164 | techList.push(tech); |
| 165 | else |
| 166 | superseded[template.supersedes] = tech; |
| 167 | } |
163 | 168 | } |
164 | 169 | |
165 | 170 | // Now make researched/in progress techs invisible |
diff --git a/binaries/data/mods/public/simulation/helpers/Player.js b/binaries/data/mods/public/simulation/helpers/Player.js
index 22207ce..9c41f9f 100644
a
|
b
|
function LoadPlayerSettings(settings, newPlayers)
|
90 | 90 | |
91 | 91 | if (getSetting(pData, pDefs, "Resources") !== undefined) |
92 | 92 | cmpPlayer.SetResourceCounts(getSetting(pData, pDefs, "Resources")); |
| 93 | |
| 94 | if (getSetting(pData, pDefs, "StartingTech") !== undefined) |
| 95 | cmpPlayer.SetStartingTech(getSetting(pData, pDefs, "StartingTech")); |
| 96 | |
| 97 | var startingTech = cmpPlayer.GetStartingTech(); |
| 98 | var cmpTechnologyManager = Engine.QueryInterface(cmpPlayerManager.GetPlayerByID(i), IID_TechnologyManager); |
| 99 | for(var j in startingTech){ |
| 100 | cmpTechnologyManager.ResearchTechnology(startingTech[j]); |
| 101 | } |
| 102 | |
| 103 | if (getSetting(pData, pDefs, "DisabledTech") !== undefined) |
| 104 | cmpPlayer.SetDisabledTech(getSetting(pData, pDefs, "DisabledTech")); |
93 | 105 | |
94 | 106 | // If diplomacy explicitly defined, use that; otherwise use teams |
95 | 107 | if (getSetting(pData, pDefs, "Diplomacy") !== undefined) |