Ticket #4056: Profiler-scripts.patch
File Profiler-scripts.patch, 40.2 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/simulation/components/AIInterface.js
1 1 function AIInterface() {} 2 2 3 AIInterface.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("AIInterface") 6 } 7 AIInterface.prototype.StopPP = function() 8 { 9 } 10 3 11 AIInterface.prototype.Schema = 4 12 "<a:component type='system'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/AIProxy.js
1 1 function AIProxy() {} 2 2 3 AIProxy.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("AIProxy") 6 } 7 AIProxy.prototype.StopPP = function() 8 { 9 } 10 3 11 AIProxy.prototype.Schema = 4 12 "<empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/AlertRaiser.js
1 1 function AlertRaiser() {} 2 2 3 AlertRaiser.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("AlertRaiser") 6 } 7 AlertRaiser.prototype.StopPP = function() 8 { 9 } 10 3 11 AlertRaiser.prototype.Schema = 4 12 "<element name='MaximumLevel'><data type='nonNegativeInteger'/></element>" + 5 13 "<element name='Range'><data type='nonNegativeInteger'/></element>"; -
binaries/data/mods/public/simulation/components/Armour.js
1 1 function Armour() {} 2 2 3 Armour.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Armour") 6 } 7 Armour.prototype.StopPP = function() 8 { 9 } 10 3 11 Armour.prototype.Schema = 4 12 "<a:help>Controls the damage resistance of the unit.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Attack.js
1 1 function Attack() {} 2 2 3 Attack.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Attack") 6 } 7 Attack.prototype.StopPP = function() 8 { 9 } 10 3 11 Attack.prototype.bonusesSchema = 4 12 "<optional>" + 5 13 "<element name='Bonuses'>" + -
binaries/data/mods/public/simulation/components/AttackDetection.js
1 1 function AttackDetection() {} 2 2 3 AttackDetection.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("AttackDetection") 6 } 7 AttackDetection.prototype.StopPP = function() 8 { 9 } 10 3 11 AttackDetection.prototype.Schema = 4 12 "<a:help>Detects incoming attacks.</a:help>" + 5 13 "<a:example/>" + -
binaries/data/mods/public/simulation/components/AuraManager.js
1 1 function AuraManager() {} 2 2 3 AuraManager.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("AuraManager") 6 } 7 AuraManager.prototype.StopPP = function() 8 { 9 } 10 3 11 AuraManager.prototype.Schema = 4 12 "<a:component type='system'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/Auras.js
1 1 function Auras() {} 2 2 3 Auras.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Auras") 6 } 7 Auras.prototype.StopPP = function() 8 { 9 } 10 3 11 Auras.prototype.Schema = 4 12 "<attribute name='datatype'>" + 5 13 "<value>tokens</value>" + -
binaries/data/mods/public/simulation/components/Barter.js
26 26 27 27 function Barter() {} 28 28 29 Barter.prototype.StartPP = function() 30 { 31 Engine.ProfileArgument("Barter") 32 } 33 Barter.prototype.StopPP = function() 34 { 35 } 36 29 37 Barter.prototype.Schema = 30 38 "<a:component type='system'/><empty/>"; 31 39 -
binaries/data/mods/public/simulation/components/BattleDetection.js
1 1 function BattleDetection() {} 2 2 3 BattleDetection.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("BattleDetection") 6 } 7 BattleDetection.prototype.StopPP = function() 8 { 9 } 10 3 11 BattleDetection.prototype.Schema = 4 12 "<a:help>Detects the occurence of battles.</a:help>" + 5 13 "<a:example/>" + -
binaries/data/mods/public/simulation/components/Builder.js
1 1 function Builder() {} 2 2 3 Builder.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Builder") 6 } 7 Builder.prototype.StopPP = function() 8 { 9 } 10 3 11 Builder.prototype.Schema = 4 12 "<a:help>Allows the unit to construct and repair buildings.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/BuildingAI.js
4 4 5 5 function BuildingAI() {} 6 6 7 BuildingAI.prototype.StartPP = function() 8 { 9 Engine.ProfileArgument("BuildingAI") 10 } 11 BuildingAI.prototype.StopPP = function() 12 { 13 } 14 7 15 BuildingAI.prototype.Schema = 8 16 "<element name='DefaultArrowCount'>" + 9 17 "<data type='nonNegativeInteger'/>" + -
binaries/data/mods/public/simulation/components/BuildRestrictions.js
1 1 function BuildRestrictions() {} 2 2 3 BuildRestrictions.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("BuildRestrictions") 6 } 7 BuildRestrictions.prototype.StopPP = function() 8 { 9 } 10 3 11 BuildRestrictions.prototype.Schema = 4 12 "<a:help>Specifies building placement restrictions as they relate to terrain, territories, and distance.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Capturable.js
1 1 function Capturable() {} 2 2 3 Capturable.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Capturable") 6 } 7 Capturable.prototype.StopPP = function() 8 { 9 } 10 3 11 Capturable.prototype.Schema = 4 12 "<element name='CapturePoints' a:help='Maximum capture points'>" + 5 13 "<ref name='positiveDecimal'/>" + -
binaries/data/mods/public/simulation/components/CeasefireManager.js
1 1 function CeasefireManager() {} 2 2 3 CeasefireManager.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("CeasefireManager") 6 } 7 CeasefireManager.prototype.StopPP = function() 8 { 9 } 10 3 11 CeasefireManager.prototype.Schema = "<a:component type='system'/><empty/>"; 4 12 5 13 CeasefireManager.prototype.Init = function() -
binaries/data/mods/public/simulation/components/Cost.js
1 1 function Cost() {} 2 2 3 Cost.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Cost") 6 } 7 Cost.prototype.StopPP = function() 8 { 9 } 10 3 11 Cost.prototype.Schema = 4 12 "<a:help>Specifies the construction/training costs of this entity.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/DataTemplateManager.js
3 3 */ 4 4 function DataTemplateManager() {} 5 5 6 DataTemplateManager.prototype.StartPP = function() 7 { 8 Engine.ProfileArgument("DataTemplateManager") 9 } 10 DataTemplateManager.prototype.StopPP = function() 11 { 12 } 13 6 14 DataTemplateManager.prototype.Schema = 7 15 "<a:component type='system'/><empty/>"; 8 16 -
binaries/data/mods/public/simulation/components/EndGameManager.js
7 7 */ 8 8 function EndGameManager() {} 9 9 10 EndGameManager.prototype.StartPP = function() 11 { 12 Engine.ProfileArgument("EndGameManager") 13 } 14 EndGameManager.prototype.StopPP = function() 15 { 16 } 17 10 18 EndGameManager.prototype.Schema = 11 19 "<a:component type='system'/><empty/>"; 12 20 -
binaries/data/mods/public/simulation/components/EntityLimits.js
1 1 function EntityLimits() {} 2 2 3 EntityLimits.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("EntityLimits") 6 } 7 EntityLimits.prototype.StopPP = function() 8 { 9 } 10 3 11 EntityLimits.prototype.Schema = 4 12 "<a:help>Specifies per category limits on number of entities (buildings or units) that can be created for each player</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Fogging.js
4 4 5 5 function Fogging() {} 6 6 7 Fogging.prototype.StartPP = function() 8 { 9 Engine.ProfileArgument("Fogging") 10 } 11 Fogging.prototype.StopPP = function() 12 { 13 } 14 7 15 Fogging.prototype.Schema = 8 16 "<a:help>Allows this entity to be replaced by mirage entities in the fog-of-war.</a:help>" + 9 17 "<empty/>"; -
binaries/data/mods/public/simulation/components/Formation.js
1 1 function Formation() {} 2 2 3 Formation.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Formation") 6 } 7 Formation.prototype.StopPP = function() 8 { 9 } 10 3 11 Formation.prototype.Schema = 4 12 "<element name='FormationName' a:help='Name of the formation'>" + 5 13 "<text/>" + -
binaries/data/mods/public/simulation/components/FormationAttack.js
1 1 function FormationAttack() {} 2 2 3 FormationAttack.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("FormationAttack") 6 } 7 FormationAttack.prototype.StopPP = function() 8 { 9 } 10 3 11 FormationAttack.prototype.Schema = 4 12 "<element name='CanAttackAsFormation'>" + 5 13 "<text/>" + -
binaries/data/mods/public/simulation/components/Foundation.js
1 1 function Foundation() {} 2 2 3 Foundation.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Foundation") 6 } 7 Foundation.prototype.StopPP = function() 8 { 9 } 10 3 11 Foundation.prototype.Schema = 4 12 "<a:component type='internal'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/GarrisonHolder.js
1 1 function GarrisonHolder() {} 2 2 3 GarrisonHolder.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("GarrisonHolder") 6 } 7 GarrisonHolder.prototype.StopPP = function() 8 { 9 } 10 3 11 GarrisonHolder.prototype.Schema = 4 12 "<element name='Max' a:help='Maximum number of entities which can be garrisoned inside this holder'>" + 5 13 "<data type='positiveInteger'/>" + -
binaries/data/mods/public/simulation/components/Gate.js
1 1 function Gate() {} 2 2 3 Gate.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Gate") 6 } 7 Gate.prototype.StopPP = function() 8 { 9 } 10 3 11 Gate.prototype.Schema = 4 12 "<a:help>Controls behavior of wall gates</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Guard.js
1 1 function Guard() {} 2 2 3 Guard.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Guard") 6 } 7 Guard.prototype.StopPP = function() 8 { 9 } 10 3 11 Guard.prototype.Schema = 4 12 "<empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/GuiInterface.js
1 1 function GuiInterface() {} 2 2 3 GuiInterface.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("GuiInterface") 6 } 7 GuiInterface.prototype.StopPP = function() 8 { 9 } 10 3 11 GuiInterface.prototype.Schema = 4 12 "<a:component type='system'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/Heal.js
1 1 function Heal() {} 2 2 3 Heal.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Heal") 6 } 7 Heal.prototype.StopPP = function() 8 { 9 } 10 3 11 Heal.prototype.Schema = 4 12 "<a:help>Controls the healing abilities of the unit.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Health.js
1 1 function Health() {} 2 2 3 Health.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Health") 6 } 7 Health.prototype.StopPP = function() 8 { 9 } 10 3 11 Health.prototype.Schema = 4 12 "<a:help>Deals with hitpoints and death.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Identity.js
1 1 function Identity() {} 2 2 3 Identity.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Identity") 6 } 7 Identity.prototype.StopPP = function() 8 { 9 } 10 3 11 Identity.prototype.Schema = 4 12 "<a:help>Specifies various names and values associated with the unit type, typically for GUI display to users.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Loot.js
1 1 function Loot() {} 2 2 3 Loot.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Loot") 6 } 7 Loot.prototype.StopPP = function() 8 { 9 } 10 3 11 Loot.prototype.Schema = 4 12 "<optional>" + 5 13 "<element name='xp'><data type='nonNegativeInteger'/></element>" + -
binaries/data/mods/public/simulation/components/Looter.js
1 1 function Looter() {} 2 2 3 Looter.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Looter") 6 } 7 Looter.prototype.StopPP = function() 8 { 9 } 10 3 11 Looter.prototype.Schema = 4 12 "<empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/Market.js
1 1 function Market() {} 2 2 3 Market.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Market") 6 } 7 Market.prototype.StopPP = function() 8 { 9 } 10 3 11 Market.prototype.Schema = 4 12 "<element name='TradeType' a:help='Specifies the type of possible trade route (land or naval).'>" + 5 13 "<list>" + -
binaries/data/mods/public/simulation/components/Mirage.js
4 4 5 5 function Mirage() {} 6 6 7 Mirage.prototype.StartPP = function() 8 { 9 Engine.ProfileArgument("Mirage") 10 } 11 Mirage.prototype.StopPP = function() 12 { 13 } 14 7 15 Mirage.prototype.Schema = 8 16 "<a:help>Mirage entities replace real entities in the fog-of-war.</a:help>" + 9 17 "<empty/>"; -
binaries/data/mods/public/simulation/components/MotionBall.js
1 1 function MotionBallScripted() {} 2 2 3 MotionBallScripted.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("MotionBallScripted") 6 } 7 MotionBallScripted.prototype.StopPP = function() 8 { 9 } 10 3 11 MotionBallScripted.prototype.Schema = 4 12 "<a:component type='test'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/Pack.js
1 1 function Pack() {} 2 2 3 Pack.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Pack") 6 } 7 Pack.prototype.StopPP = function() 8 { 9 } 10 3 11 const PACKING_INTERVAL = 250; 4 12 5 13 Pack.prototype.Schema = -
binaries/data/mods/public/simulation/components/Player.js
1 1 function Player() {} 2 2 3 Player.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Player") 6 } 7 Player.prototype.StopPP = function() 8 { 9 } 10 3 11 Player.prototype.Schema = 4 12 "<element name='SharedLosTech' a:help='Allies will share los when this technology is researched. Leave empty to never share LOS.'>" + 5 13 "<text/>" + -
binaries/data/mods/public/simulation/components/PlayerManager.js
1 1 function PlayerManager() {} 2 2 3 PlayerManager.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("PlayerManager") 6 } 7 PlayerManager.prototype.StopPP = function() 8 { 9 } 10 3 11 PlayerManager.prototype.Schema = 4 12 "<a:component type='system'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/ProductionQueue.js
3 3 4 4 function ProductionQueue() {} 5 5 6 ProductionQueue.prototype.StartPP = function() 7 { 8 Engine.ProfileArgument("ProductionQueue") 9 } 10 ProductionQueue.prototype.StopPP = function() 11 { 12 } 13 6 14 ProductionQueue.prototype.Schema = 7 15 "<a:help>Allows the building to train new units and research technologies</a:help>" + 8 16 "<a:example>" + -
binaries/data/mods/public/simulation/components/Promotion.js
1 1 function Promotion() {} 2 2 3 Promotion.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Promotion") 6 } 7 Promotion.prototype.StopPP = function() 8 { 9 } 10 3 11 Promotion.prototype.Schema = 4 12 "<element name='Entity'>" + 5 13 "<text/>" + -
binaries/data/mods/public/simulation/components/RallyPoint.js
1 1 function RallyPoint() {} 2 2 3 RallyPoint.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("RallyPoint") 6 } 7 RallyPoint.prototype.StopPP = function() 8 { 9 } 10 3 11 RallyPoint.prototype.Schema = 4 12 "<a:component/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/Repairable.js
1 1 function Repairable() {} 2 2 3 Repairable.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Repairable") 6 } 7 Repairable.prototype.StopPP = function() 8 { 9 } 10 3 11 Repairable.prototype.Schema = 4 12 "<a:help>Deals with repairable structures and units.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/ResourceDropsite.js
1 1 function ResourceDropsite() {} 2 2 3 ResourceDropsite.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("ResourceDropsite") 6 } 7 ResourceDropsite.prototype.StopPP = function() 8 { 9 } 10 3 11 ResourceDropsite.prototype.Schema = 4 12 "<element name='Types'>" + 5 13 "<list>" + -
binaries/data/mods/public/simulation/components/ResourceGatherer.js
1 1 function ResourceGatherer() {} 2 2 3 ResourceGatherer.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("ResourceGatherer") 6 } 7 ResourceGatherer.prototype.StopPP = function() 8 { 9 } 10 3 11 ResourceGatherer.prototype.Schema = 4 12 "<a:help>Lets the unit gather resources from entities that have the ResourceSupply component.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/ResourceSupply.js
1 1 function ResourceSupply() {} 2 2 3 ResourceSupply.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("ResourceSupply") 6 } 7 ResourceSupply.prototype.StopPP = function() 8 { 9 } 10 3 11 ResourceSupply.prototype.Schema = 4 12 "<a:help>Provides a supply of one particular type of resource.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/ResourceTrickle.js
1 1 function ResourceTrickle() {} 2 2 3 ResourceTrickle.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("ResourceTrickle") 6 } 7 ResourceTrickle.prototype.StopPP = function() 8 { 9 } 10 3 11 ResourceTrickle.prototype.Schema = 4 12 "<a:help>Controls the resource trickle ability of the unit.</a:help>" + 5 13 "<element name='Rates' a:help='Trickle Rates'>" + -
binaries/data/mods/public/simulation/components/Settlement.js
1 1 function Settlement() {} 2 2 3 Settlement.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Settlement") 6 } 7 Settlement.prototype.StopPP = function() 8 { 9 } 10 3 11 Settlement.prototype.Schema = 4 12 "<empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/SkirmishReplacer.js
1 1 function SkirmishReplacer() {} 2 2 3 SkirmishReplacer.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("SkirmishReplacer") 6 } 7 SkirmishReplacer.prototype.StopPP = function() 8 { 9 } 10 3 11 SkirmishReplacer.prototype.Schema = 4 12 "<optional>" + 5 13 "<element name='general' a:help='The general element replaces {civ} with the civ code.'>" + -
binaries/data/mods/public/simulation/components/Sound.js
1 1 function Sound() {} 2 2 3 Sound.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Sound") 6 } 7 Sound.prototype.StopPP = function() 8 { 9 } 10 3 11 Sound.prototype.Schema = 4 12 "<a:help>Lists the sound groups associated with this unit.</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/StatisticsTracker.js
1 1 function StatisticsTracker() {} 2 2 3 StatisticsTracker.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("StatisticsTracker") 6 } 7 StatisticsTracker.prototype.StopPP = function() 8 { 9 } 10 3 11 StatisticsTracker.prototype.Schema = 4 12 "<a:component type='system'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/StatusBars.js
2 2 3 3 function StatusBars() {} 4 4 5 StatusBars.prototype.StartPP = function() 6 { 7 Engine.ProfileArgument("StatusBars") 8 } 9 StatusBars.prototype.StopPP = function() 10 { 11 } 12 5 13 StatusBars.prototype.Schema = 6 14 "<element name='BarWidth'>" + 7 15 "<data type='decimal'/>" + -
binaries/data/mods/public/simulation/components/TechnologyManager.js
1 1 function TechnologyManager() {} 2 2 3 TechnologyManager.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("TechnologyManager") 6 } 7 TechnologyManager.prototype.StopPP = function() 8 { 9 } 10 3 11 TechnologyManager.prototype.Schema = 4 12 "<a:component type='system'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/TerritoryDecay.js
1 1 function TerritoryDecay() {} 2 2 3 TerritoryDecay.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("TerritoryDecay") 6 } 7 TerritoryDecay.prototype.StopPP = function() 8 { 9 } 10 3 11 TerritoryDecay.prototype.Schema = 4 12 "<element name='DecayRate' a:help='Decay rate in capture points per second'>" + 5 13 "<choice><ref name='positiveDecimal'/><value>Infinity</value></choice>" + -
binaries/data/mods/public/simulation/components/Timer.js
1 1 function Timer() {} 2 2 3 Timer.prototype.StartPP = function() 4 { 5 } 6 Timer.prototype.StopPP = function() 7 { 8 } 9 3 10 Timer.prototype.Schema = 4 11 "<a:component type='system'/><empty/>"; 5 12 -
binaries/data/mods/public/simulation/components/Trader.js
9 9 10 10 function Trader() {} 11 11 12 Trader.prototype.StartPP = function() 13 { 14 Engine.ProfileArgument("Trader") 15 } 16 Trader.prototype.StopPP = function() 17 { 18 } 19 12 20 Trader.prototype.Schema = 13 21 "<a:help>Lets the unit generate resouces while moving between markets (or docks in case of water trading).</a:help>" + 14 22 "<a:example>" + -
binaries/data/mods/public/simulation/components/TrainingRestrictions.js
1 1 function TrainingRestrictions() {} 2 2 3 TrainingRestrictions.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("TrainingRestrictions") 6 } 7 TrainingRestrictions.prototype.StopPP = function() 8 { 9 } 10 3 11 TrainingRestrictions.prototype.Schema = 4 12 "<a:help>Specifies unit training restrictions, currently only unit category</a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Trigger.js
1 1 function Trigger() {} 2 2 3 Trigger.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Trigger") 6 } 7 Trigger.prototype.StopPP = function() 8 { 9 } 10 3 11 Trigger.prototype.Schema = 4 12 "<a:component type='system'/><empty/>"; 5 13 -
binaries/data/mods/public/simulation/components/TriggerPoint.js
1 1 function TriggerPoint() {} 2 2 3 TriggerPoint.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("TriggerPoint") 6 } 7 TriggerPoint.prototype.StopPP = function() 8 { 9 } 10 3 11 TriggerPoint.prototype.Schema = 4 12 "<optional>" + 5 13 "<element name='Reference'>" + -
binaries/data/mods/public/simulation/components/UnitAI.js
1 1 function UnitAI() {} 2 2 3 UnitAI.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("UnitAI") 6 } 7 UnitAI.prototype.StopPP = function() 8 { 9 } 10 3 11 UnitAI.prototype.Schema = 4 12 "<a:help>Controls the unit's movement, attacks, etc, in response to commands from the player.</a:help>" + 5 13 "<a:example/>" + -
binaries/data/mods/public/simulation/components/UnitMotionFlying.js
3 3 const SHORT_FINAL = 2.5; 4 4 function UnitMotionFlying() {} 5 5 6 UnitMotionFlying.prototype.StartPP = function() 7 { 8 Engine.ProfileArgument("UnitMotionFlying") 9 } 10 UnitMotionFlying.prototype.StopPP = function() 11 { 12 } 13 6 14 UnitMotionFlying.prototype.Schema = 7 15 "<element name='MaxSpeed'>" + 8 16 "<ref name='nonNegativeDecimal'/>" + -
binaries/data/mods/public/simulation/components/ValueModificationManager.js
1 1 function ValueModificationManager() {} 2 2 3 ValueModificationManager.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("ValueModificationManager") 6 } 7 ValueModificationManager.prototype.StopPP = function() 8 { 9 } 10 3 11 /* 4 12 * A component to give the C++ defined components access to all value modifying components 5 13 * via the helper script. -
binaries/data/mods/public/simulation/components/Visibility.js
4 4 5 5 function Visibility() {} 6 6 7 Visibility.prototype.StartPP = function() 8 { 9 Engine.ProfileArgument("Visibility") 10 } 11 Visibility.prototype.StopPP = function() 12 { 13 } 14 7 15 Visibility.prototype.Schema = 8 16 "<element name='RetainInFog'>" + 9 17 "<data type='boolean'/>" + -
binaries/data/mods/public/simulation/components/WallPiece.js
1 1 function WallPiece() {} 2 2 3 WallPiece.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("WallPiece") 6 } 7 WallPiece.prototype.StopPP = function() 8 { 9 } 10 3 11 WallPiece.prototype.Schema = 4 12 "<a:help></a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/WallSet.js
1 1 function WallSet() {} 2 2 3 WallSet.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("WallSet") 6 } 7 WallSet.prototype.StopPP = function() 8 { 9 } 10 3 11 WallSet.prototype.Schema = 4 12 "<a:help></a:help>" + 5 13 "<a:example>" + -
binaries/data/mods/public/simulation/components/Wonder.js
1 1 function Wonder() {} 2 2 3 Wonder.prototype.StartPP = function() 4 { 5 Engine.ProfileArgument("Wonder") 6 } 7 Wonder.prototype.StopPP = function() 8 { 9 } 10 3 11 Wonder.prototype.Schema = 4 12 "<element name='DurationMultiplier' a:help='A civ-specific time-bonus/handicap for the wonder-victory-condition.'>" + 5 13 "<ref name='nonNegativeDecimal'/>" + -
source/simulation2/scripting/ScriptComponent.cpp
19 19 20 20 #include "ScriptComponent.h" 21 21 22 #include "ps/Profile.h" 22 23 #include "simulation2/serialization/ISerializer.h" 23 24 #include "simulation2/serialization/IDeserializer.h" 24 25 … … 55 56 56 57 void CComponentTypeScript::HandleMessage(const CMessage& msg, bool global) 57 58 { 59 PROFILE2_IFSPIKE("Script", 0.0002); 58 60 JSContext* cx = m_ScriptInterface.GetContext(); 59 61 JSAutoRequest rq(cx); 60 62 … … 62 64 63 65 JS::RootedValue msgVal(cx, msg.ToJSValCached(m_ScriptInterface)); 64 66 67 m_ScriptInterface.CallFunctionVoid(m_Instance, "StartPP"); 65 68 if (!m_ScriptInterface.CallFunctionVoid(m_Instance, name, msgVal)) 66 69 LOGERROR("Script message handler %s failed", name); 70 m_ScriptInterface.CallFunctionVoid(m_Instance, "StopPP"); 67 71 } 68 72 69 73 void CComponentTypeScript::Serialize(ISerializer& serialize) -
source/scriptinterface/ScriptInterface.cpp
256 256 return true; 257 257 } 258 258 259 bool ProfileArgument(JSContext* cx, uint argc, jsval* vp) 260 { 261 const char* name = ""; 262 263 JS::CallArgs args = JS::CallArgsFromVp(argc, vp); 264 265 if (args.length() == 0) 266 return true; 267 268 std::string str; 269 if (!ScriptInterface::FromJSVal(cx, args[0], str)) 270 return false; 271 272 typedef boost::flyweight< 273 std::string, 274 boost::flyweights::no_tracking, 275 boost::flyweights::no_locking 276 > StringFlyweight; 277 278 name = StringFlyweight(str).get().c_str(); 279 280 g_Profiler2.RecordAttribute(name); 281 282 args.rval().setUndefined(); 283 return true; 284 } 285 259 286 bool ProfileStop(JSContext* UNUSED(cx), uint UNUSED(argc), jsval* vp) 260 287 { 261 288 JS::CallReceiver rec = JS::CallReceiverFromVp(vp); … … 363 390 JS_DefineFunction(m_cx, globalRootedVal, "deepcopy", ::deepcopy, 1, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT); 364 391 365 392 Register("ProfileStart", ::ProfileStart, 1); 393 Register("ProfileArgument", ::ProfileArgument, 0); 366 394 Register("ProfileStop", ::ProfileStop, 0); 367 395 368 396 runtime->RegisterContext(m_cx);