isle-portable/extensions/src/multiplayer/server
foxtacles eb6d2b8728
Sync sky light (#9)
* Sync sky color and light position in multiplayer

Add ENTITY_SKY and ENTITY_LIGHT to the WorldEvent system so the host
controls sky color (hue/saturation via observatory sun/moon/palette
buttons) and light position (globe arrows) with the same
host-authoritative pattern used for plants and buildings. Non-host
players send requests to the host who applies and broadcasts. Sky/light
state is appended to the world snapshot so joining players get the
current values.

https://claude.ai/code/session_01X2cPVQEo7c92wpWA7QPPMG

* Clean up sky/light sync: remove debug logging, DRY apply logic, fix host routing

- Extract ApplySkyLightState helper to deduplicate sky/light apply code
  between RestoreSkyLightState and HandleWorldSnapshot
- Remove all SDL_Log debug calls and SDL_log.h includes
- Remove dead OnWorldEnabled method from WorldStateSync (replaced by
  OnHostChanged in OnSaveLoaded)
- Fix HandleSkyLightMutation host path: return FALSE to let local
  switch case proceed, instead of duplicating via ApplyWorldEvent
- Simplify isle.cpp HandleControl: split observatory cases into
  individual switch arms with single early-return multiplayer hook
- Add save load hooks to sync world state with multiplayer peers
- Fix player count to exclude local player without valid actor
- Support broadcast snapshots (targetPeerId=0) in relay server

---------
2026-03-08 05:55:00 +01:00
..
.gitignore Add local relay server and apply formatting fixes 2026-02-28 12:15:19 -08:00
gameroom.ts Sync sky light (#9) 2026-03-08 05:55:00 +01:00
package-lock.json Implement multiplayer world state sync for plants and buildings 2026-03-01 09:48:03 -08:00
package.json Implement multiplayer world state sync for plants and buildings 2026-03-01 09:48:03 -08:00
protocol.ts Control NPC count per room 2026-03-07 14:58:27 -08:00
relay.ts Add room management, relay capacity, and rejection handling 2026-03-01 14:37:08 -08:00
wrangler.toml Add room management, relay capacity, and rejection handling 2026-03-01 14:37:08 -08:00