* Add extendroundstart message to extend lobby start timer * Rename StartExtend to DelayStart * Fix delaystart amounts above 59 not working * Change delaystart seconds type from int to uint * Change delaystart wrong args amount message * Add forcegamepreset command * Rename forcegamepreset to forcepreset and merged start and forcestart preset methods * Fix index out of bounds exception when forcing suspicion to start * Change game preset to match regardless of casing * Add forcepreset unknown preset message * Add and move in lobby checks * Remove testing changes * Change delaystart to pause/resume the timer when no seconds are specified * Change pause message * Remove testing code * Change 0 seconds to not be a valid amount of seconds * Replace MsgTickerLobbyCountdown Seconds with DateTime instead of uint * Add one entire dot * Replace Math.Min + Math.Max with Math.Clamp Co-authored-by: ComicIronic <comicironic@gmail.com> Co-authored-by: ComicIronic <comicironic@gmail.com>
55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// The game ticker is responsible for managing the round-by-round system of the game.
|
|
/// </summary>
|
|
public interface IGameTicker
|
|
{
|
|
GameRunLevel RunLevel { get; }
|
|
|
|
event Action<GameRunLevelChangedEventArgs> OnRunLevelChanged;
|
|
event Action<GameRuleAddedEventArgs> 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<T>() where T : GameRule, new();
|
|
bool HasGameRule(Type type);
|
|
void RemoveGameRule(GameRule rule);
|
|
IEnumerable<GameRule> ActiveGameRules { get; }
|
|
|
|
bool TryGetPreset(string name, out Type type);
|
|
void SetStartPreset(Type type, bool force = false);
|
|
void SetStartPreset(string name, bool force = false);
|
|
|
|
/// <returns>true if changed, false otherwise</returns>
|
|
bool PauseStart(bool pause = true);
|
|
|
|
/// <returns>true if paused, false otherwise</returns>
|
|
bool TogglePause();
|
|
|
|
bool DelayStart(TimeSpan time);
|
|
}
|
|
}
|