feat: W2 经济核心+数据管线+灰盒 — Balance Bible v1.0 八表逐值落地,EconomyState/sim 14 门/灰盒主场景/单测(GDScript 待本机引擎验证)

This commit is contained in:
程基岩(engineering-lead) committed 2026-10-19 17:44:53 +08:00
1 parent 856326a766
commit 24e5b0c4cc
58 files changed
+7099 -22

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
extends RefCounted
# 用例:NumberFormat(core/numbers/number_format.gd)
func run(a, _data) -> void:
a.eq(NumberFormat.short(999.0), "999", "short 999")
a.eq(NumberFormat.short(1000.0), "1.00K", "short 1K")
a.eq(NumberFormat.short(1234.0), "1.23K", "short 1234")
a.eq(NumberFormat.short(1.5e9), "1.50B", "short 1.5B")
a.eq(NumberFormat.short(1.5e12), "1.50T", "short 1.5T")
a.eq(NumberFormat.short_int(1500.0), "2K", "short_int 1500 → 2K")
a.eq(NumberFormat.short_int(1400.0), "1K", "short_int 1400 → 1K")
a.eq(NumberFormat.duration(42.0), "42s", "duration 42s")
a.eq(NumberFormat.duration(90.0), "1m 30s", "duration 90s")
a.eq(NumberFormat.duration(3600.0), "1h", "duration 1h")
a.eq(NumberFormat.duration(5100.0), "1h 25m", "duration 1h25m")
a.eq(NumberFormat.minutes(25.0), "25m", "minutes 25")
a.eq(NumberFormat.minutes(180.0), "3h", "minutes 180")
a.eq(NumberFormat.minutes(125.0), "2h 5m", "minutes 125")