chore(warnings): silence the four pre-existing script warnings the creation screen surfaced

Not errors and not regressions — Godot printed them on every script reload
and they predate M4-b. Cleared so a real warning is not lost in the noise:

- Redundant `const ContentDB`/`const NewGame` preloads that shadowed their
  own `class_name` globals (character_creation.gd, creation_draft.gd) — the
  class is already global, so the const bought nothing.
- Two `log` locals shadowing the built-in `log()` — renamed to `out`
  (canon_log.from_dict) and `canon` (NewGame.construct); the "log" dict KEY
  is the public contract and is unchanged.
- currency.format's copper->denomination division is integer BY DESIGN (the
  remainder is carried, not lost) — annotated `@warning_ignore` to say so.

319 client tests green; headless parse reports none of the four sites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 20:09:29 -05:00
parent 63cbc8c16e
commit 8f3aa75fa9
5 changed files with 20 additions and 22 deletions

View File

@@ -99,17 +99,17 @@ static func from_dict(d: Dictionary) -> CanonLog:
if v != SCHEMA_VERSION:
push_error("unsupported canon_log schema_version: %s" % v)
return null
var log := CanonLog.new()
log.player = LogPlayer.from_dict(d.get("player", {}))
log.location = LogLocation.from_dict(d.get("location", {}))
var out := CanonLog.new()
out.player = LogPlayer.from_dict(d.get("player", {}))
out.location = LogLocation.from_dict(d.get("location", {}))
for m in d.get("party", []):
log.party.append(PartyMember.from_dict(m))
out.party.append(PartyMember.from_dict(m))
for e in d.get("recent_events", []):
log.push_event(e)
out.push_event(e)
for f in d.get("established_facts", []):
log.add_fact(f)
out.add_fact(f)
for q in d.get("active_quests", []):
log.active_quests.append(Quest.from_dict(q))
out.active_quests.append(Quest.from_dict(q))
for h in d.get("humiliations", []):
log.humiliations.append(Humiliation.from_dict(h))
return log
out.humiliations.append(Humiliation.from_dict(h))
return out