Ticket #3707: gate.patch

File gate.patch, 5.5 KB (added by mimo, 8 years ago)
  • binaries/data/mods/public/globalscripts/Templates.js

     
    265265    if (template.WallPiece)
    266266        ret.wallPiece = {"length": +template.WallPiece.Length};
    267267
     268    if (template.Gate)
     269        ret.gate = true;
     270
    268271    return ret;
    269272}
    270273
  • binaries/data/mods/public/gui/common/tooltips.js

     
    279279
    280280    let totalCosts = multiplyEntityCosts(template, trainNum);
    281281    totalCosts.time = Math.ceil(template.cost.time * (entity ? Engine.GuiInterfaceCall("GetBatchTime", { "entity": entity, "batchSize": trainNum }) : 1));
     282    // build time does not apply for gates (conversion of walls)
     283    if (template.gate)
     284        totalCosts.time = 0;
    282285
    283286    let costs = [];
    284287    if (totalCosts.food) costs.push(sprintf(translate("%(component)s %(cost)s"), { "component": getCostComponentDisplayName("food"), "cost": totalCosts.food }));
  • binaries/data/mods/public/simulation/templates/template_structure_defense_wall.xml

     
    11<?xml version="1.0" encoding="utf-8"?>
    22<Entity parent="template_structure_defense">
    33  <BuildRestrictions>
    4     <PlacementType>land-shore</PlacementType>
     4    <PlacementType>land-shore</PlacementType>
    55    <Category>Wall</Category>
    66  </BuildRestrictions>
    77  <Capturable disable=""/>
     8  <Repairable>
     9    <RepairTimeRatio>4.5</RepairTimeRatio>
     10  </Repairable>
    811  <Cost>
    912    <BuildTime>25</BuildTime>
    1013    <Resources>
  • binaries/data/mods/public/simulation/templates/template_structure_defense_wall_gate.xml

     
    99    <Category>Wall</Category>
    1010  </BuildRestrictions>
    1111  <Capturable disable=""/>
     12  <Repairable>
     13    <RepairTimeRatio>4.5</RepairTimeRatio>
     14  </Repairable>
    1215  <Cost>
    13     <BuildTime>0</BuildTime>
     16    <BuildTime>45</BuildTime>
    1417    <Resources>
    1518      <stone>50</stone>
    1619    </Resources>
  • binaries/data/mods/public/simulation/templates/template_structure_defense_wall_long.xml

     
    11<?xml version="1.0" encoding="utf-8"?>
    22<Entity parent="template_structure_defense_wall">
    3    <Armour>
     3  <Armour>
    44    <Hack>18.0</Hack>
    55    <Pierce>40.0</Pierce>
    66    <Crush>4.0</Crush>
     
    2626    </Resources>
    2727  </Cost>
    2828  <Health>
    29     <SpawnEntityOnDeath>rubble/rubble_stone_wall_long</SpawnEntityOnDeath>
     29    <SpawnEntityOnDeath>rubble/rubble_stone_wall_long</SpawnEntityOnDeath>
    3030  </Health>
    3131  <GarrisonHolder>
    3232    <Max>5</Max>
  • binaries/data/mods/public/simulation/templates/template_structure_defense_wall_medium.xml

     
    2222  <Cost>
    2323    <BuildTime>30</BuildTime>
    2424    <Resources>
    25       <stone>22</stone>
     25      <stone>22</stone>
    2626    </Resources>
    2727  </Cost>
    2828  <GarrisonHolder>
     
    4646  </GarrisonHolder>
    4747  <Health>
    4848    <Max>2000</Max>
    49     <SpawnEntityOnDeath>rubble/rubble_stone_wall_medium</SpawnEntityOnDeath>
     49    <SpawnEntityOnDeath>rubble/rubble_stone_wall_medium</SpawnEntityOnDeath>
    5050  </Health>
    5151</Entity>
  • binaries/data/mods/public/simulation/templates/template_structure_defense_wall_short.xml

     
    1313  </Cost>
    1414  <Health>
    1515    <Max>1000</Max>
    16     <SpawnEntityOnDeath>rubble/rubble_stone_wall_short</SpawnEntityOnDeath>
     16    <SpawnEntityOnDeath>rubble/rubble_stone_wall_short</SpawnEntityOnDeath>
    1717  </Health>
    1818</Entity>
  • binaries/data/mods/public/simulation/templates/template_structure_defense_wall_tower.xml

     
    2929    <Category>Wall</Category>
    3030  </BuildRestrictions>
    3131  <Capturable disable=""/>
     32  <Repairable>
     33    <RepairTimeRatio>4.5</RepairTimeRatio>
     34  </Repairable>
    3235  <Cost>
    3336    <BuildTime>80</BuildTime>
    3437    <Resources>