Search in sources :

Example 1 with HUNG_ITEM_ACTION

use of eidolons.game.module.dungeoncrawl.objects.HungItemMaster.HUNG_ITEM_ACTION in project Eidolons by IDemiurge.

the class HungItemMaster method getActions.

public List<DC_ActiveObj> getActions(DungeonObj obj, Unit unit) {
    if (!(obj instanceof HungItem))
        return new ArrayList<>();
    // check intelligence, mastery
    List<DC_ActiveObj> list = new ArrayList<>();
    DC_UnitAction action = null;
    for (HUNG_ITEM_ACTION sub : HUNG_ITEM_ACTION.values()) {
        if (checkAction(unit, (HungItem) obj, sub)) {
            String name = StringMaster.getWellFormattedString(sub.name()) + " Door";
            action = unit.getAction(name);
            if (action == null)
                action = createAction(sub, unit, name, obj);
            if (action != null) {
                list.add(action);
            }
        }
    }
    return list;
}
Also used : ArrayList(java.util.ArrayList) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj) DC_UnitAction(eidolons.entity.active.DC_UnitAction) HUNG_ITEM_ACTION(eidolons.game.module.dungeoncrawl.objects.HungItemMaster.HUNG_ITEM_ACTION)

Aggregations

DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)1 DC_UnitAction (eidolons.entity.active.DC_UnitAction)1 HUNG_ITEM_ACTION (eidolons.game.module.dungeoncrawl.objects.HungItemMaster.HUNG_ITEM_ACTION)1 ArrayList (java.util.ArrayList)1