internal static void ProcessCurrentTogglesSP(bool enemiesAllowed, bool gravestonesAllowed, bool itemsBanned, bool timePaused) { EnemiesToggledByServer?.Invoke(enemiesAllowed); GravestonesToggleByServer?.Invoke(gravestonesAllowed); ItemBannerToggleByServer?.Invoke(itemsBanned); TimePausedOrResumedByServer?.Invoke(timePaused); }
private static void ProcessEnemiesToggled(ref BinaryReader reader) { if (Network.NetworkMode == NetworkMode.Server) { return; } bool enemiesCanSpawn = reader.ReadBoolean(); EnemiesToggledByServer?.Invoke(enemiesCanSpawn); }
// TODO, singleplayer private static void ProcessCurrentToggles(ref BinaryReader reader) { if (Network.NetworkMode == NetworkMode.Server) { return; } bool enemiesAllowed = reader.ReadBoolean(); EnemiesToggledByServer?.Invoke(enemiesAllowed); bool timePaused = reader.ReadBoolean(); TimePausedOrResumedByServer?.Invoke(timePaused); bool gravestonesAllowed = reader.ReadBoolean(); GravestonesToggleByServer?.Invoke(gravestonesAllowed); bool itemsBanned = reader.ReadBoolean(); ItemBannerToggleByServer?.Invoke(itemsBanned); }