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:
@@ -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)),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user