Skip to content

Commit

Permalink
fix: issues relating to r3
Browse files Browse the repository at this point in the history
  • Loading branch information
LumiFae committed Dec 15, 2024
1 parent c8f4d41 commit 6a066bf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 29 deletions.
28 changes: 0 additions & 28 deletions SillySCP/Handlers/RespawnSystemHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public class RespawnSystemHandler : IRegisterable
public TimeBasedWave ChaosWave2 { get; private set; }

public AutoElement RespawnTimerDisplay { get; private set; }

public SpawnableTeamType NextKnownTeam { get; set; }

public void Init()
{
Expand All @@ -37,26 +35,12 @@ public void Init()

Exiled.Events.Handlers.Server.RoundStarted += OnRoundStarted;
Exiled.Events.Handlers.Server.RoundEnded += OnRoundEnded;
Exiled.Events.Handlers.Server.RespawningTeam += OnRespawning;
Exiled.Events.Handlers.Server.RespawnedTeam += OnRespawned;
}

public void Unregister()
{
Exiled.Events.Handlers.Server.RoundStarted -= OnRoundStarted;
Exiled.Events.Handlers.Server.RoundEnded -= OnRoundEnded;
Exiled.Events.Handlers.Server.RespawningTeam -= OnRespawning;
Exiled.Events.Handlers.Server.RespawnedTeam -= OnRespawned;
}

private void OnRespawning(RespawningTeamEventArgs ev)
{
NextKnownTeam = ev.NextKnownTeam;
}

private void OnRespawned(RespawnedTeamEventArgs ev)
{
NextKnownTeam = SpawnableTeamType.None;
}

private string GetTimers(DisplayCore core)
Expand All @@ -66,9 +50,6 @@ private string GetTimers(DisplayCore core)

StringBuilder builder = new StringBuilder()
.SetAlignment(HintBuilding.AlignStyle.Center);

if(NextKnownTeam == SpawnableTeamType.NineTailedFox)
builder.SetColor(Color.Blue);

builder
.Append(ntfTime.Minutes.ToString("D1"))
Expand All @@ -81,15 +62,9 @@ private string GetTimers(DisplayCore core)
.Append("S")
.CloseSize();

if(NextKnownTeam == SpawnableTeamType.NineTailedFox)
builder.CloseColor();

builder
.AddSpace(16, MeasurementUnit.Ems);

if(NextKnownTeam == SpawnableTeamType.ChaosInsurgency)
builder = builder.SetColor(Color.Green);

builder
.Append(chaosTime.Minutes.ToString("D1"))
.SetSize(22)
Expand All @@ -101,9 +76,6 @@ private string GetTimers(DisplayCore core)
.Append("S")
.CloseSize();

if(NextKnownTeam == SpawnableTeamType.ChaosInsurgency)
builder.CloseColor();

return builder.ToString();
}

Expand Down
1 change: 1 addition & 0 deletions SillySCP/Handlers/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Exiled.Events.EventArgs.Scp914;
using MapGeneration.Spawnables;
using MEC;
using Respawning;
using Scp914;
using SillySCP.API.Features;
using SillySCP.API.Interfaces;
Expand Down
2 changes: 1 addition & 1 deletion SillySCP/SillySCP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Costura.Fody" Version="6.0.0-beta0000" PrivateAssets="All" />
<PackageReference Include="ExMod.Exiled" Version="9.0.0-alpha.2" />
<PackageReference Include="ExMod.Exiled" Version="9.0.0-beta.1" />
<PackageReference Include="Fody" Version="6.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 6a066bf

Please sign in to comment.