Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Commands.js
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | "aichat": function(player, cmd, data) | ||||
cmpGuiInterface.PushNotification(notification); | cmpGuiInterface.PushNotification(notification); | ||||
}, | }, | ||||
"cheat": function(player, cmd, data) | "cheat": function(player, cmd, data) | ||||
{ | { | ||||
Cheat(cmd); | Cheat(cmd); | ||||
}, | }, | ||||
"collect-treasure": function(player, cmd, data) | |||||
{ | |||||
GetFormationUnitAIs(data.entities, player, cmd, data.formation).forEach(cmpUnitAI => { | |||||
cmpUnitAI.CollectTreasure(cmd.target, cmd.queued); | |||||
}); | |||||
}, | |||||
"diplomacy": function(player, cmd, data) | "diplomacy": function(player, cmd, data) | ||||
{ | { | ||||
let cmpCeasefireManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_CeasefireManager); | let cmpCeasefireManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_CeasefireManager); | ||||
if (data.cmpPlayer.GetLockTeams() || | if (data.cmpPlayer.GetLockTeams() || | ||||
cmpCeasefireManager && cmpCeasefireManager.IsCeasefireActive()) | cmpCeasefireManager && cmpCeasefireManager.IsCeasefireActive()) | ||||
return; | return; | ||||
switch(cmd.to) | switch(cmd.to) | ||||
▲ Show 20 Lines • Show All 1,680 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator