정수형 UI 숫자 표기 검증

This commit is contained in:
2026-07-16 01:50:10 +09:00
parent 0795563185
commit 1180d23728
3 changed files with 65 additions and 0 deletions

18
docs/integer-format.md Normal file
View File

@@ -0,0 +1,18 @@
# Integer Formatting Rules
MapleStory Worlds may serialize numeric properties as strings such as `1.0`.
This is valid numeric data, but it must never be used directly for UI entity
names or paths because `Card1.0` and `DmgPop_1.0` do not exist.
- Use `self:IntStr(value)` for every numeric suffix in a UI path or entity name.
- Use `string.format("%d", math.floor(value or 0))` or `FormatNumber` for an
integer shown in UI text.
- Do not concatenate `tostring(number)` into a `/ui/...` path.
- `tools/deck/gen-slaydeck.mjs` normalizes exact integer strings such as `0.0`
to `0` when regenerating `Global/common.gamelogic`.
Run this check after editing card-controller UI paths:
```powershell
node tools/verify/integer-format.mjs
```