Skip to content

Commit 5610314

Browse files
Removed SpawnEvent config option
1 parent 813ca56 commit 5610314

File tree

4 files changed

+1
-29
lines changed

4 files changed

+1
-29
lines changed

CameraSystem-LabAPI/CameraSystem-LabAPI.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
<Compile Include="Commands\ToggleWorkstationUsageCommand.cs" />
8383
<Compile Include="Configs\Config.cs" />
8484
<Compile Include="Configs\Translation.cs" />
85-
<Compile Include="Enums\SpawnEvent.cs" />
8685
<Compile Include="EventHandlers.cs" />
8786
<Compile Include="Managers\CameraManager.cs" />
8887
<Compile Include="Models\PlayerSnapshot.cs" />

CameraSystem-LabAPI/Configs/Config.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.ComponentModel;
2-
using CameraSystem.Enums;
32
using CameraSystem.Models;
43
using MapGeneration;
54
using PlayerRoles;
@@ -9,10 +8,6 @@ namespace CameraSystem.Configs;
98

109
public class Config
1110
{
12-
[Description(
13-
"When the camera workstations should be spawned. (Generated = during map generation, RoundStarted = when round starts)")]
14-
public SpawnEvent SpawnEvent { get; set; } = SpawnEvent.Generated;
15-
1611
[Description("Whether the camera system is enabled by default when the plugin loads")]
1712
public bool IsCameraSystemEnabledByDefault { get; set; } = true;
1813

CameraSystem-LabAPI/Enums/SpawnEvent.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

CameraSystem-LabAPI/EventHandlers.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using System.Linq;
2-
using CameraSystem.Enums;
32
using CameraSystem.Managers;
4-
using CameraSystem.Models;
53
using InventorySystem.Items.Firearms.Attachments;
64
using LabApi.Events.Arguments.Interfaces;
75
using LabApi.Events.Arguments.PlayerEvents;
@@ -35,20 +33,7 @@ private static GameObject WorkStationPrefab
3533

3634
internal static void Register()
3735
{
38-
switch (CameraSystem.Instance.Config.SpawnEvent)
39-
{
40-
case SpawnEvent.Generated:
41-
ServerEvents.MapGenerated += OnMapGenerated;
42-
break;
43-
case SpawnEvent.RoundStarted:
44-
ServerEvents.RoundStarted += SpawnWorkstations;
45-
break;
46-
default:
47-
Logger.Warn($"Invalid spawn event type \"{CameraSystem.Instance.Config.SpawnEvent}\". " +
48-
$"Defaulting to \"{SpawnEvent.Generated}\".");
49-
ServerEvents.MapGenerated += OnMapGenerated;
50-
break;
51-
}
36+
ServerEvents.MapGenerated += OnMapGenerated;
5237

5338
Scp079Events.Pinging += OnPinging;
5439
Scp079Events.Recontaining += OnRecontaining;
@@ -76,7 +61,6 @@ internal static void Register()
7661
internal static void Unregister()
7762
{
7863
ServerEvents.MapGenerated -= OnMapGenerated;
79-
ServerEvents.RoundStarted -= SpawnWorkstations;
8064

8165
Scp079Events.BlackingOutRoom -= OnPlayerEvent;
8266
Scp079Events.BlackingOutZone -= OnPlayerEvent;

0 commit comments

Comments
 (0)