Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/scripts/WonderVictory.js
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | if (cmpPlayer.GetState() == "won") | ||||
return; | return; | ||||
if (allies.indexOf(playerID) == -1 && playerID != player) | if (allies.indexOf(playerID) == -1 && playerID != player) | ||||
others.push(playerID); | others.push(playerID); | ||||
} | } | ||||
let cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); | let cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); | ||||
let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); | let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); | ||||
let wonderDuration = cmpEndGameManager.GetGameTypeSettings().wonderDuration; | let wonderDuration = cmpEndGameManager.GetGameSettings().wonderDuration; | ||||
this.wonderVictoryMessages[ent] = { | this.wonderVictoryMessages[ent] = { | ||||
"playerID": player, | "playerID": player, | ||||
"allies": new Set(allies), | "allies": new Set(allies), | ||||
"timer": cmpTimer.SetTimeout(SYSTEM_ENTITY, IID_Trigger, "WonderVictorySetWinner", wonderDuration, player), | "timer": cmpTimer.SetTimeout(SYSTEM_ENTITY, IID_Trigger, "WonderVictorySetWinner", wonderDuration, player), | ||||
"messages": [ | "messages": [ | ||||
cmpGuiInterface.AddTimeNotification( | cmpGuiInterface.AddTimeNotification( | ||||
{ | { | ||||
"message": allies.length ? | "message": allies.length ? | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator