Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Commands.js
Show First 20 Lines • Show All 828 Lines • ▼ Show 20 Lines | var g_Commands = { | ||||
{ | { | ||||
for (let ent of data.entities) | for (let ent of data.entities) | ||||
{ | { | ||||
let cmpResourceDropsite = Engine.QueryInterface(ent, IID_ResourceDropsite); | let cmpResourceDropsite = Engine.QueryInterface(ent, IID_ResourceDropsite); | ||||
if (cmpResourceDropsite && cmpResourceDropsite.IsSharable()) | if (cmpResourceDropsite && cmpResourceDropsite.IsSharable()) | ||||
cmpResourceDropsite.SetSharing(cmd.shared); | cmpResourceDropsite.SetSharing(cmd.shared); | ||||
} | } | ||||
}, | }, | ||||
"map-flare": function(player, cmd, data) | |||||
{ | |||||
let cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); | |||||
cmpGuiInterface.PushNotification({ | |||||
"type": "map-flare", | |||||
"players": [player], | |||||
"target": cmd.target | |||||
}); | |||||
elexis: -1 tab, let or inline | |||||
}, | |||||
}; | }; | ||||
/** | /** | ||||
* Sends a GUI notification about unit(s) that failed to ungarrison. | * Sends a GUI notification about unit(s) that failed to ungarrison. | ||||
*/ | */ | ||||
function notifyUnloadFailure(player, garrisonHolder) | function notifyUnloadFailure(player, garrisonHolder) | ||||
{ | { | ||||
var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); | var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); | ||||
▲ Show 20 Lines • Show All 928 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
-1 tab, let or inline