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;
}
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
}
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;
}
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();
}
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;
}
Aggregations