Search in sources :

Example 1 with STD_MODES

use of main.content.mode.STD_MODES 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)1 MODE (main.content.mode.MODE)1 ModeImpl (main.content.mode.ModeImpl)1 STD_MODES (main.content.mode.STD_MODES)1 EnumMaster (main.system.auxiliary.EnumMaster)1