Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Player.js
Show First 20 Lines • Show All 670 Lines • ▼ Show 20 Lines | Player.prototype.IsEnemy = function(id) | ||||
return this.diplomacy[id] < 0; | return this.diplomacy[id] < 0; | ||||
}; | }; | ||||
Player.prototype.GetEnemies = function() | Player.prototype.GetEnemies = function() | ||||
{ | { | ||||
return this.GetPlayersByDiplomacy("IsEnemy"); | return this.GetPlayersByDiplomacy("IsEnemy"); | ||||
}; | }; | ||||
Player.prototype.GetNeutrals = function() | |||||
{ | |||||
return this.GetPlayersByDiplomacy("IsNeutral"); | |||||
}; | |||||
fatherbushido: Do we really need that one? | |||||
Not Done Inline ActionsNope, removed. Mate-86: Nope, removed. | |||||
Player.prototype.SetNeutral = function(id) | Player.prototype.SetNeutral = function(id) | ||||
{ | { | ||||
this.SetDiplomacyIndex(id, 0); | this.SetDiplomacyIndex(id, 0); | ||||
}; | }; | ||||
/** | /** | ||||
* Check if given player is neutral | * Check if given player is neutral | ||||
*/ | */ | ||||
Player.prototype.IsNeutral = function(id) | Player.prototype.IsNeutral = function(id) | ||||
{ | { | ||||
return this.diplomacy[id] == 0; | return this.diplomacy[id] == 0; | ||||
}; | }; | ||||
Player.prototype.GetAllPlayers = function() | |||||
{ | |||||
return this.GetPlayersByDiplomacy("IsAny"); | |||||
}; | |||||
Not Done Inline ActionsImo remove that fatherbushido: Imo remove that | |||||
Player.prototype.IsAny = function(id) | |||||
{ | |||||
return true; | |||||
}; | |||||
Done Inline ActionsMissing ;, also this seems quite pointless. leper: Missing `;`, also this seems quite pointless. | |||||
Not Done Inline ActionsI would remove that fatherbushido: I would remove that | |||||
/** | /** | ||||
* Do some map dependant initializations | * Do some map dependant initializations | ||||
*/ | */ | ||||
Player.prototype.OnGlobalInitGame = function(msg) | Player.prototype.OnGlobalInitGame = function(msg) | ||||
{ | { | ||||
let cmpTechnologyManager = Engine.QueryInterface(this.entity, IID_TechnologyManager); | let cmpTechnologyManager = Engine.QueryInterface(this.entity, IID_TechnologyManager); | ||||
if (cmpTechnologyManager) | if (cmpTechnologyManager) | ||||
for (let tech of this.startingTechnologies) | for (let tech of this.startingTechnologies) | ||||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Do we really need that one?