Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Player.js
Show All 29 Lines | Player.prototype.Init = function() | ||||
this.sharedDropsites = false; | this.sharedDropsites = false; | ||||
this.formations = []; | this.formations = []; | ||||
this.startCam = undefined; | this.startCam = undefined; | ||||
this.controlAllUnits = false; | this.controlAllUnits = false; | ||||
this.isAI = false; | this.isAI = false; | ||||
this.gatherRateMultiplier = 1; | this.gatherRateMultiplier = 1; | ||||
this.tradeRateMultiplier = 1; | this.tradeRateMultiplier = 1; | ||||
this.cheatsEnabled = false; | this.cheatsEnabled = false; | ||||
this.cheatTimeMultiplier = 1; | |||||
this.heroes = []; | this.heroes = []; | ||||
this.resourceNames = {}; | this.resourceNames = {}; | ||||
this.disabledTemplates = {}; | this.disabledTemplates = {}; | ||||
this.disabledTechnologies = {}; | this.disabledTechnologies = {}; | ||||
this.startingTechnologies = []; | this.startingTechnologies = []; | ||||
this.spyCostMultiplier = +this.template.SpyCostMultiplier; | this.spyCostMultiplier = +this.template.SpyCostMultiplier; | ||||
// Initial resources and trading goods probability in steps of 5 | // Initial resources and trading goods probability in steps of 5 | ||||
▲ Show 20 Lines • Show All 699 Lines • ▼ Show 20 Lines | Player.prototype.SetCheatsEnabled = function(flag) | ||||
this.cheatsEnabled = flag; | this.cheatsEnabled = flag; | ||||
}; | }; | ||||
Player.prototype.GetCheatsEnabled = function() | Player.prototype.GetCheatsEnabled = function() | ||||
{ | { | ||||
return this.cheatsEnabled; | return this.cheatsEnabled; | ||||
}; | }; | ||||
Player.prototype.SetCheatTimeMultiplier = function(time) | |||||
{ | |||||
this.cheatTimeMultiplier = time; | |||||
}; | |||||
Player.prototype.GetCheatTimeMultiplier = function() | |||||
{ | |||||
return this.cheatTimeMultiplier; | |||||
}; | |||||
Player.prototype.TributeResource = function(player, amounts) | Player.prototype.TributeResource = function(player, amounts) | ||||
{ | { | ||||
var cmpPlayer = QueryPlayerIDInterface(player); | var cmpPlayer = QueryPlayerIDInterface(player); | ||||
if (!cmpPlayer) | if (!cmpPlayer) | ||||
return; | return; | ||||
if (this.state != "active" || cmpPlayer.state != "active") | if (this.state != "active" || cmpPlayer.state != "active") | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator