diff --git a/src/com/gpl/rpg/atcontentstudio/ATContentStudio.java b/src/com/gpl/rpg/atcontentstudio/ATContentStudio.java index 03c6f04..60947e5 100644 --- a/src/com/gpl/rpg/atcontentstudio/ATContentStudio.java +++ b/src/com/gpl/rpg/atcontentstudio/ATContentStudio.java @@ -18,7 +18,7 @@ import com.gpl.rpg.atcontentstudio.ui.WorkspaceSelector; public class ATContentStudio { public static final String APP_NAME = "Andor's Trail Content Studio"; - public static final String APP_VERSION = "v0.3.3"; + public static final String APP_VERSION = "v0.3.4.dev"; public static boolean STARTED = false; public static StudioFrame frame = null; diff --git a/src/com/gpl/rpg/atcontentstudio/model/gamedata/JSONElement.java b/src/com/gpl/rpg/atcontentstudio/model/gamedata/JSONElement.java index ddf0dbc..94244d6 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/gamedata/JSONElement.java +++ b/src/com/gpl/rpg/atcontentstudio/model/gamedata/JSONElement.java @@ -160,7 +160,8 @@ public abstract class JSONElement extends GameDataElement { else if (chance.equals(0.1d)) return "1/1000"; else if (chance.equals(0.01d)) return "1/10000"; else { - //TODO Better handling of fractions. Chance description need a complete rehaul in AT. + if (chance.intValue() == chance) return Integer.toString(chance.intValue()); + //TODO Better handling of fractions. Chance description need a complete overhaul in AT. //This part does not output the input content of parseDouble(String s) in the case of fractions. return chance.toString(); } diff --git a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/QuestEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/QuestEditor.java index 559273a..dc5f73c 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/QuestEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/QuestEditor.java @@ -263,6 +263,7 @@ public class QuestEditor extends JSONElementEditor { } public void createStage() { + if (quest.stages == null) quest.stages = new ArrayList(); quest.stages.add(new Quest.QuestStage()); for (TableModelListener l: listeners) { l.tableChanged(new TableModelEvent(this, quest.stages.size() - 1)); @@ -283,6 +284,7 @@ public class QuestEditor extends JSONElementEditor { for (TableModelListener l: listeners) { l.tableChanged(new TableModelEvent(this, rowNumber, quest.stages.size())); } + if (quest.stages.isEmpty()) quest.stages = null; } public List listeners = new ArrayList();