mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-01-04 10:32:30 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de0274a5be | ||
|
|
3d2dbb9f51 | ||
|
|
f53302cb18 | ||
|
|
8d6a40eb13 | ||
|
|
0199bcfb4c | ||
|
|
3fe895a668 | ||
|
|
025a63af28 | ||
|
|
528ac7a7e3 | ||
|
|
506afb95ed |
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
|
<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
|
||||||
<jardesc>
|
<jardesc>
|
||||||
<jar path="ATCS/ATCS_v0.6.6.jar"/>
|
<jar path="ATCS/ATCS_v0.6.7.jar"/>
|
||||||
<options buildIfNeeded="true" compress="true" descriptionLocation="/ATCS/ATCS_JAR.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
<options buildIfNeeded="true" compress="true" descriptionLocation="/ATCS/ATCS_JAR.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
||||||
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
||||||
<selectedProjects/>
|
<selectedProjects/>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v0.6.6
|
v0.6.7
|
||||||
@@ -4,7 +4,7 @@ set "ATCS_DIR=%~dp0"
|
|||||||
set "MAX_MEM=512M"
|
set "MAX_MEM=512M"
|
||||||
set "CP=%ATCS_DIR%lib\*"
|
set "CP=%ATCS_DIR%lib\*"
|
||||||
set "JAVA=javaw.exe"
|
set "JAVA=javaw.exe"
|
||||||
set "JAVA_OPTS="
|
set "JAVA_OPTS=-DFONT_SCALE=1.0 -Dswing.aatext=true"
|
||||||
set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"
|
set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"
|
||||||
set "MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio"
|
set "MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio"
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ATCS_DIR=$(dirname $(readlink -f "$0" || greadlink -f "$0" || stat -f "$0"))
|
|||||||
MAX_MEM=512M
|
MAX_MEM=512M
|
||||||
CP=$(find ${ATCS_DIR}/lib/ -name '*.jar' | paste -sd: -)
|
CP=$(find ${ATCS_DIR}/lib/ -name '*.jar' | paste -sd: -)
|
||||||
JAVA=java
|
JAVA=java
|
||||||
JAVA_OPTS=
|
JAVA_OPTS='-DFONT_SCALE=1.0 -Dswing.aatext=true'
|
||||||
ENV_FILE=${ATCS_DIR}/ATCS.env
|
ENV_FILE=${ATCS_DIR}/ATCS.env
|
||||||
MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio
|
MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ set "ATCS_DIR=%~dp0"
|
|||||||
set "MAX_MEM=512M"
|
set "MAX_MEM=512M"
|
||||||
set "CP=%ATCS_DIR%lib\*"
|
set "CP=%ATCS_DIR%lib\*"
|
||||||
set "JAVA=javaw.exe"
|
set "JAVA=javaw.exe"
|
||||||
set "JAVA_OPTS="
|
set "JAVA_OPTS=-DFONT_SCALE=1.0 -Dswing.aatext=true"
|
||||||
set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"
|
set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"
|
||||||
set "MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio"
|
set "MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
!include MUI2.nsh
|
!include MUI2.nsh
|
||||||
|
|
||||||
!define VERSION "0.6.6"
|
!define VERSION "0.6.7"
|
||||||
!define TRAINER_VERSION "0.1.4"
|
!define TRAINER_VERSION "0.1.4"
|
||||||
!define JAVA_BIN "javaw"
|
!define JAVA_BIN "javaw"
|
||||||
|
|
||||||
|
|||||||
@@ -14,18 +14,23 @@ import java.io.InputStreamReader;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import javax.swing.JEditorPane;
|
import javax.swing.JEditorPane;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.UIDefaults;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import javax.swing.UnsupportedLookAndFeelException;
|
import javax.swing.UnsupportedLookAndFeelException;
|
||||||
import javax.swing.event.HyperlinkEvent;
|
import javax.swing.event.HyperlinkEvent;
|
||||||
import javax.swing.event.HyperlinkListener;
|
import javax.swing.event.HyperlinkListener;
|
||||||
|
import javax.swing.plaf.FontUIResource;
|
||||||
|
|
||||||
import com.gpl.rpg.atcontentstudio.model.Workspace;
|
import com.gpl.rpg.atcontentstudio.model.Workspace;
|
||||||
import com.gpl.rpg.atcontentstudio.ui.StudioFrame;
|
import com.gpl.rpg.atcontentstudio.ui.StudioFrame;
|
||||||
@@ -38,12 +43,15 @@ import prefuse.data.expression.parser.ExpressionParser;
|
|||||||
public class ATContentStudio {
|
public class ATContentStudio {
|
||||||
|
|
||||||
public static final String APP_NAME = "Andor's Trail Content Studio";
|
public static final String APP_NAME = "Andor's Trail Content Studio";
|
||||||
public static final String APP_VERSION = "v0.6.6";
|
public static final String APP_VERSION = "v0.6.7";
|
||||||
|
|
||||||
public static final String CHECK_UPDATE_URL = "https://andorstrail.com/static/ATCS_latest";
|
public static final String CHECK_UPDATE_URL = "https://andorstrail.com/static/ATCS_latest";
|
||||||
public static final String DOWNLOAD_URL = "https://andorstrail.com/viewtopic.php?f=6&t=4806";
|
public static final String DOWNLOAD_URL = "https://andorstrail.com/viewtopic.php?f=6&t=4806";
|
||||||
|
|
||||||
|
public static final String FONT_SCALE_ENV_VAR_NAME = "FONT_SCALE";
|
||||||
|
|
||||||
public static boolean STARTED = false;
|
public static boolean STARTED = false;
|
||||||
|
public static float SCALING=1.0f;
|
||||||
public static StudioFrame frame = null;
|
public static StudioFrame frame = null;
|
||||||
|
|
||||||
//Need to keep a strong reference to it, to avoid garbage collection that'll reset these loggers.
|
//Need to keep a strong reference to it, to avoid garbage collection that'll reset these loggers.
|
||||||
@@ -53,6 +61,17 @@ public class ATContentStudio {
|
|||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
String fontScaling = System.getProperty(FONT_SCALE_ENV_VAR_NAME);
|
||||||
|
Float fontScale = null;
|
||||||
|
if (fontScaling != null) {
|
||||||
|
try {
|
||||||
|
fontScale = Float.parseFloat(fontScaling);
|
||||||
|
SCALING=fontScale;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
System.err.println("Failed to parse font scaling parameter. Using default.");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ConfigCache.init();
|
ConfigCache.init();
|
||||||
|
|
||||||
@@ -69,6 +88,9 @@ public class ATContentStudio {
|
|||||||
} catch (UnsupportedLookAndFeelException e) {
|
} catch (UnsupportedLookAndFeelException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
scaleUIFont();
|
||||||
|
|
||||||
//Need to keep a strong reference to it, to avoid garbage collection that'll reset this setting.
|
//Need to keep a strong reference to it, to avoid garbage collection that'll reset this setting.
|
||||||
Logger l = Logger.getLogger(ExpressionParser.class.getName());
|
Logger l = Logger.getLogger(ExpressionParser.class.getName());
|
||||||
@@ -178,4 +200,28 @@ public class ATContentStudio {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void scaleUIFont() {
|
||||||
|
if (SCALING != 1.0f) {
|
||||||
|
System.out.println("Scaling fonts to "+SCALING);
|
||||||
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
|
||||||
|
Map<Object, Object> newDefaults = new HashMap<Object, Object>();
|
||||||
|
for (Enumeration<Object> e = defaults.keys(); e.hasMoreElements();) {
|
||||||
|
Object key = e.nextElement();
|
||||||
|
Object value = defaults.get(key);
|
||||||
|
if (value instanceof Font) {
|
||||||
|
Font font = (Font) value;
|
||||||
|
int newSize = (int)(font.getSize() * SCALING);
|
||||||
|
if (value instanceof FontUIResource) {
|
||||||
|
newDefaults.put(key, new FontUIResource(font.getName(), font.getStyle(), newSize));
|
||||||
|
} else {
|
||||||
|
newDefaults.put(key, new Font(font.getName(), font.getStyle(), newSize));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (Object key : newDefaults.keySet()) {
|
||||||
|
defaults.put(key, newDefaults.get(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
src/com/gpl/rpg/atcontentstudio/img/alignment.png
Normal file
BIN
src/com/gpl/rpg/atcontentstudio/img/alignment.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/com/gpl/rpg/atcontentstudio/img/bonemeal.png
Normal file
BIN
src/com/gpl/rpg/atcontentstudio/img/bonemeal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 607 B |
BIN
src/com/gpl/rpg/atcontentstudio/img/timer.png
Normal file
BIN
src/com/gpl/rpg/atcontentstudio/img/timer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 881 B |
BIN
src/com/gpl/rpg/atcontentstudio/img/ui_icon_skill.png
Normal file
BIN
src/com/gpl/rpg/atcontentstudio/img/ui_icon_skill.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
@@ -222,6 +222,8 @@ public class Project implements ProjectTreeNode, Serializable {
|
|||||||
public void refreshTransients(Workspace w) {
|
public void refreshTransients(Workspace w) {
|
||||||
this.parent = w;
|
this.parent = w;
|
||||||
|
|
||||||
|
projectElementListeners = new HashMap<Class<? extends GameDataElement>, List<ProjectElementListener>>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
knownSpritesheetsProperties = new Properties();
|
knownSpritesheetsProperties = new Properties();
|
||||||
knownSpritesheetsProperties.load(Project.class.getResourceAsStream("/spritesheets.properties"));
|
knownSpritesheetsProperties.load(Project.class.getResourceAsStream("/spritesheets.properties"));
|
||||||
@@ -254,7 +256,6 @@ public class Project implements ProjectTreeNode, Serializable {
|
|||||||
|
|
||||||
linkAll();
|
linkAll();
|
||||||
|
|
||||||
projectElementListeners = new HashMap<Class<? extends GameDataElement>, List<ProjectElementListener>>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void linkAll() {
|
public void linkAll() {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
private static final long serialVersionUID = -3969824899972048507L;
|
private static final long serialVersionUID = -3969824899972048507L;
|
||||||
|
|
||||||
public static final Integer CLEAR_AC_MAGNITUDE = -99;
|
public static final Integer CLEAR_AC_MAGNITUDE = -99;
|
||||||
|
public static final Integer FOREVER_DURATION = 999;
|
||||||
|
|
||||||
// Available from init state
|
// Available from init state
|
||||||
//public String id; inherited.
|
//public String id; inherited.
|
||||||
@@ -43,9 +44,16 @@ public class ActorCondition extends JSONElement {
|
|||||||
blood
|
blood
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static enum VisualEffectID {
|
||||||
|
redSplash
|
||||||
|
,blueSwirl
|
||||||
|
,greenSplash
|
||||||
|
,miss
|
||||||
|
}
|
||||||
|
|
||||||
public static class RoundEffect implements Cloneable {
|
public static class RoundEffect implements Cloneable {
|
||||||
// Available from parsed state
|
// Available from parsed state
|
||||||
public String visual_effect = null;
|
public VisualEffectID visual_effect = null;
|
||||||
public Integer hp_boost_min = null;
|
public Integer hp_boost_min = null;
|
||||||
public Integer hp_boost_max = null;
|
public Integer hp_boost_max = null;
|
||||||
public Integer ap_boost_min = null;
|
public Integer ap_boost_min = null;
|
||||||
@@ -180,7 +188,13 @@ public class ActorCondition extends JSONElement {
|
|||||||
this.round_effect.ap_boost_max = JSONElement.getInteger((Number) (((Map)roundEffect.get("increaseCurrentAP")).get("max")));
|
this.round_effect.ap_boost_max = JSONElement.getInteger((Number) (((Map)roundEffect.get("increaseCurrentAP")).get("max")));
|
||||||
this.round_effect.ap_boost_min = JSONElement.getInteger((Number) (((Map)roundEffect.get("increaseCurrentAP")).get("min")));
|
this.round_effect.ap_boost_min = JSONElement.getInteger((Number) (((Map)roundEffect.get("increaseCurrentAP")).get("min")));
|
||||||
}
|
}
|
||||||
this.round_effect.visual_effect = (String) roundEffect.get("visualEffectID");
|
String vfx = (String) roundEffect.get("visualEffectID");
|
||||||
|
this.round_effect.visual_effect = null;
|
||||||
|
if (vfx != null) {
|
||||||
|
try {
|
||||||
|
this.round_effect.visual_effect = VisualEffectID.valueOf(vfx);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Map fullRoundEffect = (Map) aCondJson.get("fullRoundEffect");
|
Map fullRoundEffect = (Map) aCondJson.get("fullRoundEffect");
|
||||||
if (fullRoundEffect != null) {
|
if (fullRoundEffect != null) {
|
||||||
@@ -193,7 +207,13 @@ public class ActorCondition extends JSONElement {
|
|||||||
this.full_round_effect.ap_boost_max = JSONElement.getInteger((Number) (((Map)fullRoundEffect.get("increaseCurrentAP")).get("max")));
|
this.full_round_effect.ap_boost_max = JSONElement.getInteger((Number) (((Map)fullRoundEffect.get("increaseCurrentAP")).get("max")));
|
||||||
this.full_round_effect.ap_boost_min = JSONElement.getInteger((Number) (((Map)fullRoundEffect.get("increaseCurrentAP")).get("min")));
|
this.full_round_effect.ap_boost_min = JSONElement.getInteger((Number) (((Map)fullRoundEffect.get("increaseCurrentAP")).get("min")));
|
||||||
}
|
}
|
||||||
this.full_round_effect.visual_effect = (String) fullRoundEffect.get("visualEffectID");
|
String vfx = (String) roundEffect.get("visualEffectID");
|
||||||
|
this.full_round_effect.visual_effect = null;
|
||||||
|
if (vfx != null) {
|
||||||
|
try {
|
||||||
|
this.full_round_effect.visual_effect = VisualEffectID.valueOf(vfx);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.state = State.parsed;
|
this.state = State.parsed;
|
||||||
|
|
||||||
@@ -278,7 +298,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
if (this.stacking != null && this.stacking == 1) jsonAC.put("isStacking", this.stacking);
|
if (this.stacking != null && this.stacking == 1) jsonAC.put("isStacking", this.stacking);
|
||||||
if (this.round_effect != null) {
|
if (this.round_effect != null) {
|
||||||
Map jsonRound = new LinkedHashMap();
|
Map jsonRound = new LinkedHashMap();
|
||||||
if (this.round_effect.visual_effect != null) jsonRound.put("visualEffectID", this.round_effect.visual_effect);
|
if (this.round_effect.visual_effect != null) jsonRound.put("visualEffectID", this.round_effect.visual_effect.toString());
|
||||||
if (this.round_effect.hp_boost_min != null || this.round_effect.hp_boost_max != null) {
|
if (this.round_effect.hp_boost_min != null || this.round_effect.hp_boost_max != null) {
|
||||||
Map jsonHP = new LinkedHashMap();
|
Map jsonHP = new LinkedHashMap();
|
||||||
if (this.round_effect.hp_boost_min != null) jsonHP.put("min", this.round_effect.hp_boost_min);
|
if (this.round_effect.hp_boost_min != null) jsonHP.put("min", this.round_effect.hp_boost_min);
|
||||||
@@ -299,7 +319,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
}
|
}
|
||||||
if (this.full_round_effect != null) {
|
if (this.full_round_effect != null) {
|
||||||
Map jsonFullRound = new LinkedHashMap();
|
Map jsonFullRound = new LinkedHashMap();
|
||||||
if (this.full_round_effect.visual_effect != null) jsonFullRound.put("visualEffectID", this.full_round_effect.visual_effect);
|
if (this.full_round_effect.visual_effect != null) jsonFullRound.put("visualEffectID", this.full_round_effect.visual_effect.toString());
|
||||||
if (this.full_round_effect.hp_boost_min != null || this.full_round_effect.hp_boost_max != null) {
|
if (this.full_round_effect.hp_boost_min != null || this.full_round_effect.hp_boost_max != null) {
|
||||||
Map jsonHP = new LinkedHashMap();
|
Map jsonHP = new LinkedHashMap();
|
||||||
if (this.full_round_effect.hp_boost_min != null) jsonHP.put("min", this.full_round_effect.hp_boost_min);
|
if (this.full_round_effect.hp_boost_min != null) jsonHP.put("min", this.full_round_effect.hp_boost_min);
|
||||||
|
|||||||
@@ -53,12 +53,61 @@ public class Requirement extends JSONElement {
|
|||||||
usedItem,
|
usedItem,
|
||||||
spentGold,
|
spentGold,
|
||||||
consumedBonemeals,
|
consumedBonemeals,
|
||||||
hasActorCondition
|
hasActorCondition,
|
||||||
|
factionScore
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SkillID {
|
||||||
|
weaponChance
|
||||||
|
,weaponDmg
|
||||||
|
,barter
|
||||||
|
,dodge
|
||||||
|
,barkSkin
|
||||||
|
,moreCriticals
|
||||||
|
,betterCriticals
|
||||||
|
,speed // Raises max ap
|
||||||
|
,coinfinder
|
||||||
|
,moreExp
|
||||||
|
,cleave // +10ap on kill
|
||||||
|
,eater // +1hp per kill
|
||||||
|
,fortitude // +N hp per levelup
|
||||||
|
,evasion // increase successful flee chance & reduce chance of monster attack
|
||||||
|
,regeneration // +N hp per round
|
||||||
|
,lowerExploss
|
||||||
|
,magicfinder
|
||||||
|
,resistanceMental // lowers chance to get negative active conditions by monsters (Mental like Dazed)
|
||||||
|
,resistancePhysical // lowers chance to get negative active conditions by monsters (Physical Capacity like Minor fatigue)
|
||||||
|
,resistanceBlood // lowers chance to get negative active conditions by monsters (Blood Disorder like Weak Poison)
|
||||||
|
,shadowBless
|
||||||
|
,crit1 // lowers atk ability
|
||||||
|
,crit2 // lowers def ability ,rejuvenation // Reduces magnitudes of conditions
|
||||||
|
,rejuvenation // Reduces magnitudes of conditions
|
||||||
|
,taunt // Causes AP loss of attackers that miss
|
||||||
|
,concussion // AC loss for monsters with (AC-BC)>N
|
||||||
|
,weaponProficiencyDagger
|
||||||
|
,weaponProficiency1hsword
|
||||||
|
,weaponProficiency2hsword
|
||||||
|
,weaponProficiencyAxe
|
||||||
|
,weaponProficiencyBlunt
|
||||||
|
,weaponProficiencyUnarmed
|
||||||
|
,armorProficiencyShield
|
||||||
|
,armorProficiencyUnarmored
|
||||||
|
,armorProficiencyLight
|
||||||
|
,armorProficiencyHeavy
|
||||||
|
,fightstyleDualWield
|
||||||
|
,fightstyle2hand
|
||||||
|
,fightstyleWeaponShield
|
||||||
|
,specializationDualWield
|
||||||
|
,specialization2hand
|
||||||
|
,specializationWeaponShield
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDesc() {
|
public String getDesc() {
|
||||||
return ((negated != null && negated) ? "NOT " : "")+required_obj_id+(required_value == null ? "" : ":"+required_value.toString());
|
return ((negated != null && negated) ? "NOT " : "")
|
||||||
|
+(type == null ? "" : type.toString()+":")
|
||||||
|
+(required_obj_id == null ? "" : required_obj_id+":")
|
||||||
|
+(required_value == null ? "" : required_value.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import java.util.Map;
|
|||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.tree.TreeNode;
|
import javax.swing.tree.TreeNode;
|
||||||
|
|
||||||
|
import com.gpl.rpg.atcontentstudio.ATContentStudio;
|
||||||
import com.gpl.rpg.atcontentstudio.Notification;
|
import com.gpl.rpg.atcontentstudio.Notification;
|
||||||
import com.gpl.rpg.atcontentstudio.model.GameDataElement;
|
import com.gpl.rpg.atcontentstudio.model.GameDataElement;
|
||||||
import com.gpl.rpg.atcontentstudio.model.GameSource.Type;
|
import com.gpl.rpg.atcontentstudio.model.GameSource.Type;
|
||||||
@@ -174,7 +175,7 @@ public class Spritesheet extends GameDataElement {
|
|||||||
}
|
}
|
||||||
Image result = getImage(index);
|
Image result = getImage(index);
|
||||||
if (result == null) return null;
|
if (result == null) return null;
|
||||||
result = result.getScaledInstance(16, 16, BufferedImage.SCALE_SMOOTH);
|
result = result.getScaledInstance((int)(16*ATContentStudio.SCALING), (int)(16*ATContentStudio.SCALING), Image.SCALE_SMOOTH);
|
||||||
cache_icon.put(index, result);
|
cache_icon.put(index, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
|
import com.gpl.rpg.atcontentstudio.ATContentStudio;
|
||||||
import com.gpl.rpg.atcontentstudio.Notification;
|
import com.gpl.rpg.atcontentstudio.Notification;
|
||||||
|
|
||||||
public class DefaultIcons {
|
public class DefaultIcons {
|
||||||
@@ -107,6 +108,10 @@ public class DefaultIcons {
|
|||||||
public static Image getNPCImage() { return getImage(NPC_RES); }
|
public static Image getNPCImage() { return getImage(NPC_RES); }
|
||||||
public static Image getNPCIcon() { return getIcon(NPC_RES); }
|
public static Image getNPCIcon() { return getIcon(NPC_RES); }
|
||||||
|
|
||||||
|
private static String BONEMEAL_RES = "/com/gpl/rpg/atcontentstudio/img/bonemeal.png";
|
||||||
|
public static Image getBonemealImage() { return getImage(BONEMEAL_RES); }
|
||||||
|
public static Image getBonemealIcon() { return getIcon(BONEMEAL_RES); }
|
||||||
|
|
||||||
private static String NPC_CLOSE_RES = "/com/gpl/rpg/atcontentstudio/img/npc_close.png";
|
private static String NPC_CLOSE_RES = "/com/gpl/rpg/atcontentstudio/img/npc_close.png";
|
||||||
public static Image getNPCCloseImage() { return getImage(NPC_CLOSE_RES); }
|
public static Image getNPCCloseImage() { return getImage(NPC_CLOSE_RES); }
|
||||||
public static Image getNPCCloseIcon() { return getIcon(NPC_CLOSE_RES); }
|
public static Image getNPCCloseIcon() { return getIcon(NPC_CLOSE_RES); }
|
||||||
@@ -130,6 +135,10 @@ public class DefaultIcons {
|
|||||||
private static String GOLD_RES = "/com/gpl/rpg/atcontentstudio/img/ui_icon_coins.png";
|
private static String GOLD_RES = "/com/gpl/rpg/atcontentstudio/img/ui_icon_coins.png";
|
||||||
public static Image getGoldImage() { return getImage(GOLD_RES); }
|
public static Image getGoldImage() { return getImage(GOLD_RES); }
|
||||||
public static Image getGoldIcon() { return getIcon(GOLD_RES); }
|
public static Image getGoldIcon() { return getIcon(GOLD_RES); }
|
||||||
|
|
||||||
|
private static String SKILL_RES = "/com/gpl/rpg/atcontentstudio/img/ui_icon_skill.png";
|
||||||
|
public static Image getSkillImage() { return getImage(SKILL_RES); }
|
||||||
|
public static Image getSkillIcon() { return getIcon(SKILL_RES); }
|
||||||
|
|
||||||
private static String ITEM_CATEGORY_RES = "/com/gpl/rpg/atcontentstudio/img/equip_weapon.png";
|
private static String ITEM_CATEGORY_RES = "/com/gpl/rpg/atcontentstudio/img/equip_weapon.png";
|
||||||
public static Image getItemCategoryImage() { return getImage(ITEM_CATEGORY_RES); }
|
public static Image getItemCategoryImage() { return getImage(ITEM_CATEGORY_RES); }
|
||||||
@@ -235,6 +244,14 @@ public class DefaultIcons {
|
|||||||
public static Image getZoomImage() { return getImage(ZOOM_RES); }
|
public static Image getZoomImage() { return getImage(ZOOM_RES); }
|
||||||
public static Image getZoomIcon() { return getIcon(ZOOM_RES); }
|
public static Image getZoomIcon() { return getIcon(ZOOM_RES); }
|
||||||
|
|
||||||
|
private static String TIMER_RES = "/com/gpl/rpg/atcontentstudio/img/timer.png";
|
||||||
|
public static Image getTimerImage() { return getImage(TIMER_RES); }
|
||||||
|
public static Image getTimerIcon() { return getIcon(TIMER_RES); }
|
||||||
|
|
||||||
|
private static String ALIGNMENT_RES = "/com/gpl/rpg/atcontentstudio/img/alignment.png";
|
||||||
|
public static Image getAlignmentImage() { return getImage(ALIGNMENT_RES); }
|
||||||
|
public static Image getAlignmentIcon() { return getIcon(ALIGNMENT_RES); }
|
||||||
|
|
||||||
private static String STATUS_RED_RES = "/com/gpl/rpg/atcontentstudio/img/status_red.png";
|
private static String STATUS_RED_RES = "/com/gpl/rpg/atcontentstudio/img/status_red.png";
|
||||||
public static Image getStatusRedImage() { return getImage(STATUS_RED_RES); }
|
public static Image getStatusRedImage() { return getImage(STATUS_RED_RES); }
|
||||||
public static Image getStatusRedIcon() { return getIcon(STATUS_RED_RES); }
|
public static Image getStatusRedIcon() { return getIcon(STATUS_RED_RES); }
|
||||||
@@ -271,7 +288,7 @@ public class DefaultIcons {
|
|||||||
|
|
||||||
private static Image getIcon(String res) {
|
private static Image getIcon(String res) {
|
||||||
if (iconCache.get(res) == null) {
|
if (iconCache.get(res) == null) {
|
||||||
Image icon = getImage(res).getScaledInstance(16, 16, Image.SCALE_SMOOTH);
|
Image icon = getImage(res).getScaledInstance((int)(16*ATContentStudio.SCALING), (int)(16*ATContentStudio.SCALING), Image.SCALE_SMOOTH);
|
||||||
iconCache.put(res, icon);
|
iconCache.put(res, icon);
|
||||||
}
|
}
|
||||||
return iconCache.get(res);
|
return iconCache.get(res);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import javax.swing.ListModel;
|
|||||||
import javax.swing.event.ListDataEvent;
|
import javax.swing.event.ListDataEvent;
|
||||||
import javax.swing.event.ListDataListener;
|
import javax.swing.event.ListDataListener;
|
||||||
|
|
||||||
|
import com.gpl.rpg.atcontentstudio.ATContentStudio;
|
||||||
import com.gpl.rpg.atcontentstudio.Notification;
|
import com.gpl.rpg.atcontentstudio.Notification;
|
||||||
import com.gpl.rpg.atcontentstudio.NotificationListener;
|
import com.gpl.rpg.atcontentstudio.NotificationListener;
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ public class NotificationsPane extends JList {
|
|||||||
label.setBorder(BorderFactory.createLineBorder(Color.BLUE));
|
label.setBorder(BorderFactory.createLineBorder(Color.BLUE));
|
||||||
// label.setForeground(Color.WHITE);
|
// label.setForeground(Color.WHITE);
|
||||||
}
|
}
|
||||||
f = f.deriveFont(10f);
|
f = f.deriveFont(10f*ATContentStudio.SCALING);
|
||||||
label.setFont(f);
|
label.setFont(f);
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class StudioFrame extends JFrame {
|
|||||||
|
|
||||||
private static final long serialVersionUID = -3391514100319186661L;
|
private static final long serialVersionUID = -3391514100319186661L;
|
||||||
|
|
||||||
|
|
||||||
final ProjectsTree projectTree;
|
final ProjectsTree projectTree;
|
||||||
final EditorsArea editors;
|
final EditorsArea editors;
|
||||||
|
|
||||||
@@ -165,6 +165,7 @@ public class StudioFrame extends JFrame {
|
|||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
try {
|
try {
|
||||||
UIManager.setLookAndFeel(i.getClassName());
|
UIManager.setLookAndFeel(i.getClassName());
|
||||||
|
ATContentStudio.scaleUIFont();
|
||||||
SwingUtilities.updateComponentTreeUI(ATContentStudio.frame);
|
SwingUtilities.updateComponentTreeUI(ATContentStudio.frame);
|
||||||
ConfigCache.setFavoriteLaFClassName(i.getClassName());
|
ConfigCache.setFavoriteLaFClassName(i.getClassName());
|
||||||
} catch (ClassNotFoundException e1) {
|
} catch (ClassNotFoundException e1) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import javax.swing.JDialog;
|
|||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
|
import com.gpl.rpg.atcontentstudio.ATContentStudio;
|
||||||
import com.jidesoft.swing.JideBoxLayout;
|
import com.jidesoft.swing.JideBoxLayout;
|
||||||
|
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ private static final long serialVersionUID = 8239669104275145995L;
|
|||||||
super(parent, "Loading...");
|
super(parent, "Loading...");
|
||||||
this.setIconImage(DefaultIcons.getMainIconImage());
|
this.setIconImage(DefaultIcons.getMainIconImage());
|
||||||
this.getContentPane().setLayout(new JideBoxLayout(this.getContentPane(), JideBoxLayout.PAGE_AXIS, 6));
|
this.getContentPane().setLayout(new JideBoxLayout(this.getContentPane(), JideBoxLayout.PAGE_AXIS, 6));
|
||||||
this.getContentPane().add(new JLabel("<html><font size=5>Please wait.<br/>"+message+"</font></html>"), JideBoxLayout.VARY);
|
this.getContentPane().add(new JLabel("<html><font size="+(int)(5 * ATContentStudio.SCALING)+">Please wait.<br/>"+message+"</font></html>"), JideBoxLayout.VARY);
|
||||||
JMovingIdler idler = new JMovingIdler();
|
JMovingIdler idler = new JMovingIdler();
|
||||||
idler.setBackground(Color.WHITE);
|
idler.setBackground(Color.WHITE);
|
||||||
idler.setForeground(Color.GREEN);
|
idler.setForeground(Color.GREEN);
|
||||||
@@ -46,7 +47,7 @@ private static final long serialVersionUID = 8239669104275145995L;
|
|||||||
info.setVisible(true);
|
info.setVisible(true);
|
||||||
workload.run();
|
workload.run();
|
||||||
info.dispose();
|
info.dispose();
|
||||||
if (showConfirm) JOptionPane.showMessageDialog(parent, "<html><font size=5>Done !</font></html>");
|
if (showConfirm) JOptionPane.showMessageDialog(parent, "<html><font size="+(int)(5 * ATContentStudio.SCALING)+">Done !</font></html>");
|
||||||
};
|
};
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,13 +35,15 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
private IntegerBasedCheckBox positiveBox;
|
private IntegerBasedCheckBox positiveBox;
|
||||||
private IntegerBasedCheckBox stackingBox;
|
private IntegerBasedCheckBox stackingBox;
|
||||||
|
|
||||||
private JTextField roundVisualField;
|
//private JTextField roundVisualField;
|
||||||
|
private JComboBox roundVisualField;
|
||||||
private JSpinner roundHpMinField;
|
private JSpinner roundHpMinField;
|
||||||
private JSpinner roundHpMaxField;
|
private JSpinner roundHpMaxField;
|
||||||
private JSpinner roundApMinField;
|
private JSpinner roundApMinField;
|
||||||
private JSpinner roundApMaxField;
|
private JSpinner roundApMaxField;
|
||||||
|
|
||||||
private JTextField fullRoundVisualField;
|
//private JTextField fullRoundVisualField;
|
||||||
|
private JComboBox fullRoundVisualField;
|
||||||
private JSpinner fullRoundHpMinField;
|
private JSpinner fullRoundHpMinField;
|
||||||
private JSpinner fullRoundHpMaxField;
|
private JSpinner fullRoundHpMaxField;
|
||||||
private JSpinner fullRoundApMinField;
|
private JSpinner fullRoundApMinField;
|
||||||
@@ -82,7 +84,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
stackingBox = addIntegerBasedCheckBox(pane, "Stacking", ac.stacking, ac.writable, listener);
|
stackingBox = addIntegerBasedCheckBox(pane, "Stacking", ac.stacking, ac.writable, listener);
|
||||||
|
|
||||||
|
|
||||||
CollapsiblePanel roundEffectPane = new CollapsiblePanel("Effect every round (4s): ");
|
CollapsiblePanel roundEffectPane = new CollapsiblePanel("Effect every round (6s): ");
|
||||||
roundEffectPane.setLayout(new JideBoxLayout(roundEffectPane, JideBoxLayout.PAGE_AXIS));
|
roundEffectPane.setLayout(new JideBoxLayout(roundEffectPane, JideBoxLayout.PAGE_AXIS));
|
||||||
final ActorCondition.RoundEffect roundEffect;
|
final ActorCondition.RoundEffect roundEffect;
|
||||||
if (ac.round_effect != null) {
|
if (ac.round_effect != null) {
|
||||||
@@ -90,7 +92,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
} else {
|
} else {
|
||||||
roundEffect = new ActorCondition.RoundEffect();
|
roundEffect = new ActorCondition.RoundEffect();
|
||||||
}
|
}
|
||||||
roundVisualField = addTextField(roundEffectPane, "Visual effect ID: ", roundEffect.visual_effect, ac.writable, listener);
|
roundVisualField = addEnumValueBox(roundEffectPane, "Visual effect ID:", ActorCondition.VisualEffectID.values(), roundEffect.visual_effect, ac.writable, listener);//addTextField(roundEffectPane, "Visual effect ID: ", roundEffect.visual_effect, ac.writable, listener);
|
||||||
roundHpMinField = addIntegerField(roundEffectPane, "HP Bonus Min: ", roundEffect.hp_boost_min, true, ac.writable, listener);
|
roundHpMinField = addIntegerField(roundEffectPane, "HP Bonus Min: ", roundEffect.hp_boost_min, true, ac.writable, listener);
|
||||||
roundHpMaxField = addIntegerField(roundEffectPane, "HP Bonus Max: ", roundEffect.hp_boost_max, true, ac.writable, listener);
|
roundHpMaxField = addIntegerField(roundEffectPane, "HP Bonus Max: ", roundEffect.hp_boost_max, true, ac.writable, listener);
|
||||||
roundApMinField = addIntegerField(roundEffectPane, "AP Bonus Min: ", roundEffect.ap_boost_min, true, ac.writable, listener);
|
roundApMinField = addIntegerField(roundEffectPane, "AP Bonus Min: ", roundEffect.ap_boost_min, true, ac.writable, listener);
|
||||||
@@ -99,7 +101,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
pane.add(roundEffectPane, JideBoxLayout.FIX);
|
pane.add(roundEffectPane, JideBoxLayout.FIX);
|
||||||
|
|
||||||
|
|
||||||
CollapsiblePanel fullRoundEffectPane = new CollapsiblePanel("Effect every full round (20s): ");
|
CollapsiblePanel fullRoundEffectPane = new CollapsiblePanel("Effect every full round (25s): ");
|
||||||
fullRoundEffectPane.setLayout(new JideBoxLayout(fullRoundEffectPane, JideBoxLayout.PAGE_AXIS));
|
fullRoundEffectPane.setLayout(new JideBoxLayout(fullRoundEffectPane, JideBoxLayout.PAGE_AXIS));
|
||||||
final ActorCondition.RoundEffect fullRoundEffect;
|
final ActorCondition.RoundEffect fullRoundEffect;
|
||||||
if (ac.full_round_effect != null) {
|
if (ac.full_round_effect != null) {
|
||||||
@@ -107,7 +109,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
} else {
|
} else {
|
||||||
fullRoundEffect = new ActorCondition.RoundEffect();
|
fullRoundEffect = new ActorCondition.RoundEffect();
|
||||||
}
|
}
|
||||||
fullRoundVisualField = addTextField(fullRoundEffectPane, "Visual effect ID: ", fullRoundEffect.visual_effect, ac.writable, listener);
|
fullRoundVisualField = addEnumValueBox(fullRoundEffectPane, "Visual effect ID:", ActorCondition.VisualEffectID.values(), fullRoundEffect.visual_effect, ac.writable, listener);//addTextField(fullRoundEffectPane, "Visual effect ID: ", fullRoundEffect.visual_effect, ac.writable, listener);
|
||||||
fullRoundHpMinField = addIntegerField(fullRoundEffectPane, "HP Bonus min: ", fullRoundEffect.hp_boost_min, true, ac.writable, listener);
|
fullRoundHpMinField = addIntegerField(fullRoundEffectPane, "HP Bonus min: ", fullRoundEffect.hp_boost_min, true, ac.writable, listener);
|
||||||
fullRoundHpMaxField = addIntegerField(fullRoundEffectPane, "HP Bonus max: ", fullRoundEffect.hp_boost_max, true, ac.writable, listener);
|
fullRoundHpMaxField = addIntegerField(fullRoundEffectPane, "HP Bonus max: ", fullRoundEffect.hp_boost_max, true, ac.writable, listener);
|
||||||
fullRoundApMinField = addIntegerField(fullRoundEffectPane, "AP Bonus min: ", fullRoundEffect.ap_boost_min, true, ac.writable, listener);
|
fullRoundApMinField = addIntegerField(fullRoundEffectPane, "AP Bonus min: ", fullRoundEffect.ap_boost_min, true, ac.writable, listener);
|
||||||
@@ -194,7 +196,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
if (aCond.round_effect == null) {
|
if (aCond.round_effect == null) {
|
||||||
aCond.round_effect = new ActorCondition.RoundEffect();
|
aCond.round_effect = new ActorCondition.RoundEffect();
|
||||||
}
|
}
|
||||||
aCond.round_effect.visual_effect = (String) value;
|
aCond.round_effect.visual_effect = (ActorCondition.VisualEffectID) value;
|
||||||
}
|
}
|
||||||
} else if (source == roundHpMinField) {
|
} else if (source == roundHpMinField) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
@@ -264,7 +266,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
if (aCond.full_round_effect == null) {
|
if (aCond.full_round_effect == null) {
|
||||||
aCond.full_round_effect = new ActorCondition.RoundEffect();
|
aCond.full_round_effect = new ActorCondition.RoundEffect();
|
||||||
}
|
}
|
||||||
aCond.full_round_effect.visual_effect = (String) value;
|
aCond.full_round_effect.visual_effect = (ActorCondition.VisualEffectID) value;
|
||||||
}
|
}
|
||||||
} else if (source == fullRoundHpMinField) {
|
} else if (source == fullRoundHpMinField) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
|
import javax.swing.ButtonGroup;
|
||||||
import javax.swing.DefaultListCellRenderer;
|
import javax.swing.DefaultListCellRenderer;
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
@@ -22,6 +23,7 @@ import javax.swing.JComponent;
|
|||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JRadioButton;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JSpinner;
|
import javax.swing.JSpinner;
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
@@ -96,6 +98,8 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
private JComboBox rewardObjIdCombo;
|
private JComboBox rewardObjIdCombo;
|
||||||
private MyComboBox rewardObj;
|
private MyComboBox rewardObj;
|
||||||
private JComponent rewardValue;
|
private JComponent rewardValue;
|
||||||
|
private JRadioButton rewardConditionTimed;
|
||||||
|
private JRadioButton rewardConditionForever;
|
||||||
|
|
||||||
private RepliesListModel repliesListModel;
|
private RepliesListModel repliesListModel;
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@@ -114,6 +118,7 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
private JComboBox requirementTypeCombo;
|
private JComboBox requirementTypeCombo;
|
||||||
private JPanel requirementParamsPane;
|
private JPanel requirementParamsPane;
|
||||||
private MyComboBox requirementObj;
|
private MyComboBox requirementObj;
|
||||||
|
private JComboBox requirementSkill;
|
||||||
private JTextField requirementObjId;
|
private JTextField requirementObjId;
|
||||||
private JComponent requirementValue;
|
private JComponent requirementValue;
|
||||||
private BooleanBasedCheckBox requirementNegated;
|
private BooleanBasedCheckBox requirementNegated;
|
||||||
@@ -384,11 +389,37 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
rewardValue = null;
|
rewardValue = null;
|
||||||
break;
|
break;
|
||||||
case actorCondition:
|
case actorCondition:
|
||||||
|
|
||||||
rewardMap = null;
|
rewardMap = null;
|
||||||
rewardObjId = null;
|
rewardObjId = null;
|
||||||
rewardObjIdCombo = null;
|
rewardObjIdCombo = null;
|
||||||
rewardObj = addActorConditionBox(pane, ((Dialogue)target).getProject(), "Actor Condition: ", (ActorCondition) reward.reward_obj, writable, listener);
|
rewardObj = addActorConditionBox(pane, ((Dialogue)target).getProject(), "Actor Condition: ", (ActorCondition) reward.reward_obj, writable, listener);
|
||||||
|
rewardConditionTimed = new JRadioButton("For a number of rounds");
|
||||||
|
pane.add(rewardConditionTimed, JideBoxLayout.FIX);
|
||||||
rewardValue = addIntegerField(pane, "Duration: ", reward.reward_value, false, writable, listener);
|
rewardValue = addIntegerField(pane, "Duration: ", reward.reward_value, false, writable, listener);
|
||||||
|
rewardConditionForever = new JRadioButton("Forever");
|
||||||
|
pane.add(rewardConditionForever, JideBoxLayout.FIX);
|
||||||
|
|
||||||
|
ButtonGroup radioGroup = new ButtonGroup();
|
||||||
|
radioGroup.add(rewardConditionTimed);
|
||||||
|
radioGroup.add(rewardConditionForever);
|
||||||
|
|
||||||
|
rewardConditionTimed.setSelected(reward.reward_value == null || reward.reward_value != ActorCondition.FOREVER_DURATION);
|
||||||
|
rewardConditionForever.setSelected(!rewardConditionTimed.isSelected());
|
||||||
|
|
||||||
|
rewardConditionTimed.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
listener.valueChanged(rewardConditionTimed, new Boolean(rewardConditionTimed.isSelected()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
rewardConditionForever.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
listener.valueChanged(rewardConditionForever, new Boolean(rewardConditionForever.isSelected()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case alignmentChange:
|
case alignmentChange:
|
||||||
rewardMap = null;
|
rewardMap = null;
|
||||||
@@ -426,9 +457,13 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
rewardValue = addQuestStageBox(pane, ((Dialogue)target).getProject(), "Quest stage: ", reward.reward_value, writable, listener, (Quest) reward.reward_obj, rewardObj);
|
rewardValue = addQuestStageBox(pane, ((Dialogue)target).getProject(), "Quest stage: ", reward.reward_value, writable, listener, (Quest) reward.reward_obj, rewardObj);
|
||||||
break;
|
break;
|
||||||
case skillIncrease:
|
case skillIncrease:
|
||||||
|
Requirement.SkillID skillId = null;
|
||||||
|
try {
|
||||||
|
skillId = reward.reward_obj_id == null ? null : Requirement.SkillID.valueOf(reward.reward_obj_id);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
rewardMap = null;
|
rewardMap = null;
|
||||||
rewardObjId = addTextField(pane, "Skill ID: ", reward.reward_obj_id, writable, listener);
|
rewardObjId = null;// addTextField(pane, "Skill ID: ", reward.reward_obj_id, writable, listener);
|
||||||
rewardObjIdCombo = null;
|
rewardObjIdCombo = addEnumValueBox(pane, "Skill ID: ", Requirement.SkillID.values(), skillId, writable, listener);
|
||||||
rewardObj = null;
|
rewardObj = null;
|
||||||
rewardValue = null;
|
rewardValue = null;
|
||||||
break;
|
break;
|
||||||
@@ -684,8 +719,13 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
requirementValue = addQuestStageBox(pane, project, "Quest stage: ", requirement.required_value, writable, listener, (Quest) requirement.required_obj, requirementObj);
|
requirementValue = addQuestStageBox(pane, project, "Quest stage: ", requirement.required_value, writable, listener, (Quest) requirement.required_obj, requirementObj);
|
||||||
break;
|
break;
|
||||||
case skillLevel:
|
case skillLevel:
|
||||||
|
Requirement.SkillID skillId = null;
|
||||||
|
try {
|
||||||
|
skillId = requirement.required_obj_id == null ? null : Requirement.SkillID.valueOf(requirement.required_obj_id);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
requirementObj = null;
|
requirementObj = null;
|
||||||
requirementObjId = addTextField(pane, "Skill ID:", requirement.required_obj_id, writable, listener);
|
requirementSkill = addEnumValueBox(pane, "Skill ID:", Requirement.SkillID.values(), skillId, writable, listener);
|
||||||
|
requirementObjId = null;//addTextField(pane, "Skill ID:", requirement.required_obj_id, writable, listener);
|
||||||
requirementValue = addIntegerField(pane, "Level: ", requirement.required_value, false, writable, listener);
|
requirementValue = addIntegerField(pane, "Level: ", requirement.required_value, false, writable, listener);
|
||||||
break;
|
break;
|
||||||
case timerElapsed:
|
case timerElapsed:
|
||||||
@@ -693,6 +733,11 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
requirementObjId = addTextField(pane, "Timer ID:", requirement.required_obj_id, writable, listener);
|
requirementObjId = addTextField(pane, "Timer ID:", requirement.required_obj_id, writable, listener);
|
||||||
requirementValue = addIntegerField(pane, "Timer value: ", requirement.required_value, false, writable, listener);
|
requirementValue = addIntegerField(pane, "Timer value: ", requirement.required_value, false, writable, listener);
|
||||||
break;
|
break;
|
||||||
|
case factionScore:
|
||||||
|
requirementObj = null;
|
||||||
|
requirementObjId = addTextField(pane, "Faction ID:", requirement.required_obj_id, writable, listener);
|
||||||
|
requirementValue = addIntegerField(pane, "Minimum score: ", requirement.required_value, true, writable, listener);
|
||||||
|
break;
|
||||||
case wear:
|
case wear:
|
||||||
requirementObj = addItemBox(pane, project, "Item: ", (Item) requirement.required_obj, writable, listener);
|
requirementObj = addItemBox(pane, project, "Item: ", (Item) requirement.required_obj, writable, listener);
|
||||||
requirementObjId = null;
|
requirementObjId = null;
|
||||||
@@ -798,14 +843,17 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
label.setIcon(new ImageIcon(DefaultIcons.getObjectLayerIcon()));
|
label.setIcon(new ImageIcon(DefaultIcons.getObjectLayerIcon()));
|
||||||
break;
|
break;
|
||||||
case actorCondition:
|
case actorCondition:
|
||||||
label.setText("Give actor condition "+rewardObjDesc+" for "+reward.reward_value+" turns");
|
boolean rewardForever = reward.reward_value != null && reward.reward_value == ActorCondition.FOREVER_DURATION;
|
||||||
|
label.setText("Give actor condition "+rewardObjDesc+(rewardForever ? " forever" : " for "+reward.reward_value+" turns"));
|
||||||
if (reward.reward_obj != null) label.setIcon(new ImageIcon(reward.reward_obj.getIcon()));
|
if (reward.reward_obj != null) label.setIcon(new ImageIcon(reward.reward_obj.getIcon()));
|
||||||
break;
|
break;
|
||||||
case alignmentChange:
|
case alignmentChange:
|
||||||
label.setText("Change alignment for faction "+rewardObjDesc+" : "+reward.reward_value);
|
label.setText("Change alignment for faction "+rewardObjDesc+" : "+reward.reward_value);
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getAlignmentIcon()));
|
||||||
break;
|
break;
|
||||||
case createTimer:
|
case createTimer:
|
||||||
label.setText("Create timer "+rewardObjDesc);
|
label.setText("Create timer "+rewardObjDesc);
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getTimerIcon()));
|
||||||
break;
|
break;
|
||||||
case deactivateMapObjectGroup:
|
case deactivateMapObjectGroup:
|
||||||
label.setText("Deactivate map object group "+rewardObjDesc+" on map "+reward.map_name);
|
label.setText("Deactivate map object group "+rewardObjDesc+" on map "+reward.map_name);
|
||||||
@@ -837,6 +885,7 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
break;
|
break;
|
||||||
case skillIncrease:
|
case skillIncrease:
|
||||||
label.setText("Increase skill "+rewardObjDesc+" level");
|
label.setText("Increase skill "+rewardObjDesc+" level");
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getSkillIcon()));
|
||||||
break;
|
break;
|
||||||
case spawnAll:
|
case spawnAll:
|
||||||
label.setText("Respawn all monsters in spawnarea area "+rewardObjDesc+" on map "+reward.map_name);
|
label.setText("Respawn all monsters in spawnarea area "+rewardObjDesc+" on map "+reward.map_name);
|
||||||
@@ -1071,7 +1120,18 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
if (req.required_obj.getIcon() != null) {
|
if (req.required_obj.getIcon() != null) {
|
||||||
label.setIcon(new ImageIcon(req.required_obj.getIcon()));
|
label.setIcon(new ImageIcon(req.required_obj.getIcon()));
|
||||||
}
|
}
|
||||||
} if (req.type == null) {
|
} else if (req.type == Requirement.RequirementType.skillLevel) {
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getSkillIcon()));
|
||||||
|
} else if (req.type == Requirement.RequirementType.spentGold) {
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getGoldIcon()));
|
||||||
|
} else if (req.type == Requirement.RequirementType.consumedBonemeals) {
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getBonemealIcon()));
|
||||||
|
} else if (req.type == Requirement.RequirementType.timerElapsed) {
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getTimerIcon()));
|
||||||
|
} else if (req.type == Requirement.RequirementType.factionScore) {
|
||||||
|
label.setIcon(new ImageIcon(DefaultIcons.getAlignmentIcon()));
|
||||||
|
}
|
||||||
|
if (req.type == null) {
|
||||||
label.setText("New, undefined requirement.");
|
label.setText("New, undefined requirement.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1171,6 +1231,14 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
if (stage != null) stage.addBacklink(dialogue);
|
if (stage != null) stage.addBacklink(dialogue);
|
||||||
}
|
}
|
||||||
rewardsListModel.itemChanged(selectedReward);
|
rewardsListModel.itemChanged(selectedReward);
|
||||||
|
} else if (source == rewardConditionForever) {
|
||||||
|
selectedReward.reward_value = ActorCondition.FOREVER_DURATION;
|
||||||
|
rewardValue.setEnabled(false);
|
||||||
|
rewardsListModel.itemChanged(selectedReward);
|
||||||
|
} else if (source == rewardConditionTimed) {
|
||||||
|
selectedReward.reward_value = (Integer) ((JSpinner)rewardValue).getValue();
|
||||||
|
rewardValue.setEnabled(true);
|
||||||
|
rewardsListModel.itemChanged(selectedReward);
|
||||||
} else if (source == replyTypeCombo) {
|
} else if (source == replyTypeCombo) {
|
||||||
updateRepliesParamsEditorPane(repliesParamsPane, selectedReply, this);
|
updateRepliesParamsEditorPane(repliesParamsPane, selectedReply, this);
|
||||||
repliesListModel.itemChanged(selectedReply);
|
repliesListModel.itemChanged(selectedReply);
|
||||||
@@ -1205,6 +1273,15 @@ public class DialogueEditor extends JSONElementEditor {
|
|||||||
selectedRequirement.required_obj_id = null;
|
selectedRequirement.required_obj_id = null;
|
||||||
}
|
}
|
||||||
requirementsListModel.itemChanged(selectedRequirement);
|
requirementsListModel.itemChanged(selectedRequirement);
|
||||||
|
} else if (source == requirementSkill) {
|
||||||
|
if (selectedRequirement.required_obj != null) {
|
||||||
|
selectedRequirement.required_obj.removeBacklink(dialogue);
|
||||||
|
selectedRequirement.required_obj = null;
|
||||||
|
}
|
||||||
|
if (selectedRequirement.type == Requirement.RequirementType.skillLevel) {
|
||||||
|
selectedRequirement.required_obj_id = value == null ? null : value.toString();
|
||||||
|
}
|
||||||
|
requirementsListModel.itemChanged(selectedRequirement);
|
||||||
} else if (source == requirementObjId) {
|
} else if (source == requirementObjId) {
|
||||||
selectedRequirement.required_obj_id = (String) value;
|
selectedRequirement.required_obj_id = (String) value;
|
||||||
selectedRequirement.required_obj = null;
|
selectedRequirement.required_obj = null;
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public abstract class JSONElementEditor extends Editor {
|
|||||||
jsonEditorPane.setText(((JSONElement)target).toJsonString());
|
jsonEditorPane.setText(((JSONElement)target).toJsonString());
|
||||||
jsonEditorPane.setEditable(((JSONElement)target).writable);
|
jsonEditorPane.setEditable(((JSONElement)target).writable);
|
||||||
jsonEditorPane.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JSON);
|
jsonEditorPane.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JSON);
|
||||||
|
jsonEditorPane.setFont(jsonEditorPane.getFont().deriveFont(ATContentStudio.SCALING * jsonEditorPane.getFont().getSize()));
|
||||||
JPanel result = new JPanel();
|
JPanel result = new JPanel();
|
||||||
result.setLayout(new BorderLayout());
|
result.setLayout(new BorderLayout());
|
||||||
result.add(jsonEditorPane, BorderLayout.CENTER);
|
result.add(jsonEditorPane, BorderLayout.CENTER);
|
||||||
|
|||||||
@@ -697,8 +697,12 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
|||||||
requirementValue = addQuestStageBox(pane, project, "Quest stage: ", requirement.required_value, writable, listener, (Quest) requirement.required_obj, requirementObj);
|
requirementValue = addQuestStageBox(pane, project, "Quest stage: ", requirement.required_value, writable, listener, (Quest) requirement.required_obj, requirementObj);
|
||||||
break;
|
break;
|
||||||
case skillLevel:
|
case skillLevel:
|
||||||
requirementObj = null;
|
Requirement.SkillID skillId = null;
|
||||||
requirementObjId = addTextField(pane, "Skill ID:", requirement.required_obj_id, writable, listener);
|
try {
|
||||||
|
skillId = requirement.required_obj_id == null ? null : Requirement.SkillID.valueOf(requirement.required_obj_id);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
|
requirementObj = addEnumValueBox(pane, "Skill ID:", Requirement.SkillID.values(), skillId, writable, listener);
|
||||||
|
requirementObjId = null;//addTextField(pane, "Skill ID:", requirement.required_obj_id, writable, listener);
|
||||||
requirementValue = addIntegerField(pane, "Level: ", requirement.required_value, false, writable, listener);
|
requirementValue = addIntegerField(pane, "Level: ", requirement.required_value, false, writable, listener);
|
||||||
break;
|
break;
|
||||||
case timerElapsed:
|
case timerElapsed:
|
||||||
@@ -706,6 +710,11 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
|||||||
requirementObjId = addTextField(pane, "Timer ID:", requirement.required_obj_id, writable, listener);
|
requirementObjId = addTextField(pane, "Timer ID:", requirement.required_obj_id, writable, listener);
|
||||||
requirementValue = addIntegerField(pane, "Timer value: ", requirement.required_value, false, writable, listener);
|
requirementValue = addIntegerField(pane, "Timer value: ", requirement.required_value, false, writable, listener);
|
||||||
break;
|
break;
|
||||||
|
case factionScore:
|
||||||
|
requirementObj = null;
|
||||||
|
requirementObjId = addTextField(pane, "Faction ID:", requirement.required_obj_id, writable, listener);
|
||||||
|
requirementValue = addIntegerField(pane, "Minimum score: ", requirement.required_value, true, writable, listener);
|
||||||
|
break;
|
||||||
case wear:
|
case wear:
|
||||||
requirementObj = addItemBox(pane, project, "Item: ", (Item) requirement.required_obj, writable, listener);
|
requirementObj = addItemBox(pane, project, "Item: ", (Item) requirement.required_obj, writable, listener);
|
||||||
requirementObjId = null;
|
requirementObjId = null;
|
||||||
@@ -756,6 +765,7 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
|||||||
editorPane.setText(((TMXMap)target).toXml());
|
editorPane.setText(((TMXMap)target).toXml());
|
||||||
editorPane.setEditable(false);
|
editorPane.setEditable(false);
|
||||||
editorPane.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
|
editorPane.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
|
||||||
|
editorPane.setFont(editorPane.getFont().deriveFont(ATContentStudio.SCALING * editorPane.getFont().getSize()));
|
||||||
pane.add(editorPane, JideBoxLayout.VARY);
|
pane.add(editorPane, JideBoxLayout.VARY);
|
||||||
|
|
||||||
return pane;
|
return pane;
|
||||||
@@ -2006,11 +2016,15 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
|||||||
} else if (source == requirementObj) {
|
} else if (source == requirementObj) {
|
||||||
if (selectedMapObject instanceof KeyArea) {
|
if (selectedMapObject instanceof KeyArea) {
|
||||||
KeyArea area = (KeyArea) selectedMapObject;
|
KeyArea area = (KeyArea) selectedMapObject;
|
||||||
area.requirement.required_obj = (GameDataElement) value;
|
if (area.requirement.type == Requirement.RequirementType.skillLevel) {
|
||||||
if (area.requirement.required_obj != null) {
|
area.requirement.required_obj_id = value == null ? null : value.toString();
|
||||||
area.requirement.required_obj_id = area.requirement.required_obj.id;
|
|
||||||
} else {
|
} else {
|
||||||
area.requirement.required_obj_id = null;
|
area.requirement.required_obj = (GameDataElement) value;
|
||||||
|
if (area.requirement.required_obj != null) {
|
||||||
|
area.requirement.required_obj_id = area.requirement.required_obj.id;
|
||||||
|
} else {
|
||||||
|
area.requirement.required_obj_id = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (area.oldSchoolRequirement) {
|
if (area.oldSchoolRequirement) {
|
||||||
area.updateNameFromRequirementChange();
|
area.updateNameFromRequirementChange();
|
||||||
@@ -2019,11 +2033,15 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
|||||||
}
|
}
|
||||||
} else if (selectedMapObject instanceof ReplaceArea) {
|
} else if (selectedMapObject instanceof ReplaceArea) {
|
||||||
ReplaceArea area = (ReplaceArea) selectedMapObject;
|
ReplaceArea area = (ReplaceArea) selectedMapObject;
|
||||||
area.requirement.required_obj = (GameDataElement) value;
|
if (area.requirement.type == Requirement.RequirementType.skillLevel) {
|
||||||
if (area.requirement.required_obj != null) {
|
area.requirement.required_obj_id = value == null ? null : value.toString();
|
||||||
area.requirement.required_obj_id = area.requirement.required_obj.id;
|
|
||||||
} else {
|
} else {
|
||||||
area.requirement.required_obj_id = null;
|
area.requirement.required_obj = (GameDataElement) value;
|
||||||
|
if (area.requirement.required_obj != null) {
|
||||||
|
area.requirement.required_obj_id = area.requirement.required_obj.id;
|
||||||
|
} else {
|
||||||
|
area.requirement.required_obj_id = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (area.oldSchoolRequirement) {
|
if (area.oldSchoolRequirement) {
|
||||||
area.updateNameFromRequirementChange();
|
area.updateNameFromRequirementChange();
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ public class WorldMapEditor extends Editor implements FieldUpdateListener {
|
|||||||
editorPane.setText(((WorldmapSegment)target).toXml());
|
editorPane.setText(((WorldmapSegment)target).toXml());
|
||||||
editorPane.setEditable(false);
|
editorPane.setEditable(false);
|
||||||
editorPane.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
|
editorPane.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
|
||||||
|
editorPane.setFont(editorPane.getFont().deriveFont(ATContentStudio.SCALING * editorPane.getFont().getSize()));
|
||||||
pane.add(editorPane, JideBoxLayout.VARY);
|
pane.add(editorPane, JideBoxLayout.VARY);
|
||||||
|
|
||||||
return pane;
|
return pane;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class DesktopIntegration {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
Runtime.getRuntime().exec(Workspace.activeWorkspace.settings.mapEditorCommand.getCurrentValue()+" "+f.getAbsolutePath());
|
Runtime.getRuntime().exec(Workspace.activeWorkspace.settings.mapEditorCommand.getCurrentValue()+" \""+f.getAbsolutePath()+"\"");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ public class DesktopIntegration {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
Runtime.getRuntime().exec(Workspace.activeWorkspace.settings.imageEditorCommand.getCurrentValue()+" "+f.getAbsolutePath());
|
Runtime.getRuntime().exec(Workspace.activeWorkspace.settings.imageEditorCommand.getCurrentValue()+" \""+f.getAbsolutePath()+"\"");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user