Search in sources :

Example 1 with ModeImpl

use of main.content.mode.ModeImpl in project Eidolons by IDemiurge.

the class DC_UnitModel method getBehaviorMode.

public BEHAVIOR_MODE getBehaviorMode() {
    MODE mode = getMode();
    if (!(mode instanceof ModeImpl) || mode == null) {
        return null;
    }
    ModeImpl modeImpl = (ModeImpl) mode;
    return modeImpl.getBehaviorMode();
}
Also used : MODE(main.content.mode.MODE) VISION_MODE(main.content.enums.rules.VisionEnums.VISION_MODE) BEHAVIOR_MODE(main.content.enums.system.AiEnums.BEHAVIOR_MODE) ModeImpl(main.content.mode.ModeImpl)

Example 2 with ModeImpl

use of main.content.mode.ModeImpl in project Eidolons by IDemiurge.

the class UnitInitializer method initMode.

public void initMode() {
    String name = getProperty(G_PROPS.MODE);
    MODE mode = (new EnumMaster<STD_MODES>().retrieveEnumConst(STD_MODES.class, name));
    if (mode == null) {
        BEHAVIOR_MODE behavior = new EnumMaster<BEHAVIOR_MODE>().retrieveEnumConst(BEHAVIOR_MODE.class, name);
        if (behavior != null) {
            mode = new ModeImpl(behavior);
        }
    }
    if (mode == null) {
        mode = (STD_MODES.NORMAL);
    }
    getEntity().setMode(mode);
    LogMaster.log(LogMaster.CORE_DEBUG, getName() + " has mode: " + mode);
}
Also used : EnumMaster(main.system.auxiliary.EnumMaster) BEHAVIOR_MODE(main.content.enums.system.AiEnums.BEHAVIOR_MODE) MODE(main.content.mode.MODE) ModeImpl(main.content.mode.ModeImpl) STD_MODES(main.content.mode.STD_MODES) BEHAVIOR_MODE(main.content.enums.system.AiEnums.BEHAVIOR_MODE)

Aggregations

BEHAVIOR_MODE (main.content.enums.system.AiEnums.BEHAVIOR_MODE)2 MODE (main.content.mode.MODE)2 ModeImpl (main.content.mode.ModeImpl)2 VISION_MODE (main.content.enums.rules.VisionEnums.VISION_MODE)1 STD_MODES (main.content.mode.STD_MODES)1 EnumMaster (main.system.auxiliary.EnumMaster)1