From 0bf6b3f4d1864d03171786ce10c6890da250b248 Mon Sep 17 00:00:00 2001 From: "Nut.andor" Date: Sat, 4 Oct 2025 00:42:01 +0200 Subject: [PATCH] spriteFlipChance renamed to horizontalFlipChance to fit the engine --- src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java | 8 ++++---- .../rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java index 7bf1579..8b6fc08 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java +++ b/src/com/gpl/rpg/atcontentstudio/model/gamedata/NPC.java @@ -38,7 +38,7 @@ public class NPC extends JSONElement { public Integer attack_damage_min = null; public String spawngroup_id = null; public String faction_id = null; - public Integer spriteFlipChance = null; + public Integer horizontalFlipChance = null; public String dialogue_id = null; public String droplist_id = null; public Integer attack_cost = null; @@ -156,7 +156,7 @@ public class NPC extends JSONElement { } this.spawngroup_id = (String) npcJson.get("spawnGroup"); this.faction_id = (String) npcJson.get("faction"); - this.spriteFlipChance = JSONElement.getInteger((Number) npcJson.get("spriteFlipChance")); + this.horizontalFlipChance = JSONElement.getInteger((Number) npcJson.get("horizontalFlipChance")); this.dialogue_id = (String) npcJson.get("phraseID"); this.droplist_id = (String) npcJson.get("droplistID"); this.attack_cost = JSONElement.getInteger((Number) npcJson.get("attackCost")); @@ -246,7 +246,7 @@ public class NPC extends JSONElement { } clone.droplist_id = this.droplist_id; clone.faction_id = this.faction_id; - clone.spriteFlipChance = this.spriteFlipChance; + clone.horizontalFlipChance = this.horizontalFlipChance; if (this.hit_effect != null) { clone.hit_effect = new HitEffect(); copyHitEffectValues(clone.hit_effect, this.hit_effect, clone); @@ -305,7 +305,7 @@ public class NPC extends JSONElement { writeMinMaxToMap(npcJson, "attackDamage", this.attack_damage_min, attack_damage_max, 0); if (this.spawngroup_id != null) npcJson.put("spawnGroup", this.spawngroup_id); if (this.faction_id != null) npcJson.put("faction", this.faction_id); - if (this.spriteFlipChance != null) npcJson.put("spriteFlipChance", this.spriteFlipChance); + if (this.horizontalFlipChance != null) npcJson.put("horizontalFlipChance", this.horizontalFlipChance); if (this.dialogue != null) { npcJson.put("phraseID", this.dialogue.id); } else if (this.dialogue_id != null) { diff --git a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java index 01b3658..fd1d805 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java @@ -37,7 +37,7 @@ public class NPCEditor extends JSONElementEditor { private JTextField nameField; private JTextField spawnGroupField; private JTextField factionField; - private JSpinner spriteFlipChanceField; + private JSpinner horizontalFlipChanceField; private JSpinner experienceField; private MyComboBox dialogueBox; private MyComboBox droplistBox; @@ -129,7 +129,7 @@ public class NPCEditor extends JSONElementEditor { nameField = addTranslatableTextField(pane, "Display name: ", npc.name, npc.writable, listener); spawnGroupField = addTextField(pane, "Spawn group ID: ", npc.spawngroup_id, npc.writable, listener); factionField = addTextField(pane, "Faction ID: ", npc.faction_id, npc.writable, listener); - spriteFlipChanceField = addIntegerField(pane, "Icon Flip Chance: ", npc.spriteFlipChance, false, npc.writable, listener); + horizontalFlipChanceField = addIntegerField(pane, "Horizontal flip chance: ", npc.horizontalFlipChance, false, npc.writable, listener); experienceField = addIntegerField(pane, "Experience reward: ", npc.getMonsterExperience(), false, false, listener); dialogueBox = addDialogueBox(pane, npc.getProject(), "Initial phrase: ", npc.dialogue, npc.writable, listener); droplistBox = addDroplistBox(pane, npc.getProject(), "Droplist / Shop inventory: ", npc.droplist, npc.writable, listener); @@ -207,8 +207,8 @@ public class NPCEditor extends JSONElementEditor { npc.spawngroup_id = (String) value; } else if (source == factionField) { npc.faction_id = (String) value; - } else if (source == spriteFlipChanceField) { - npc.spriteFlipChance = (Integer) value; + } else if (source == horizontalFlipChanceField) { + npc.horizontalFlipChance = (Integer) value; } else if (source == dialogueBox) { if (npc.dialogue != null) { npc.dialogue.removeBacklink(npc);