Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Commands.js
Show First 20 Lines • Show All 399 Lines • ▼ Show 20 Lines | "delete-entities": function(player, cmd, data) | ||||
{ | { | ||||
if (!data.controlAllUnits) | if (!data.controlAllUnits) | ||||
{ | { | ||||
let cmpIdentity = Engine.QueryInterface(ent, IID_Identity); | let cmpIdentity = Engine.QueryInterface(ent, IID_Identity); | ||||
if (cmpIdentity && cmpIdentity.IsUndeletable()) | if (cmpIdentity && cmpIdentity.IsUndeletable()) | ||||
continue; | continue; | ||||
let cmpCapturable = QueryMiragedInterface(ent, IID_Capturable); | let cmpCapturable = QueryMiragedInterface(ent, IID_Capturable); | ||||
if (cmpCapturable && | if (cmpCapturable && cmpCapturable.GetCapturePoints() && | ||||
cmpCapturable.GetCapturePoints()[player] < cmpCapturable.GetMaxCapturePoints() / 2) | cmpCapturable.GetCapturePoints()[player] < cmpCapturable.GetMaxCapturePoints() / 2) | ||||
continue; | continue; | ||||
let cmpResourceSupply = QueryMiragedInterface(ent, IID_ResourceSupply); | let cmpResourceSupply = QueryMiragedInterface(ent, IID_ResourceSupply); | ||||
if (cmpResourceSupply && cmpResourceSupply.GetKillBeforeGather()) | if (cmpResourceSupply && cmpResourceSupply.GetKillBeforeGather()) | ||||
continue; | continue; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,311 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator