mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-31 16:44:37 +01:00
v0.4.5 to cope with changes to spawnareas definition in game code.
replaced gcode references by github repo.
This commit is contained in:
@@ -36,7 +36,7 @@ public class AboutEditor extends Editor {
|
||||
"<br/>" +
|
||||
"Play <a href=\"https://play.google.com/store/apps/details?id=com.gpl.rpg.AndorsTrail\">Andor's Trail</a> for free on your Android device.<br/>" +
|
||||
"Visit <a href=\"http://andorstrail.com/\">the official forum</a> to give or receive help.<br/>" +
|
||||
"Open the project's <a href=\"https://code.google.com/p/andors-trail/\">Google Code page</a> to check out the game's source code.<br/>" +
|
||||
"Open the project's <a href=\"https://github.com/Zukero/andors-trail/\">GitHub project page</a> to check out the game's source code.<br/>" +
|
||||
"<br/>" +
|
||||
"For content creation help, make sure to use the following resources:<br/>" +
|
||||
"<a href=\"http://andorstrail.com/viewtopic.php?f=6&t=4560\">The contribution guide on the forums</a><br/>" +
|
||||
|
||||
@@ -370,7 +370,7 @@ public class WorkspaceActions {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putValue(String key, Object value) {
|
||||
public synchronized void putValue(String key, Object value) {
|
||||
PropertyChangeEvent event = new PropertyChangeEvent(this, key, values.get(key), value);
|
||||
values.put(key, value);
|
||||
for (PropertyChangeListener l : listeners) {
|
||||
@@ -379,7 +379,7 @@ public class WorkspaceActions {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean b) {
|
||||
public synchronized void setEnabled(boolean b) {
|
||||
PropertyChangeEvent event = new PropertyChangeEvent(this, "enabled", isEnabled(), b);
|
||||
enabled = b;
|
||||
for (PropertyChangeListener l : listeners) {
|
||||
@@ -395,12 +395,12 @@ public class WorkspaceActions {
|
||||
private Set<PropertyChangeListener> listeners = new HashSet<PropertyChangeListener>();
|
||||
|
||||
@Override
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ public class TMXMapEditor extends Editor {
|
||||
private JComboBox evaluateTriggerBox;
|
||||
private JSpinner quantityField;
|
||||
private JCheckBox activeForNewGame;
|
||||
private JTextField spawngroupField;
|
||||
private JList npcList;
|
||||
private SpawnGroupNpcListModel npcListModel;
|
||||
|
||||
@@ -546,7 +547,8 @@ public class TMXMapEditor extends Editor {
|
||||
} else if (selected instanceof SignArea) {
|
||||
dialogueBox = addDialogueBox(pane, ((TMXMap)target).getProject(), "Message: ", ((SignArea)selected).dialogue, ((TMXMap)target).writable, listener);
|
||||
} else if (selected instanceof SpawnArea) {
|
||||
areaField = addTextField(pane, "Spawn group ID: ", ((SpawnArea)selected).name, ((TMXMap)target).writable, listener);
|
||||
areaField = addTextField(pane, "Spawn area ID: ", ((SpawnArea)selected).name, ((TMXMap)target).writable, listener);
|
||||
spawngroupField = addTextField(pane, "Spawn group ID: ", ((SpawnArea)selected).spawngroup_id, ((TMXMap)target).writable, listener);
|
||||
quantityField = addIntegerField(pane, "Number of spawned NPCs: ", ((SpawnArea)selected).quantity, false, ((TMXMap)target).writable, listener);
|
||||
activeForNewGame = addBooleanBasedCheckBox(pane, "Active in a new game: ", ((SpawnArea)selected).active, ((TMXMap)target).writable, listener);
|
||||
npcListModel = new SpawnGroupNpcListModel((SpawnArea) selected);
|
||||
@@ -1690,6 +1692,16 @@ public class TMXMapEditor extends Editor {
|
||||
tmxViewer.revalidate();
|
||||
tmxViewer.repaint();
|
||||
} else if (source == areaField) {
|
||||
if (selectedMapObject instanceof SpawnArea) {
|
||||
SpawnArea area = (SpawnArea)selectedMapObject;
|
||||
area.name = (String) value;
|
||||
groupObjectsListModel.objectChanged(area);
|
||||
} else if (selectedMapObject instanceof MapChange) {
|
||||
MapChange area = (MapChange) selectedMapObject;
|
||||
area.name = (String) value;
|
||||
groupObjectsListModel.objectChanged(area);
|
||||
}
|
||||
} else if (source == spawngroupField) {
|
||||
if (selectedMapObject instanceof SpawnArea) {
|
||||
SpawnArea area = (SpawnArea)selectedMapObject;
|
||||
if (area.spawnGroup != null && !area.spawnGroup.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user