feat(client): add live server mode with make game target
Add SR_LIVE=1 environment variable to switch SimBridge from test mode to TCP connection. Default behavior unchanged (test mode). - sim_bridge.gd: read SR_LIVE env var instead of hardcoded test_mode - game_state.gd: find player entity by kind.variant == "Player" instead of hardcoded entity_id 1 (real server assigns different IDs) - Makefile: add 'make game' (builds server, starts it, launches client with SR_LIVE=1, kills server on exit) and 'make stop' helper Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ extends Node
|
||||
enum ConnectionState { DISCONNECTED, CONNECTING, CONNECTED, ERROR }
|
||||
|
||||
var state: ConnectionState = ConnectionState.DISCONNECTED
|
||||
var test_mode: bool = true # Enable test mode for development without Rust server
|
||||
var test_mode: bool = OS.get_environment("SR_LIVE") != "1" # SR_LIVE=1 connects to real server
|
||||
var _test_tick: int = 0
|
||||
var _test_player_pos: Vector2i = Vector2i(10, 10)
|
||||
var _test_facing: String = "North"
|
||||
|
||||
Reference in New Issue
Block a user