diff --git a/binaries/data/mods/official/entities/template_entity.xml b/binaries/data/mods/official/entities/template_entity.xml index 7876ed7062..8ae19a1a03 100755 --- a/binaries/data/mods/official/entities/template_entity.xml +++ b/binaries/data/mods/official/entities/template_entity.xml @@ -27,25 +27,25 @@ - -1.0 - 20 - 2.0 - 0.2 - 15.0 - 0.2 + -1.0 + 20 + 2.0 + 0.2 + 15.0 + 0.2 - 7 - 28 - bar.dds + 7 + 28 + bar.dds 0.0 - -1.0 - 20 - 2.0 - 7 - 28 - bar.dds + -1.0 + 20 + 2.0 + 7 + 28 + bar.dds 7.0 @@ -59,10 +59,10 @@ 7.0 - + 6 .2 - + 1.0 @@ -78,11 +78,11 @@ false bar.dds - 0.15 + 0.15 - false + false diff --git a/binaries/data/mods/official/entities/template_foundation.xml b/binaries/data/mods/official/entities/template_foundation.xml index 7eddb6d3f4..1a68e07def 100644 --- a/binaries/data/mods/official/entities/template_foundation.xml +++ b/binaries/data/mods/official/entities/template_foundation.xml @@ -16,8 +16,8 @@ - 6.0 - 0.0 + 6.0 + 0.0 diff --git a/binaries/data/mods/official/entities/template_structure.xml b/binaries/data/mods/official/entities/template_structure.xml index 0499c3047b..396defe8ac 100644 --- a/binaries/data/mods/official/entities/template_structure.xml +++ b/binaries/data/mods/official/entities/template_structure.xml @@ -18,6 +18,7 @@ + Allied 0 @@ -27,7 +28,7 @@ - 12.0 + 12.0 diff --git a/binaries/data/mods/official/entities/template_structure_civic_civil_centre.xml b/binaries/data/mods/official/entities/template_structure_civic_civil_centre.xml index 340b1c7f47..e5c93043a0 100644 --- a/binaries/data/mods/official/entities/template_structure_civic_civil_centre.xml +++ b/binaries/data/mods/official/entities/template_structure_civic_civil_centre.xml @@ -19,9 +19,12 @@ - foundation_5x5 - Settlement + + All + foundation_5x5 + Settlement + 24.0 diff --git a/binaries/data/mods/official/entities/template_structure_civic_house.xml b/binaries/data/mods/official/entities/template_structure_civic_house.xml index 146ae16317..d7e808c500 100644 --- a/binaries/data/mods/official/entities/template_structure_civic_house.xml +++ b/binaries/data/mods/official/entities/template_structure_civic_house.xml @@ -19,7 +19,9 @@ - foundation_2x2 + + foundation_2x2 + 9.0 diff --git a/binaries/data/mods/official/entities/template_structure_civic_temple.xml b/binaries/data/mods/official/entities/template_structure_civic_temple.xml index 860a36cd60..4bd53503e2 100644 --- a/binaries/data/mods/official/entities/template_structure_civic_temple.xml +++ b/binaries/data/mods/official/entities/template_structure_civic_temple.xml @@ -19,8 +19,10 @@ - foundation_3x3 - + + foundation_3x3 + + 12.0 12.0 diff --git a/binaries/data/mods/official/entities/template_structure_defense_scout_tower.xml b/binaries/data/mods/official/entities/template_structure_defense_scout_tower.xml index 8ba61986e7..7aa90444ca 100644 --- a/binaries/data/mods/official/entities/template_structure_defense_scout_tower.xml +++ b/binaries/data/mods/official/entities/template_structure_defense_scout_tower.xml @@ -19,8 +19,10 @@ - foundation_1x1 - + + foundation_1x1 + + 6.0 6.0 diff --git a/binaries/data/mods/official/entities/template_structure_defense_wall.xml b/binaries/data/mods/official/entities/template_structure_defense_wall.xml index f313015675..ab94e6c541 100644 --- a/binaries/data/mods/official/entities/template_structure_defense_wall.xml +++ b/binaries/data/mods/official/entities/template_structure_defense_wall.xml @@ -19,7 +19,9 @@ - foundation_1x1 + + foundation_1x1 + 6.0 diff --git a/binaries/data/mods/official/entities/template_structure_defense_wall_gate.xml b/binaries/data/mods/official/entities/template_structure_defense_wall_gate.xml index 5cd2b92185..b835c7facd 100644 --- a/binaries/data/mods/official/entities/template_structure_defense_wall_gate.xml +++ b/binaries/data/mods/official/entities/template_structure_defense_wall_gate.xml @@ -19,7 +19,9 @@ - foundation_1x1 + + foundation_1x1 + 6.0 diff --git a/binaries/data/mods/official/entities/template_structure_defense_wall_tower.xml b/binaries/data/mods/official/entities/template_structure_defense_wall_tower.xml index 7e958da8c6..9f08872511 100644 --- a/binaries/data/mods/official/entities/template_structure_defense_wall_tower.xml +++ b/binaries/data/mods/official/entities/template_structure_defense_wall_tower.xml @@ -19,7 +19,9 @@ - foundation_1x1 + + foundation_1x1 + 6.0 diff --git a/binaries/data/mods/official/entities/template_structure_economic_farmstead.xml b/binaries/data/mods/official/entities/template_structure_economic_farmstead.xml index 20fe8aae5c..48b53e4ba9 100644 --- a/binaries/data/mods/official/entities/template_structure_economic_farmstead.xml +++ b/binaries/data/mods/official/entities/template_structure_economic_farmstead.xml @@ -17,7 +17,9 @@ - foundation_3x3 + + foundation_3x3 + 12.0 diff --git a/binaries/data/mods/official/entities/template_structure_economic_market.xml b/binaries/data/mods/official/entities/template_structure_economic_market.xml index 141c2bcb44..6f6d103baf 100644 --- a/binaries/data/mods/official/entities/template_structure_economic_market.xml +++ b/binaries/data/mods/official/entities/template_structure_economic_market.xml @@ -19,8 +19,10 @@ - foundation_4x4 - + + foundation_4x4 + + 18.0 18.0 diff --git a/binaries/data/mods/official/entities/template_structure_economic_mill.xml b/binaries/data/mods/official/entities/template_structure_economic_mill.xml index 2e0a23bdb8..79bb855eb5 100644 --- a/binaries/data/mods/official/entities/template_structure_economic_mill.xml +++ b/binaries/data/mods/official/entities/template_structure_economic_mill.xml @@ -19,7 +19,10 @@ - foundation_3x3 + + All + foundation_3x3 + 12.0 diff --git a/binaries/data/mods/official/entities/template_structure_gaia_settlement.xml b/binaries/data/mods/official/entities/template_structure_gaia_settlement.xml index 6a008e9bbd..09067dbbf2 100644 --- a/binaries/data/mods/official/entities/template_structure_gaia_settlement.xml +++ b/binaries/data/mods/official/entities/template_structure_gaia_settlement.xml @@ -22,7 +22,7 @@ - true + true 24.0 diff --git a/binaries/data/mods/official/entities/template_structure_military_barracks.xml b/binaries/data/mods/official/entities/template_structure_military_barracks.xml index dd0a403dc6..d0a196ca87 100644 --- a/binaries/data/mods/official/entities/template_structure_military_barracks.xml +++ b/binaries/data/mods/official/entities/template_structure_military_barracks.xml @@ -19,7 +19,9 @@ - foundation_4x4 + + foundation_4x4 + 18.0 diff --git a/binaries/data/mods/official/entities/template_structure_military_dock.xml b/binaries/data/mods/official/entities/template_structure_military_dock.xml index 9b03ecb3dc..9822b1ade2 100644 --- a/binaries/data/mods/official/entities/template_structure_military_dock.xml +++ b/binaries/data/mods/official/entities/template_structure_military_dock.xml @@ -19,7 +19,9 @@ - foundation_4x4 + + foundation_4x4 + 18.0 diff --git a/binaries/data/mods/official/entities/template_structure_military_fortress.xml b/binaries/data/mods/official/entities/template_structure_military_fortress.xml index fa2eaf8948..30fdf1521c 100644 --- a/binaries/data/mods/official/entities/template_structure_military_fortress.xml +++ b/binaries/data/mods/official/entities/template_structure_military_fortress.xml @@ -19,7 +19,9 @@ - foundation_5x5 + + foundation_5x5 + 24.0 diff --git a/binaries/data/mods/official/entities/template_structure_resource_corral.xml b/binaries/data/mods/official/entities/template_structure_resource_corral.xml index 4be0ea4bd2..1c698eb2c7 100644 --- a/binaries/data/mods/official/entities/template_structure_resource_corral.xml +++ b/binaries/data/mods/official/entities/template_structure_resource_corral.xml @@ -19,7 +19,9 @@ - foundation_3x3 + + foundation_3x3 + 12.0 diff --git a/binaries/data/mods/official/entities/template_structure_resource_field.xml b/binaries/data/mods/official/entities/template_structure_resource_field.xml index f11f7c5bab..ebb27faa07 100644 --- a/binaries/data/mods/official/entities/template_structure_resource_field.xml +++ b/binaries/data/mods/official/entities/template_structure_resource_field.xml @@ -19,7 +19,9 @@ - foundation_3x3 + + foundation_3x3 + 12.0 diff --git a/binaries/data/mods/official/entities/template_structure_special.xml b/binaries/data/mods/official/entities/template_structure_special.xml index 3c12c459c3..4d241feef7 100644 --- a/binaries/data/mods/official/entities/template_structure_special.xml +++ b/binaries/data/mods/official/entities/template_structure_special.xml @@ -19,7 +19,9 @@ - foundation_5x5 + + foundation_5x5 + 24.0 diff --git a/binaries/data/mods/official/entities/template_unit.xml b/binaries/data/mods/official/entities/template_unit.xml index b6cd0f8daf..798186bc53 100644 --- a/binaries/data/mods/official/entities/template_unit.xml +++ b/binaries/data/mods/official/entities/template_unit.xml @@ -48,14 +48,14 @@ 100 - 5.0 + 5.0 20 5.0 - 5.3 + 5.3 20 @@ -93,11 +93,11 @@ 50.0 0.0 - 0.1 - 0.2 + 0.1 + 0.2 - true + true diff --git a/binaries/data/mods/official/entities/template_unit_cavalry.xml b/binaries/data/mods/official/entities/template_unit_cavalry.xml index 51f57ccfdb..cfcb30b478 100644 --- a/binaries/data/mods/official/entities/template_unit_cavalry.xml +++ b/binaries/data/mods/official/entities/template_unit_cavalry.xml @@ -24,7 +24,7 @@ - 0.2 + 0.2 diff --git a/binaries/data/mods/official/entities/template_unit_hero.xml b/binaries/data/mods/official/entities/template_unit_hero.xml index 7748763afc..7436ad84b7 100644 --- a/binaries/data/mods/official/entities/template_unit_hero.xml +++ b/binaries/data/mods/official/entities/template_unit_hero.xml @@ -20,7 +20,7 @@ - 0.2 + 0.2 diff --git a/binaries/data/mods/official/entities/template_unit_infantry.xml b/binaries/data/mods/official/entities/template_unit_infantry.xml index 3e34936050..e2a9c40b92 100644 --- a/binaries/data/mods/official/entities/template_unit_infantry.xml +++ b/binaries/data/mods/official/entities/template_unit_infantry.xml @@ -19,7 +19,7 @@ - 0.2 + 0.2 diff --git a/binaries/data/mods/official/entities/template_unit_mechanical_ship.xml b/binaries/data/mods/official/entities/template_unit_mechanical_ship.xml index 0b416d39b9..53267b03e2 100644 --- a/binaries/data/mods/official/entities/template_unit_mechanical_ship.xml +++ b/binaries/data/mods/official/entities/template_unit_mechanical_ship.xml @@ -23,11 +23,11 @@ - 12.0 + 12.0 - 12.3 + 12.3 diff --git a/binaries/data/mods/official/entities/template_unit_super.xml b/binaries/data/mods/official/entities/template_unit_super.xml index 704605e465..a26d4fe424 100644 --- a/binaries/data/mods/official/entities/template_unit_super.xml +++ b/binaries/data/mods/official/entities/template_unit_super.xml @@ -14,7 +14,7 @@ - 0.2 + 0.2 diff --git a/binaries/data/mods/official/entities/template_unit_support.xml b/binaries/data/mods/official/entities/template_unit_support.xml index c124e6f4f5..652604936e 100644 --- a/binaries/data/mods/official/entities/template_unit_support.xml +++ b/binaries/data/mods/official/entities/template_unit_support.xml @@ -14,7 +14,7 @@ - 0.2 + 0.2 diff --git a/binaries/data/mods/official/scripts/entity_functions.js b/binaries/data/mods/official/scripts/entity_functions.js index 2200448d6a..cfe637b9d8 100644 --- a/binaries/data/mods/official/scripts/entity_functions.js +++ b/binaries/data/mods/official/scripts/entity_functions.js @@ -106,9 +106,9 @@ function entityInit() id.civ = building.traits.id.civ; id.icon_cell = building.traits.id.icon_cell; this.traits.health.max = building.traits.health.max; - this.build_points = new Object(); - this.build_points.curr = 0.0; - this.build_points.max = parseFloat( building.traits.creation.time ); + this.buildPoints = new Object(); + this.buildPoints.curr = 0.0; + this.buildPoints.max = parseFloat( building.traits.creation.time ); } // Generate civ code (1st four characters of civ name, in lower case eg "Carthaginians" => "cart"). @@ -149,17 +149,17 @@ function entityInit() if (supply.type && !supply.subType) supply.subType = supply.type; - // The "dropsite_count" array holds the number of units with gather aura in range of the object; + // The "dropsiteCount" array holds the number of units with gather aura in range of the object; // this is important so that if you have two mills near something and one of them is destroyed, // you can still gather from the thing. Initialize it to 0 (ungatherable) for every player unless // the entity is forageable (e.g. for huntable animals). - var dropsite_count = new Array(); + var dropsiteCount = new Array(); initialCount = supply.subType.meat ? 1 : 0; for( i=0; i<=8; i++ ) { - dropsite_count[i] = initialCount; + dropsiteCount[i] = initialCount; } - supply.dropsite_count = dropsite_count; + supply.dropsiteCount = dropsiteCount; } if (!this.traits.promotion) @@ -186,7 +186,7 @@ function entityInit() if( this.actions ) { if ( this.actions.move && this.actions.move.speed ) - this.actions.move.speed_curr = this.actions.move.speed; + this.actions.move.speedCurr = this.actions.move.speed; if( this.actions.attack && this.actions.attack.melee ) { @@ -321,17 +321,17 @@ function entityInitQuasi() if (supply.type && !supply.subType) supply.subType = supply.type; - // The "dropsite_count" array holds the number of units with gather aura in range of the object; + // The "dropsiteCount" array holds the number of units with gather aura in range of the object; // this is important so that if you have two mills near something and one of them is destroyed, // you can still gather from the thing. Initialize it to 0 (ungatherable) for every player unless // the entity is forageable (e.g. for huntable animals). - var dropsite_count = new Array(); + var dropsiteCount = new Array(); initialCount = supply.subType.meat ? 1 : 0; for( i=0; i<=8; i++ ) { - dropsite_count[i] = initialCount; + dropsiteCount[i] = initialCount; } - supply.dropsite_count = dropsite_count; + supply.dropsiteCount = dropsiteCount; } stopXTimer(6); @@ -530,7 +530,7 @@ function foundationDestroyed( evt ) { //console.write( "Hari Seldon made a small calculation error." ); - var bp = this.build_points; + var bp = this.buildPoints; var fractionToReturn = (bp.max - bp.curr) / bp.max; var resources = getEntityTemplate( this.building, this.player ).traits.creation.resource; @@ -546,7 +546,7 @@ function foundationDestroyed( evt ) function performAttack( evt ) { - this.last_combat_time = getGameTime(); + this.lastCombatTime = getGameTime(); var curr_hit = getGUIGlobal().newRandomSound("voice", "hit", this.traits.audio.path); curr_hit.play(); @@ -571,9 +571,9 @@ function performAttack( evt ) } // Add flank penalty - if(evt.target.traits.flank_penalty) + if(evt.target.traits.flankPenalty) { - var flank = (evt.target.getAttackDirections()-1)*evt.target.traits.flank_penalty.value; + var flank = (evt.target.getAttackDirections()-1)*evt.target.traits.flankPenalty.value; dmg.crush += dmg.crush * flank; dmg.hack += dmg.hack * flank; dmg.pierce += dmg.pierce * flank; @@ -587,7 +587,7 @@ function performAttack( evt ) function performAttackRanged( evt ) { - this.last_combat_time = getGameTime(); + this.lastCombatTime = getGameTime(); // Create a projectile from us, to the target, that will do some damage when it hits them. dmg = new DamageType(); @@ -603,9 +603,9 @@ function performAttackRanged( evt ) dmg.hack += dmg.hack * elevationBonus; dmg.pierce += dmg.pierce * elevationBonus; - if(evt.target.traits.flank_penalty) + if(evt.target.traits.flankPenalty) { - var flank = (evt.target.getAttackDirections()-1)*evt.target.traits.flank_penalty.value; + var flank = (evt.target.getAttackDirections()-1)*evt.target.traits.flankPenalty.value; dmg.crush += dmg.crush * flank; dmg.hack += dmg.hack * flank; dmg.pierce += dmg.pierce * flank; @@ -681,7 +681,7 @@ function performGather( evt ) g = this.actions.gather; s = evt.target.traits.supply; - if( !s.dropsite_count[this.player.id] ) + if( !s.dropsiteCount[this.player.id] ) { // Entity has become ungatherable for us, probably meaning our mill near it was killed; cancel order evt.preventDefault(); @@ -780,7 +780,7 @@ function performBuild( evt ) var t = evt.target; var b = this.actions.build; - var bp = t.build_points; + var bp = t.buildPoints; var hp = t.traits.health; var points = parseFloat( b.rate ) * parseFloat( b.speed ) / 1000.0; @@ -852,7 +852,7 @@ function damage( dmg, inflictor ) { if(!this.traits.armour) return; // corpses have no armour, everything else should - this.last_combat_time = getGameTime(); + this.lastCombatTime = getGameTime(); // Apply armour and work out how much damage we actually take crushDamage = parseInt(dmg.crush - this.traits.armour.value * this.traits.armour.crush); @@ -1073,15 +1073,15 @@ function entityEventMovement( evt ) { sector += ((divs+1)/2 - sector)*2; sector -= (divs+1)/2; - this.actions.move.speed_curr = this.actions.move.speed; - this.actions.move.speed_curr += this.actions.move.speed*this.traits.pitch.value*sector; + this.actions.move.speedCurr = this.actions.move.speed; + this.actions.move.speedCurr += this.actions.move.speed*this.traits.pitch.value*sector; } else { sector += ((divs)/2 - sector)*2; sector -= (divs)/2; - this.actions.move.speed_curr = this.actions.move.speed; - this.actions.move.speed_curr += this.actions.move.speed*this.traits.pitch.value*sector; + this.actions.move.speedCurr = this.actions.move.speed; + this.actions.move.speedCurr += this.actions.move.speed*this.traits.pitch.value*sector; } } @@ -1726,7 +1726,7 @@ function canGather( source, target ) return ( g && s && g.resource && g.resource[s.type] && ( s.subType==s.type || g.resource[s.type][s.subType] ) && ( s.curr > 0 || s.max == 0 ) && - s.dropsite_count[source.player.id] ); + s.dropsiteCount[source.player.id] ); } // ==================================================================== @@ -1826,7 +1826,7 @@ function DropsiteAura( source, types ) if( this.affects( e ) ) { //console.write( "Dropsite aura: adding +1 for " + this.source.player.id + " on " + e ); - e.traits.supply.dropsite_count[this.source.player.id]++; + e.traits.supply.dropsiteCount[this.source.player.id]++; } }; @@ -1835,7 +1835,7 @@ function DropsiteAura( source, types ) if( this.affects( e ) ) { //console.write( "Dropsite aura: adding -1 for " + this.source.player.id + " on " + e ); - e.traits.supply.dropsite_count[this.source.player.id]--; + e.traits.supply.dropsiteCount[this.source.player.id]--; } }; } @@ -1975,7 +1975,7 @@ function TrampleAura( source ) // Check if the target is an enemy foot unit with health and if we were running in the last 3 seconds var a = this.source.traits.auras.trample; return ( e.player.id != this.source.player.id && e.traits.health && e.hasClass("Foot") - && (getGameTime() - this.source.last_run_time < a.duration) ); + && (getGameTime() - this.source.lastRunTime < a.duration) ); } this.onTick = function( e ) @@ -1990,9 +1990,9 @@ function TrampleAura( source ) dmg.pierce = parseInt(a.damage * a.pierce); // Add flank bonus - if(e.traits.flank_penalty) + if(e.traits.flankPenalty) { - var flank = (e.getAttackDirections()-1)*e.traits.flank_penalty.value; + var flank = (e.getAttackDirections()-1)*e.traits.flankPenalty.value; dmg.crush += dmg.crush * flank; dmg.hack += dmg.hack * flank; dmg.pierce += dmg.pierce * flank;