From 1028f3480381856e3f6144fc2219a0d27cc1904f Mon Sep 17 00:00:00 2001 From: Joywayer Date: Tue, 21 Jul 2026 11:53:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(meta):=20=E5=B9=B3=E8=A1=A1=E9=A1=B5?= =?UTF-8?q?=E7=AD=BE=E5=8F=AF=E7=BC=96=E8=BE=91=20aether=5Fthresholds?= =?UTF-8?q?=EF=BC=88=E4=BF=9D=E5=AD=98=E4=B8=8D=E4=B8=A2=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/game_designer/balance_tab.gd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/game_designer/balance_tab.gd b/addons/game_designer/balance_tab.gd index 138d47b..ae941aa 100644 --- a/addons/game_designer/balance_tab.gd +++ b/addons/game_designer/balance_tab.gd @@ -12,6 +12,7 @@ var _data: Dictionary = {} var _mult_spins: Dictionary = {} # key → [SpinBox ×3] var _miniboss: SpinBox var _boss: SpinBox +var _aether: TextEdit var _status: Label func _ready() -> void: @@ -45,6 +46,10 @@ func _ready() -> void: _boss = UI.spin(1, 999999, 10, float(bhp.get("5", 1800))) h2.add_child(_boss) add_child(HSeparator.new()) + var al := Label.new(); al.text = "碎片奖励阈值 aether_thresholds(JSON [[波次,碎片],...])"; add_child(al) + _aether = TextEdit.new(); _aether.custom_minimum_size = Vector2(0, 50) + _aether.text = JSON.stringify(_data.get("aether_thresholds", [[1, 0], [5, 3], [10, 8], [15, 14], [20, 20]])) + add_child(_aether) add_child(UI.btn("💾 保存 balance.json", _save)) _status = UI.status_label(); add_child(_status) @@ -57,9 +62,13 @@ func _save() -> void: for key in MULT_KEYS: var spins: Array = _mult_spins[key] mults[key] = [spins[0].value, spins[1].value, spins[2].value] + var thresholds = JSON.parse_string(_aether.text) if _aether.text.strip_edges() != "" else [] + if not (thresholds is Array): + thresholds = [] var out := { "difficulty_mults": mults, "boss_hp": {"4": _miniboss.value, "5": _boss.value}, + "aether_thresholds": thresholds, } if UI.save_json(PATH, out): UI.set_status(_status, "💾 已保存(重启 F5 生效)")