mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 23:07:41 +01:00
Compare commits
1 Commits
build-scri
...
actor-cond
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38a3ad85c8 |
@@ -29,7 +29,8 @@ public class ActorCondition extends JSONElement {
|
|||||||
//public String id; inherited.
|
//public String id; inherited.
|
||||||
public String icon_id;
|
public String icon_id;
|
||||||
public String display_name;
|
public String display_name;
|
||||||
|
public String description;
|
||||||
|
|
||||||
// Available from parsed state
|
// Available from parsed state
|
||||||
public ACCategory category = null;
|
public ACCategory category = null;
|
||||||
public Integer positive = null;
|
public Integer positive = null;
|
||||||
@@ -157,6 +158,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
@Override
|
@Override
|
||||||
public void parse(Map aCondJson) {
|
public void parse(Map aCondJson) {
|
||||||
|
|
||||||
|
if (aCondJson.get("description") != null) this.description = (String) aCondJson.get("description");
|
||||||
if (aCondJson.get("category") != null) this.category = ACCategory.valueOf((String) aCondJson.get("category"));
|
if (aCondJson.get("category") != null) this.category = ACCategory.valueOf((String) aCondJson.get("category"));
|
||||||
this.positive = JSONElement.getInteger((Number) aCondJson.get("isPositive"));
|
this.positive = JSONElement.getInteger((Number) aCondJson.get("isPositive"));
|
||||||
Map abilityEffect = (Map) aCondJson.get("abilityEffect");
|
Map abilityEffect = (Map) aCondJson.get("abilityEffect");
|
||||||
@@ -266,6 +268,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
clone.state = this.state;
|
clone.state = this.state;
|
||||||
clone.id = this.id;
|
clone.id = this.id;
|
||||||
clone.display_name = this.display_name;
|
clone.display_name = this.display_name;
|
||||||
|
clone.description = this.description;
|
||||||
clone.icon_id = this.icon_id;
|
clone.icon_id = this.icon_id;
|
||||||
clone.category = this.category;
|
clone.category = this.category;
|
||||||
clone.positive = this.positive;
|
clone.positive = this.positive;
|
||||||
@@ -294,6 +297,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
jsonAC.put("id", this.id);
|
jsonAC.put("id", this.id);
|
||||||
if (this.icon_id != null) jsonAC.put("iconID", this.icon_id);
|
if (this.icon_id != null) jsonAC.put("iconID", this.icon_id);
|
||||||
if (this.display_name != null) jsonAC.put("name", this.display_name);
|
if (this.display_name != null) jsonAC.put("name", this.display_name);
|
||||||
|
if (this.description != null) jsonAC.put("description", this.description);
|
||||||
if (this.category != null) jsonAC.put("category", this.category.toString());
|
if (this.category != null) jsonAC.put("category", this.category.toString());
|
||||||
if (this.positive != null && this.positive == 1) jsonAC.put("isPositive", this.positive);
|
if (this.positive != null && this.positive == 1) jsonAC.put("isPositive", this.positive);
|
||||||
if (this.stacking != null && this.stacking == 1) jsonAC.put("isStacking", this.stacking);
|
if (this.stacking != null && this.stacking == 1) jsonAC.put("isStacking", this.stacking);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class PotGenerator {
|
|||||||
|
|
||||||
for (ActorCondition ac : gsrc.gameData.actorConditions) {
|
for (ActorCondition ac : gsrc.gameData.actorConditions) {
|
||||||
pushString(stringsResources, resourcesStrings, ac.display_name, getPotContextComment(ac));
|
pushString(stringsResources, resourcesStrings, ac.display_name, getPotContextComment(ac));
|
||||||
|
pushString(stringsResources, resourcesStrings, ac.description, getPotContextComment(ac)+":description");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Dialogue d : gsrc.gameData.dialogues ) {
|
for (Dialogue d : gsrc.gameData.dialogues ) {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
private JButton acIcon;
|
private JButton acIcon;
|
||||||
private JTextField idField;
|
private JTextField idField;
|
||||||
private JTextField nameField;
|
private JTextField nameField;
|
||||||
|
private JTextField descriptionField;
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
private JComboBox categoryBox;
|
private JComboBox categoryBox;
|
||||||
private IntegerBasedCheckBox positiveBox;
|
private IntegerBasedCheckBox positiveBox;
|
||||||
@@ -81,6 +82,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
|
|
||||||
idField = addTextField(pane, "Internal ID: ", ac.id, ac.writable, listener);
|
idField = addTextField(pane, "Internal ID: ", ac.id, ac.writable, listener);
|
||||||
nameField = addTranslatableTextField(pane, "Display name: ", ac.display_name, ac.writable, listener);
|
nameField = addTranslatableTextField(pane, "Display name: ", ac.display_name, ac.writable, listener);
|
||||||
|
descriptionField = addTranslatableTextField(pane, "Description: ", ac.description, ac.writable, listener);
|
||||||
categoryBox = addEnumValueBox(pane, "Category: ", ActorCondition.ACCategory.values(), ac.category, ac.writable, listener);
|
categoryBox = addEnumValueBox(pane, "Category: ", ActorCondition.ACCategory.values(), ac.category, ac.writable, listener);
|
||||||
positiveBox = addIntegerBasedCheckBox(pane, "Positive", ac.positive, ac.writable, listener);
|
positiveBox = addIntegerBasedCheckBox(pane, "Positive", ac.positive, ac.writable, listener);
|
||||||
stackingBox = addIntegerBasedCheckBox(pane, "Stacking", ac.stacking, ac.writable, listener);
|
stackingBox = addIntegerBasedCheckBox(pane, "Stacking", ac.stacking, ac.writable, listener);
|
||||||
@@ -172,6 +174,10 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
ActorConditionEditor.this.name = aCond.getDesc();
|
ActorConditionEditor.this.name = aCond.getDesc();
|
||||||
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||||
ATContentStudio.frame.editorChanged(ActorConditionEditor.this);
|
ATContentStudio.frame.editorChanged(ActorConditionEditor.this);
|
||||||
|
}else if (source == descriptionField) {
|
||||||
|
aCond.description = (String) value;
|
||||||
|
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||||
|
ATContentStudio.frame.editorChanged(ActorConditionEditor.this);
|
||||||
} else if (source == acIcon) {
|
} else if (source == acIcon) {
|
||||||
aCond.icon_id = (String) value;
|
aCond.icon_id = (String) value;
|
||||||
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||||
|
|||||||
Reference in New Issue
Block a user