Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/unit_actions.js
Show First 20 Lines • Show All 701 Lines • ▼ Show 20 Lines | "execute": function(target, action, selection, queued, pushFront) | ||||
"entity": action.firstAbleEntity | "entity": action.firstAbleEntity | ||||
}); | }); | ||||
return true; | return true; | ||||
}, | }, | ||||
"getActionInfo": function(entState, targetState) | "getActionInfo": function(entState, targetState) | ||||
{ | { | ||||
if (!entState.garrisonable || !targetState || !targetState.garrisonHolder || | if (!entState.garrisonable || !targetState || !targetState.garrisonHolder || | ||||
!playerCheck(entState, targetState, ["Player", "MutualAlly"])) | !playerCheck(entState, targetState, targetState.garrisonHolder.allowedPlayers)) | ||||
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.occupiedSlots, | "garrisoned": targetState.garrisonHolder.occupiedSlots, | ||||
"capacity": targetState.garrisonHolder.capacity | "capacity": targetState.garrisonHolder.capacity | ||||
}); | }); | ||||
let extraCount = entState.garrisonable.size; | let extraCount = entState.garrisonable.size; | ||||
▲ Show 20 Lines • Show All 973 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator