Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/helpers/Transform.js
Show First 20 Lines • Show All 252 Lines • ▼ Show 20 Lines | function TransferGarrisonedUnits(oldEnt, newEnt) | ||||
for (let ent of entities) | for (let ent of entities) | ||||
{ | { | ||||
cmpOldGarrison.Unload(ent); | cmpOldGarrison.Unload(ent); | ||||
if (!cmpNewGarrison) | if (!cmpNewGarrison) | ||||
continue; | continue; | ||||
let cmpGarrisonable = Engine.QueryInterface(ent, IID_Garrisonable); | let cmpGarrisonable = Engine.QueryInterface(ent, IID_Garrisonable); | ||||
if (!cmpGarrisonable) | if (!cmpGarrisonable) | ||||
continue; | continue; | ||||
cmpGarrisonable.Autogarrison(newEnt); | cmpGarrisonable.Garrison(newEnt); | ||||
} | } | ||||
} | } | ||||
Engine.RegisterGlobal("ChangeEntityTemplate", ChangeEntityTemplate); | Engine.RegisterGlobal("ChangeEntityTemplate", ChangeEntityTemplate); | ||||
Engine.RegisterGlobal("ObstructionsBlockingTemplateChange", ObstructionsBlockingTemplateChange); | Engine.RegisterGlobal("ObstructionsBlockingTemplateChange", ObstructionsBlockingTemplateChange); |
Wildfire Games · Phabricator