using System;
using System.Collections.Generic;
using Content.Server.GameTicking;
using Robust.Server.Interfaces.Player;
using Robust.Shared.Map;
using Robust.Shared.Timing;
namespace Content.Server.Interfaces.GameTicking
{
///
/// The game ticker is responsible for managing the round-by-round system of the game.
///
public interface IGameTicker
{
GameRunLevel RunLevel { get; }
event Action OnRunLevelChanged;
event Action OnRuleAdded;
void Initialize();
void Update(FrameEventArgs frameEventArgs);
void RestartRound();
void StartRound(bool force = false);
void EndRound();
void Respawn(IPlayerSession targetPlayer);
void MakeObserve(IPlayerSession player);
void MakeJoinGame(IPlayerSession player);
void ToggleReady(IPlayerSession player, bool ready);
GridCoordinates GetLateJoinSpawnPoint();
GridCoordinates GetJobSpawnPoint(string jobId);
GridCoordinates GetObserverSpawnPoint();
// GameRule system.
T AddGameRule() where T : GameRule, new();
bool HasGameRule(Type type);
void RemoveGameRule(GameRule rule);
IEnumerable ActiveGameRules { get; }
bool TryGetPreset(string name, out Type type);
void SetStartPreset(Type type, bool force = false);
void SetStartPreset(string name, bool force = false);
/// true if changed, false otherwise
bool PauseStart(bool pause = true);
/// true if paused, false otherwise
bool TogglePause();
bool DelayStart(TimeSpan time);
}
}