use of main.content.CONTENT_CONSTS2.STD_ACTION_MODES in project Eidolons by IDemiurge.
the class DC_ActionManager method generateModesForUnit.
public List<DC_ActiveObj> generateModesForUnit(Unit unit, ACTION_TYPE_GROUPS group) {
List<DC_ActiveObj> actions = new ArrayList<>();
for (ActiveObj active : unit.getActives()) {
DC_ActiveObj action = (DC_ActiveObj) active;
if (action.getActionGroup() != group) {
continue;
}
if (!StringMaster.isEmpty(action.getActionMode())) {
continue;
}
if (action.isAttackGeneric()) {
continue;
}
List<DC_ActiveObj> subActions = new ArrayList<>();
for (STD_ACTION_MODES mode : STD_ACTION_MODES.values()) {
if (checkModeForAction(action, unit, mode)) {
DC_UnitAction subAction = getModeAction(action, unit, mode);
subActions.add(subAction);
}
}
action.setSubActions(subActions);
actions.addAll(subActions);
}
return actions;
}
Aggregations