Some more vars
This was SVN commit r13408.
This commit is contained in:
parent
1ea0bac280
commit
09108e6a97
@ -183,7 +183,7 @@ var nbCreeks = scaleByMapSize(6,15);
|
||||
var islandX = [SardiniaX,CorsicaX];
|
||||
var islandZ = [SardiniaZ,CorsicaZ];
|
||||
// first: the creeks
|
||||
for (island = 0; island <= 1; island++)
|
||||
for (var island = 0; island <= 1; island++)
|
||||
for (var i = 0; i <= nbCreeks; i++)
|
||||
{
|
||||
var radius = fractionToTiles( (Math.random()/17) + 0.49);
|
||||
@ -206,7 +206,7 @@ for (island = 0; island <= 1; island++)
|
||||
}
|
||||
|
||||
var nbBeaches = scaleByMapSize(2,5);
|
||||
for (island = 0; island <= 1; island++)
|
||||
for (var island = 0; island <= 1; island++)
|
||||
{
|
||||
for (var i = 0; i <= nbBeaches; i++)
|
||||
{
|
||||
|
@ -640,7 +640,7 @@ EconomyManager.prototype.updateResourceMaps = function(gameState, events) {
|
||||
}
|
||||
} else if (ent && ent.position() && ent.resourceDropsiteTypes) {
|
||||
var resources = ent.resourceDropsiteTypes();
|
||||
for (i in resources) {
|
||||
for (var i in resources) {
|
||||
var resource = resources[i];
|
||||
needUpdate[resource] = true;
|
||||
}
|
||||
|
@ -273,14 +273,14 @@ MilitaryAttackManager.prototype.ungarrisonAll = function(gameState) {
|
||||
};
|
||||
|
||||
MilitaryAttackManager.prototype.pausePlan = function(gameState, planName) {
|
||||
for (attackType in this.upcomingAttacks) {
|
||||
for (var attackType in this.upcomingAttacks) {
|
||||
for (var i in this.upcomingAttacks[attackType]) {
|
||||
var attack = this.upcomingAttacks[attackType][i];
|
||||
if (attack.getName() == planName)
|
||||
attack.setPaused(gameState, true);
|
||||
}
|
||||
}
|
||||
for (attackType in this.startedAttacks) {
|
||||
for (var attackType in this.startedAttacks) {
|
||||
for (var i in this.startedAttacks[attackType]) {
|
||||
var attack = this.startedAttacks[attackType][i];
|
||||
if (attack.getName() == planName)
|
||||
@ -289,14 +289,14 @@ MilitaryAttackManager.prototype.pausePlan = function(gameState, planName) {
|
||||
}
|
||||
}
|
||||
MilitaryAttackManager.prototype.unpausePlan = function(gameState, planName) {
|
||||
for (attackType in this.upcomingAttacks) {
|
||||
for (var attackType in this.upcomingAttacks) {
|
||||
for (var i in this.upcomingAttacks[attackType]) {
|
||||
var attack = this.upcomingAttacks[attackType][i];
|
||||
if (attack.getName() == planName)
|
||||
attack.setPaused(gameState, false);
|
||||
}
|
||||
}
|
||||
for (attackType in this.startedAttacks) {
|
||||
for (var attackType in this.startedAttacks) {
|
||||
for (var i in this.startedAttacks[attackType]) {
|
||||
var attack = this.startedAttacks[attackType][i];
|
||||
if (attack.getName() == planName)
|
||||
@ -305,13 +305,13 @@ MilitaryAttackManager.prototype.unpausePlan = function(gameState, planName) {
|
||||
}
|
||||
}
|
||||
MilitaryAttackManager.prototype.pauseAllPlans = function(gameState) {
|
||||
for (attackType in this.upcomingAttacks) {
|
||||
for (var attackType in this.upcomingAttacks) {
|
||||
for (var i in this.upcomingAttacks[attackType]) {
|
||||
var attack = this.upcomingAttacks[attackType][i];
|
||||
attack.setPaused(gameState, true);
|
||||
}
|
||||
}
|
||||
for (attackType in this.startedAttacks) {
|
||||
for (var attackType in this.startedAttacks) {
|
||||
for (var i in this.startedAttacks[attackType]) {
|
||||
var attack = this.startedAttacks[attackType][i];
|
||||
attack.setPaused(gameState, true);
|
||||
@ -319,13 +319,13 @@ MilitaryAttackManager.prototype.pauseAllPlans = function(gameState) {
|
||||
}
|
||||
}
|
||||
MilitaryAttackManager.prototype.unpauseAllPlans = function(gameState) {
|
||||
for (attackType in this.upcomingAttacks) {
|
||||
for (var attackType in this.upcomingAttacks) {
|
||||
for (var i in this.upcomingAttacks[attackType]) {
|
||||
var attack = this.upcomingAttacks[attackType][i];
|
||||
attack.setPaused(gameState, false);
|
||||
}
|
||||
}
|
||||
for (attackType in this.startedAttacks) {
|
||||
for (var attackType in this.startedAttacks) {
|
||||
for (var i in this.startedAttacks[attackType]) {
|
||||
var attack = this.startedAttacks[attackType][i];
|
||||
attack.setPaused(gameState, false);
|
||||
@ -351,7 +351,7 @@ MilitaryAttackManager.prototype.update = function(gameState, queues, events) {
|
||||
Engine.ProfileStart("Looping through attack plans");
|
||||
// TODO: implement some form of check before starting a new attack plans. Sometimes it is not the priority.
|
||||
if (1) {
|
||||
for (attackType in this.upcomingAttacks) {
|
||||
for (var attackType in this.upcomingAttacks) {
|
||||
for (var i = 0;i < this.upcomingAttacks[attackType].length; ++i) {
|
||||
|
||||
var attack = this.upcomingAttacks[attackType][i];
|
||||
@ -403,7 +403,7 @@ MilitaryAttackManager.prototype.update = function(gameState, queues, events) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (attackType in this.startedAttacks) {
|
||||
for (var attackType in this.startedAttacks) {
|
||||
for (var i = 0; i < this.startedAttacks[attackType].length; ++i) {
|
||||
var attack = this.startedAttacks[attackType][i];
|
||||
// okay so then we'll update the attack.
|
||||
|
Loading…
Reference in New Issue
Block a user