Ticket #3522: 3522.4.diff
File 3522.4.diff, 14.6 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/simulation/components/Player.js
Player.prototype.SetMaxPopulation = func 142 142 this.maxPop = max; 143 143 }; 144 144 145 145 Player.prototype.GetMaxPopulation = function() 146 146 { 147 return Math.round(ApplyValueModificationsToPlayer("Player/MaxPopulation", this.maxPop, this.entity ));147 return Math.round(ApplyValueModificationsToPlayer("Player/MaxPopulation", this.maxPop, this.entity, this.playerID)); 148 148 }; 149 149 150 150 Player.prototype.SetGatherRateMultiplier = function(value) 151 151 { 152 152 this.gatherRateMultiplier = value; -
binaries/data/mods/public/simulation/helpers/ValueModification.js
1 // Little helper functions to make applying technology more convenient1 // Little helper functions to make applying technology and auras more convenient 2 2 3 3 function ApplyValueModificationsToEntity(tech_type, current_value, entity) 4 4 { 5 5 let value = current_value; 6 6 let cmpTechnologyManager = QueryOwnerInterface(entity, IID_TechnologyManager); … … function ApplyValueModificationsToEntity 11 11 if (!cmpAuraManager) 12 12 return value; 13 13 return cmpAuraManager.ApplyModifications(tech_type, value, entity); 14 14 } 15 15 16 function ApplyValueModificationsToPlayer(tech_type, current_value, player _entity)16 function ApplyValueModificationsToPlayer(tech_type, current_value, playerEntity, playerID) 17 17 { 18 let cmpTechnologyManager = Engine.QueryInterface(player_entity, IID_TechnologyManager); 19 20 if (!cmpTechnologyManager) 21 return current_value; 22 23 return cmpTechnologyManager.ApplyModifications(tech_type, current_value, player_entity); 18 let cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager); 19 let entityTemplateName = cmpTemplateManager.GetCurrentTemplateName(playerEntity); 20 let entityTemplate = cmpTemplateManager.GetTemplate(entityTemplateName); 21 return ApplyValueModificationsToTemplate(tech_type, current_value, playerID, entityTemplate) 24 22 } 25 23 26 24 function ApplyValueModificationsToTemplate(tech_type, current_value, playerID, template) 27 25 { 28 26 let value = current_value; -
binaries/data/mods/public/simulation/templates/special/player.xml
46 46 <CivilCentre> 47 47 <RequiredTechs datatype="tokens">phase_town</RequiredTechs> 48 48 </CivilCentre> 49 49 </LimitRemovers> 50 50 </EntityLimits> 51 <Identity> 52 <Civ></Civ> 53 <GenericName>Player</GenericName> 54 <Classes datatype="tokens">Player</Classes> 55 </Identity> 51 56 <Player> 52 57 <SharedLosTech>unlock_shared_los</SharedLosTech> 53 58 </Player> 54 59 <StatisticsTracker/> 55 60 <TechnologyManager/> 56 61 </Entity> -
binaries/data/mods/public/simulation/templates/structures/athen_wonder.xml
2 2 <Entity parent="template_structure_wonder"> 3 3 <Footprint> 4 4 <Square width="28.0" depth="58.0"/> 5 5 <Height>12.0</Height> 6 6 </Footprint> 7 <GarrisonHolder>8 <Max>30</Max>9 <EjectHealth>0.1</EjectHealth>10 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy>11 <List datatype="tokens">Support Infantry Cavalry</List>12 <BuffHeal>3</BuffHeal>13 <LoadingRange>2</LoadingRange>14 </GarrisonHolder>15 7 <Identity> 16 8 <Civ>athen</Civ> 17 9 <SpecificName>Naós Parthenṓn</SpecificName> 18 10 <History>The Hellenes built marvelous temples in order to honour their polytheistic pantheon. While all gods were venerated, a specific patron deity was supposed to watch over each polis.</History> 19 11 <Tooltip>Bring glory to your civilization and add large tracts of land to your empire. Garrison up to 30 units to heal them at a quick rate.</Tooltip> -
binaries/data/mods/public/simulation/templates/structures/cart_wonder.xml
2 2 <Entity parent="template_structure_wonder"> 3 3 <Footprint> 4 4 <Square width="29.0" depth="59.0"/> 5 5 <Height>12.0</Height> 6 6 </Footprint> 7 <GarrisonHolder>8 <Max>30</Max>9 <EjectHealth>0.1</EjectHealth>10 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy>11 <List datatype="tokens">Support Infantry Cavalry</List>12 <BuffHeal>3</BuffHeal>13 <LoadingRange>2</LoadingRange>14 </GarrisonHolder>15 7 <Identity> 16 8 <Civ>cart</Civ> 17 9 <SpecificName>Temple of Ba'al Hammon</SpecificName> 18 10 <History>Dating from the 2nd Century BC, the Mausoleum of Atban in northern Tunisia is over twenty metres high and was built by the inhabitants of Dougga for a Numidian prince.</History> 19 11 </Identity> -
binaries/data/mods/public/simulation/templates/structures/iber_wonder.xml
2 2 <Entity parent="template_structure_wonder"> 3 3 <Footprint> 4 4 <Square width="43.0" depth="43.0"/> 5 5 <Height>14.0</Height> 6 6 </Footprint> 7 <GarrisonHolder>8 <Max>30</Max>9 <EjectHealth>0.1</EjectHealth>10 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy>11 <List datatype="tokens">Support Infantry Cavalry</List>12 <BuffHeal>3</BuffHeal>13 <LoadingRange>2</LoadingRange>14 </GarrisonHolder>15 7 <Identity> 16 8 <Civ>iber</Civ> 17 9 <SpecificName>Cancho Roano</SpecificName> 18 10 <History>ToDo</History> 19 11 </Identity> -
binaries/data/mods/public/simulation/templates/structures/mace_wonder.xml
2 2 <Entity parent="template_structure_wonder"> 3 3 <Footprint> 4 4 <Square width="28.0" depth="58.0"/> 5 5 <Height>12.0</Height> 6 6 </Footprint> 7 <GarrisonHolder>8 <Max>30</Max>9 <EjectHealth>0.1</EjectHealth>10 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy>11 <List datatype="tokens">Support Infantry Cavalry</List>12 <BuffHeal>3</BuffHeal>13 <LoadingRange>2</LoadingRange>14 </GarrisonHolder>15 7 <Identity> 16 8 <Civ>mace</Civ> 17 9 <SpecificName>Naós Parthenṓn</SpecificName> 18 10 <History>The Hellenes built marvelous temples in order to honour their polytheistic pantheon. While all gods were venerated, a specific patron deity was supposed to watch over each polis.</History> 19 11 <Tooltip>Bring glory to your civilization and add large tracts of land to your empire. Garrison up to 30 units to heal them at a quick rate.</Tooltip> -
binaries/data/mods/public/simulation/templates/structures/pers_wonder.xml
10 10 <Identity> 11 11 <Civ>pers</Civ> 12 12 <SpecificName>Hanging Gardens of Babylon</SpecificName> 13 13 <History>A magnificent structure built in the 6th century BC by the Neo-Babylonian king Nebuchadnezzar II in order to please his wife Amytis of Media, who was homesick for the gardens and mountains of her homeland.</History> 14 14 </Identity> 15 <Loot>16 <xp>200</xp>17 </Loot>18 15 <Obstruction> 19 16 <Static width="59.0" depth="59.0"/> 20 17 </Obstruction> 21 18 <StatusBars> 22 19 <BarWidth>6.0</BarWidth> -
binaries/data/mods/public/simulation/templates/structures/ptol_wonder.xml
2 2 <Entity parent="template_structure_wonder"> 3 3 <Footprint> 4 4 <Square width="48.0" depth="66.0"/> 5 5 <Height>20.0</Height> 6 6 </Footprint> 7 <GarrisonHolder>8 <Max>30</Max>9 <EjectHealth>0.1</EjectHealth>10 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy>11 <List datatype="tokens">Support Infantry Cavalry</List>12 <BuffHeal>3</BuffHeal>13 <LoadingRange>2</LoadingRange>14 </GarrisonHolder>15 7 <Identity> 16 8 <Civ>ptol</Civ> 17 9 <SpecificName>Temple of Edfu</SpecificName> 18 10 <History>The Temple of Edfu is an ancient Egyptian temple located on the west bank of the Nile in the city of Edfu which was known in Greco-Roman times as Apollonopolis Magna, after the chief god Horus-Apollo.The temple, dedicated to the falcon god Horus, was built in the Ptolemaic period between 237 and 57 BCE. In modern times, it is one of the best preserved temples of Egypt.</History> 19 11 </Identity> -
binaries/data/mods/public/simulation/templates/structures/rome_wonder.xml
2 2 <Entity parent="template_structure_wonder"> 3 3 <Footprint> 4 4 <Square width="24.0" depth="44.0"/> 5 5 <Height>12.0</Height> 6 6 </Footprint> 7 <GarrisonHolder>8 <Max>30</Max>9 <EjectHealth>0.1</EjectHealth>10 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy>11 <List datatype="tokens">Support Infantry Cavalry</List>12 <BuffHeal>3</BuffHeal>13 <LoadingRange>2</LoadingRange>14 </GarrisonHolder>15 7 <Identity> 16 8 <Civ>rome</Civ> 17 9 <SpecificName>Aedes Iovis Optimi Maximi</SpecificName> 18 10 <History>.</History> 19 11 </Identity> -
binaries/data/mods/public/simulation/templates/structures/spart_wonder.xml
2 2 <Entity parent="template_structure_wonder"> 3 3 <Footprint> 4 4 <Square width="28.0" depth="58.0"/> 5 5 <Height>12.0</Height> 6 6 </Footprint> 7 <GarrisonHolder>8 <Max>30</Max>9 <EjectHealth>0.1</EjectHealth>10 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy>11 <List datatype="tokens">Support Infantry Cavalry</List>12 <BuffHeal>3</BuffHeal>13 <LoadingRange>2</LoadingRange>14 </GarrisonHolder>15 7 <Identity> 16 8 <Civ>spart</Civ> 17 9 <SpecificName>Naós Parthenṓn</SpecificName> 18 10 <History>The Hellenes built marvelous temples in order to honour their polytheistic pantheon. While all gods were venerated, a specific patron deity was supposed to watch over each polis.</History> 19 11 <Tooltip>Bring glory to your civilization and add large tracts of land to your empire. Garrison up to 30 units to heal them at a quick rate.</Tooltip> -
binaries/data/mods/public/simulation/templates/template_structure_wonder.xml
8 8 <Hack>2</Hack> 9 9 <Pierce>10</Pierce> 10 10 <Crush>2</Crush> 11 11 </Foundation> 12 12 </Armour> 13 <Auras> 14 <Aura1> 15 <Type>global</Type> 16 <Affects>Player</Affects> 17 <Modifications> 18 <Player.MaxPopulation> <Add>50</Add> </Player.MaxPopulation> 19 </Modifications> 20 <AuraName>Glorious Expansion</AuraName> 21 <AuraDescription>+50 maximum population cap.</AuraDescription> 22 <Stackable>true</Stackable> 23 </Aura1> 24 </Auras> 13 25 <BuildRestrictions> 14 26 <Category>Wonder</Category> 15 27 </BuildRestrictions> 16 28 <Capturable> 17 <CapturePoints> 1500</CapturePoints>29 <CapturePoints>2000</CapturePoints> 18 30 <RegenRate>5.0</RegenRate> 19 31 </Capturable> 20 32 <Cost> 21 33 <BuildTime>1000</BuildTime> 22 34 <Resources> 23 <food>0</food>24 <wood> 1000</wood>25 <stone>1 000</stone>26 <metal>1 000</metal>35 <food>3000</food> 36 <wood>4000</wood> 37 <stone>1500</stone> 38 <metal>1500</metal> 27 39 </Resources> 28 40 </Cost> 29 41 <Footprint> 30 42 <Square width="34.0" depth="34.0"/> 31 43 <Height>10.0</Height> 32 44 </Footprint> 33 <GarrisonHolder disable=""/> 45 <GarrisonHolder> 46 <Max>30</Max> 47 <EjectHealth>0.1</EjectHealth> 48 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy> 49 <List datatype="tokens">Support Infantry Cavalry</List> 50 <BuffHeal>3</BuffHeal> 51 <LoadingRange>2</LoadingRange> 52 </GarrisonHolder> 34 53 <Health> 35 54 <Max>5000</Max> 36 55 <SpawnEntityOnDeath>rubble/rubble_stone_6x6</SpawnEntityOnDeath> 37 56 </Health> 38 57 <Identity> 39 58 <GenericName>Wonder</GenericName> 40 59 <Tooltip>Bring glory to your civilization and add large tracts of land to your empire.</Tooltip> 41 60 <Classes datatype="tokens"> 42 61 City 43 62 Wonder 44 63 </Classes> 45 64 <Icon>structures/wonder.png</Icon> 46 65 <RequiredTechnology>phase_city</RequiredTechnology> 47 66 </Identity> 48 67 <Loot> 49 68 <xp>200</xp> … … 53 72 <metal>100</metal> 54 73 </Loot> 55 74 <Obstruction> 56 75 <Static width="30.0" depth="30.0"/> 57 76 </Obstruction> 58 <ProductionQueue>59 <BatchTimeModifier>0.7</BatchTimeModifier>60 <Technologies datatype="tokens">61 pop_wonder62 </Technologies>63 </ProductionQueue>64 77 <RallyPoint disable=""/> 65 78 <Sound> 66 79 <SoundGroups> 67 80 <select>interface/select/building/sel_wonder.xml</select> 68 81 <constructed>interface/complete/building/complete_wonder.xml</constructed>