From 270c613f66c1253dd7fd9471807ef36c1890b76b Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Mon, 23 Jun 2025 21:17:44 +0200 Subject: [PATCH] add applyToTargetHint to HitEffectPanel --- .../atcontentstudio/ui/gamedataeditors/CommonEditor.java | 6 +++++- .../rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java | 7 ++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/CommonEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/CommonEditor.java index 160c91f..7e2d6d8 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/CommonEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/CommonEditor.java @@ -84,6 +84,9 @@ public class CommonEditor { public static class HitEffectPane extends DeathEffectPane { /// this should just be a convenience field, to access it, without casting. DO NOT SET WITHOUT ALSO SETTING THE FIELD IN THE SUPER-CLASS! Common.HitEffect effect; + + String applyToTargetHint; + NPCEditor.TargetTimedConditionsListModel hitTargetConditionsListModel; JList hitTargetConditionsList; Common.TimedActorConditionEffect selectedHitEffectTargetCondition; @@ -101,9 +104,10 @@ public class CommonEditor { /* * create a new HitEffectPane with the selections (probably passed in from last time) */ - public HitEffectPane(String title, Supplier sourceNewSupplier, Editor editor, String applyToHint) { + public HitEffectPane(String title, Supplier sourceNewSupplier, Editor editor, String applyToHint, String applyToTargetHint) { super(title, sourceNewSupplier, editor, applyToHint); this.selectedHitEffectTargetCondition = selectedHitEffectTargetCondition; + this.applyToTargetHint = applyToTargetHint; } void createHitEffectPaneContent(FieldUpdateListener listener, boolean writable, Common.HitEffect e, NPCEditor.SourceTimedConditionsListModel sourceConditionsModelInput) { diff --git a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java index 0104e73..63a434b 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/NPCEditor.java @@ -194,11 +194,8 @@ public class NPCEditor extends JSONElementEditor { hitEffect = npc.hit_effect; } if (hitEffectPane == null) - hitEffectPane = new CommonEditor.HitEffectPane("Effect on every hit: ", Common.TimedActorConditionEffect::new, this, "test"); - hitEffectPane.createHitEffectPaneContent(listener, - npc.writable, - hitEffect, - new SourceTimedConditionsListModel(hitEffect)); + hitEffectPane = new CommonEditor.HitEffectPane("Effect on every hit: ", Common.TimedActorConditionEffect::new, this, null, null); + hitEffectPane.createHitEffectPaneContent(listener, npc.writable, hitEffect, new SourceTimedConditionsListModel(hitEffect)); combatTraitPane.add(hitEffectPane.effectPane, JideBoxLayout.FIX); hitReceivedEffectPane = new CollapsiblePanel("Effect on every hit received: ");