fix(client): address PR #62 review — input guard, public API, geometry cache
- constants.gd: clamp format_game_time input to 0..1439 (Hoshe #2) - interaction_list.gd: add public hide_list() wrapper (Hoshe #3, Tyre #1) - main.gd: call hide_list() instead of private _hide() - time_display.gd: cache font geometry in update_from_state(), use boolean _has_data flag instead of string guard (Tyre #2) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,9 +98,8 @@ const DIALOGUE_MAX_WIDTH: int = 1200
|
||||
|
||||
# D-031: Format game-minutes (0..1439) as station local time string "HH:MM".
|
||||
static func format_game_time(time_of_day: int) -> String:
|
||||
var hours: int = time_of_day / 60
|
||||
var minutes: int = time_of_day % 60
|
||||
return "%02d:%02d" % [hours, minutes]
|
||||
var clamped: int = clampi(time_of_day, 0, 1439)
|
||||
return "%02d:%02d" % [clamped / 60, clamped % 60]
|
||||
|
||||
# Default camera zoom — used as fallback when get_camera_2d() returns null
|
||||
const CAMERA_DEFAULT_ZOOM: Vector2 = Vector2(2.0, 2.0)
|
||||
|
||||
Reference in New Issue
Block a user