Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/unit_actions.js
Show First 20 Lines • Show All 691 Lines • ▼ Show 20 Lines | "execute": function(target, action, selection, queued) | ||||
"name": "order_garrison", | "name": "order_garrison", | ||||
"entity": action.firstAbleEntity | "entity": action.firstAbleEntity | ||||
}); | }); | ||||
return true; | return true; | ||||
}, | }, | ||||
"getActionInfo": function(entState, targetState) | "getActionInfo": function(entState, targetState) | ||||
{ | { | ||||
if (!entState.canGarrison || !targetState || !targetState.garrisonHolder || | if (!entState.garrisonable || !targetState || !targetState.garrisonHolder || | ||||
!playerCheck(entState, targetState, ["Player", "MutualAlly"])) | !playerCheck(entState, targetState, ["Player", "MutualAlly"])) | ||||
return false; | return false; | ||||
let tooltip = sprintf(translate("Current garrison: %(garrisoned)s/%(capacity)s"), { | let tooltip = sprintf(translate("Current garrison: %(garrisoned)s/%(capacity)s"), { | ||||
"garrisoned": targetState.garrisonHolder.garrisonedEntitiesCount, | "garrisoned": targetState.garrisonHolder.garrisonedEntitiesCount, | ||||
"capacity": targetState.garrisonHolder.capacity | "capacity": targetState.garrisonHolder.capacity | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 921 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator