fix(ui): PR #134 review — character creation bugs + protocol default

Addresses Hoshe's 3 code-quality items from the sprint-36 client review.

- character_creation: drop CARDINAL_NAMES (was [south, east, north,
  west]) and use CARDINAL_DIRS ([south, west, north, east]) for both
  facing and screenshot filename label. The two arrays indexed by the
  same _screenshot_cardinal_idx produced swapped labels at indices 1
  and 3 — screenshots at those positions had filenames that did not
  match the character's actual facing.
- character_creation: Enter/KP_ENTER now honors _footer_start.disabled.
  Without a bookmark selected the Start button disables, but the
  keyboard path called _on_start() unconditionally — a player could
  confirm creation with empty bookmark/location strings. Guard at the
  top of _on_start.
- protocol.gd: raw_bm.get("career", "tycoon") hardcoded a content
  default in the wire decoder — a missing server field silently became
  "tycoon". Empty string is the correct protocol default;
  _make_bookmark_card already skips the career label when empty.
This commit is contained in:
2026-04-21 12:01:48 +02:00
parent 3a074cb3fd
commit effb83a0d6
2 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -409,7 +409,7 @@ static func decode_snapshot(bytes: PackedByteArray) -> Variant:
"default_location": str(raw_bm.get("default_location", "")),
"allowed_locations": al,
"allowed_locations_cultures": alc,
"career": str(raw_bm.get("career", "tycoon")),
"career": str(raw_bm.get("career", "")),
"starting_capital_tractus": int(raw_bm.get("starting_capital_tractus", 0)),
}
)