Search in sources :

Example 1 with Preset

use of eidolons.test.Preset in project Eidolons by IDemiurge.

the class GameLauncher method launchPreset.

public DC_Game launchPreset(String presetPath) {
    Preset p = PresetMaster.loadPreset(presetPath);
    PresetMaster.setPreset(p);
    if (game == null) {
        game = initGame();
    } else {
        game.dungeonInit();
        initData();
        game.battleInit();
    }
    game.start(true);
    return game;
}
Also used : Preset(eidolons.test.Preset)

Example 2 with Preset

use of eidolons.test.Preset in project Eidolons by IDemiurge.

the class PresetLauncher method launchPresetDynamically.

public static void launchPresetDynamically() {
    Preset profile = choosePreset();
    boolean newDungeon = false;
    String oldDungeon = PresetMaster.getPreset().getValue(FIRST_DUNGEON);
    if (!profile.getValue(FIRST_DUNGEON).equals(oldDungeon)) {
        // preCheck after launch?
        newDungeon = true;
    }
    launchPreset(profile);
    if (newDungeon) {
    // DC_Game.game.getDungeonMaster().initDungeonLevelChoice();
    }
    // TODO
    DC_Game.game.getDebugMaster().executeDebugFunctionNewThread(DEBUG_FUNCTIONS.CLEAR);
// preCheck new dungeon
}
Also used : Preset(eidolons.test.Preset)

Example 3 with Preset

use of eidolons.test.Preset in project Eidolons by IDemiurge.

the class PresetLauncher method initLaunch.

public static LAUNCH initLaunch(String option) {
    launch = new EnumMaster<LAUNCH>().retrieveEnumConst(LAUNCH.class, option);
    if (launch == null) {
        return null;
    }
    if (launch.logChannelsOn != null) {
        Arrays.stream(launch.logChannelsOn).forEach(c -> {
            c.setOn(true);
        });
    }
    if (launch.logChannelsOff != null) {
        Arrays.stream(launch.logChannelsOff).forEach(c -> {
            c.setOn(false);
        });
    }
    if (launch.preset != null) {
        Preset p = PresetMaster.loadPreset(launch.preset);
        PresetMaster.setPreset(p);
    }
    if (launch.dungeonPath != null) {
    // DungeonMaster.setDEFAULT_DUNGEON_PATH(launch.dungeonPath);
    }
    if (launch.dungeonType != null) {
    // DungeonMaster.setDEFAULT_DUNGEON(launch.dungeonType);
    }
    return launch;
}
Also used : EnumMaster(main.system.auxiliary.EnumMaster) Preset(eidolons.test.Preset)

Example 4 with Preset

use of eidolons.test.Preset in project Eidolons by IDemiurge.

the class TestLauncher method createPreset.

protected void createPreset() {
    String enemy = ENEMY_PARTY;
    String party = PLAYER_PARTY;
    if (encounterName != null) {
        enemy = encounterName;
    }
    String levelFilePath = game.getDungeonMaster().getDungeonWrapper().getLevelFilePath();
    if (StringMaster.isEmpty(levelFilePath)) {
        levelFilePath = game.getDungeonMaster().getDungeonWrapper().getLevelFilePath();
    }
    Preset preset = PresetMaster.createPreset(party, enemy, levelFilePath, true);
    PresetMaster.setPreset(preset);
    PresetMaster.updatePreset();
}
Also used : Preset(eidolons.test.Preset)

Example 5 with Preset

use of eidolons.test.Preset in project Eidolons by IDemiurge.

the class PresetLauncher method init.

private static Boolean init(String launchOption) {
    if (isInitLaunch) {
        launch = initLaunch(launchOption);
    }
    Preset p = null;
    if (launch != null) {
        return customInit(launch);
    } else {
        switch(launchOption) {
            case "Last":
                Preset lastPreset = PresetMaster.loadLastPreset();
                UnitGroupMaster.setFactionMode(false);
                UnitTrainingMaster.setRandom(false);
                PresetMaster.setPreset(lastPreset);
                break;
            case "Recent":
                chooseRecentPreset();
                break;
            case "New":
                FAST_DC.getLauncher().DUMMY_MODE = false;
                FAST_DC.getLauncher().DUMMY_PP = false;
                if (FactionMaster.isFactionsSupported())
                    UnitGroupMaster.setFactionMode(DialogMaster.confirm("Faction Mode?"));
                return null;
            case "Superfast":
                FAST_DC.getLauncher().DUMMY_MODE = true;
                FAST_DC.getLauncher().DUMMY_PP = true;
                FAST_DC.getLauncher().setSUPER_FAST_MODE(true);
                return false;
            case "Load":
                // File save = ListChooser.chooseFile(Saver.getSavePath());
                // if (save!=null ){
                // Loader.setPendingLoadPath(save.getPath());
                // }
                Loader.setPendingLoadPath(Saver.getSavePath() + "test.xml");
                break;
        }
    }
    return null;
}
Also used : Preset(eidolons.test.Preset)

Aggregations

Preset (eidolons.test.Preset)6 ArrayList (java.util.ArrayList)1 ListChooser (main.swing.generic.components.editors.lists.ListChooser)1 EnumMaster (main.system.auxiliary.EnumMaster)1