fix(client): address PR #22 review — 3 critical bugs, 2 warnings, 8 suggestions
Critical fixes: - fog_state: guard _compute_bounds() against all-invalid tiles (negative Rect2i crash) - fog_shader: read Camera2D zoom dynamically instead of hardcoded Vector2(2,2) - world_radial: set custom_minimum_size in _ready() from spoke geometry Warnings: - fog.gdshader: tighten PERIPHERAL_LOW 0.15→0.55 to match D-059 peripheral band - Extract color_for_entity_kind() to Constants.gd, decouple CursorRenderer from EntityRenderer Documentation: shallow copy assumption, gradual decay TODO, tween guard rationale, fade timing rationale, ToggleInsert TODO, monologue consume-once, hover offset safety, v6 fixture gap TODO. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,15 @@ const ENTITY_COLOR_HOSTILE: Color = Color("#d45d5d") # Hostile/Dangerous —
|
||||
const ENTITY_COLOR_OBJECT: Color = Color("#8b8ba0") # Static objects — muted grey
|
||||
const ENTITY_COLOR_PLAYER: Color = Color("#e0e8ff") # Player character (detective)
|
||||
|
||||
# D-033 color lookup by entity kind (Phase 1: defaults, Phase 2 #361: relationship-based)
|
||||
static func color_for_entity_kind(entity_data: Dictionary) -> Color:
|
||||
var kind_variant: String = entity_data.get("kind", {}).get("variant", "")
|
||||
match kind_variant:
|
||||
"Player": return ENTITY_COLOR_PLAYER
|
||||
"Npc": return ENTITY_COLOR_UNKNOWN
|
||||
"Object", "Terrain": return ENTITY_COLOR_OBJECT
|
||||
_: return ENTITY_COLOR_OBJECT
|
||||
|
||||
# D-015: Peripheral vision dimming
|
||||
const PERIPHERAL_ALPHA: float = 0.5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user