More russian roulette setup
This commit is contained in:
@@ -46,4 +46,13 @@ public partial class MinigameManager : Entity
|
||||
{
|
||||
FindMinigames();
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
if ( LoadedMinigame is not { IsValid: true } )
|
||||
{
|
||||
return;
|
||||
}
|
||||
LoadedMinigame.Tick();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,11 @@ public partial class RoundManager : Entity
|
||||
Log.Info( "Starting round" );
|
||||
StartRound();
|
||||
}
|
||||
|
||||
if ( RoundState == RoundState.InProgress )
|
||||
{
|
||||
MinigameManager.Tick();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -117,4 +122,10 @@ public partial class RoundManager : Entity
|
||||
Players = All.OfType<Lucker>().ToList();
|
||||
MinigameManager.StartRandomMinigame( Players );
|
||||
}
|
||||
|
||||
[ConCmd.Server("start_round")]
|
||||
public static void ForceStart()
|
||||
{
|
||||
Entity.All.OfType<RoundManager>().FirstOrDefault()?.StartRound();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user