Skip to content

Commit 6e9f510

Browse files
committed
Added SynapseTranslation and improved Config
1 parent fb92f44 commit 6e9f510

18 files changed

+168
-61
lines changed

Scp079Rework/Commands/BlackOutCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ namespace Scp079Rework.Commands
66
{
77
public class BlackOutCommand : I079Command
88
{
9-
public int RequiredLevel => 3;
9+
public int RequiredLevel => PluginExtensions.GetRequiredLevel(Name, 3);
1010

11-
public float Energy => 125f;
11+
public float Energy => PluginExtensions.GetEnergy(Name, 125f);
1212

1313
public string Name => "blackout";
1414

1515
public string Description => "Deactivates all Lights in Heavy/Light";
1616

1717
public KeyCode Key => KeyCode.Alpha1;
1818

19-
public float Exp => 15f;
19+
public float Exp => PluginExtensions.GetExp(Name, 15f);
2020

21-
public float Cooldown => 10f;
21+
public float Cooldown => PluginExtensions.GetCooldown(Name, 20f);
2222

2323
public CommandResult Execute(CommandContext context)
2424
{
@@ -29,7 +29,7 @@ public CommandResult Execute(CommandContext context)
2929
State = CommandResultState.Error
3030
};
3131

32-
Generator079.mainGenerator.ServerOvercharge(10f, false);
32+
Map.Get.HeavyController.LightsOut(10f, false);
3333
Map.Get.GlitchedCassie("Black out through Scp 0 7 9 Now");
3434

3535
return new CommandResult

Scp079Rework/Commands/DeathCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ public class DeathCommand : I079Command
99
{
1010
public KeyCode Key => KeyCode.None;
1111

12-
public int RequiredLevel => 3;
12+
public int RequiredLevel => PluginExtensions.GetRequiredLevel(Name, 3);
1313

14-
public float Energy => 100f;
14+
public float Energy => PluginExtensions.GetEnergy(Name, 100f);
1515

16-
public float Exp => 20;
16+
public float Exp => PluginExtensions.GetExp(Name, 20f);
1717

1818
public string Name => "death";
1919

2020
public string Description => "sends a fake scp death announcement";
2121

22-
public float Cooldown => 20f;
22+
public float Cooldown => PluginExtensions.GetCooldown(Name, 20f);
2323

2424
public CommandResult Execute(CommandContext context)
2525
{

Scp079Rework/Commands/FlashCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ public class FlashCommand : I079Command
77
{
88
public KeyCode Key => KeyCode.Alpha3;
99

10-
public int RequiredLevel => 1;
10+
public int RequiredLevel => PluginExtensions.GetRequiredLevel(Name, 1);
1111

12-
public float Energy => 50f;
12+
public float Energy => PluginExtensions.GetEnergy(Name, 50f);
1313

1414
public string Name => "flash";
1515

1616
public string Description => "Throws a flash at your camera";
1717

18-
public float Exp => 5f;
18+
public float Exp => PluginExtensions.GetExp(Name, 5f);
1919

20-
public float Cooldown => 2f;
20+
public float Cooldown => PluginExtensions.GetCooldown(Name, 2f);
2121

2222
public CommandResult Execute(CommandContext context)
2323
{

Scp079Rework/Commands/MtfAnnounceCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ namespace Scp079Rework.Commands
55
{
66
public class MtfAnnounceCommand : I079Command
77
{
8-
public int RequiredLevel => 2;
8+
public int RequiredLevel => PluginExtensions.GetRequiredLevel(Name, 2);
99

10-
public float Energy => 50;
10+
public float Energy => PluginExtensions.GetEnergy(Name, 50f);
1111

1212
public string Name => "mtf";
1313

1414
public string Description => "Sends a fake Mtf Announcement";
1515

1616
public KeyCode Key => KeyCode.Alpha2;
1717

18-
public float Exp => 5f;
18+
public float Exp => PluginExtensions.GetExp(Name, 1f);
1919

20-
public float Cooldown => 15f;
20+
public float Cooldown => PluginExtensions.GetCooldown(Name, 120f);
2121

2222
public CommandResult Execute(CommandContext context)
2323
{

Scp079Rework/Commands/RobotCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ namespace Scp079Rework.Commands
66
{
77
public class RobotCommand : I079Command
88
{
9-
public int RequiredLevel => 3;
9+
public int RequiredLevel => PluginExtensions.GetRequiredLevel(Name, 3);
1010

11-
public float Energy => 100f;
11+
public float Energy => PluginExtensions.GetEnergy(Name, 100f);
1212

1313
public string Name => "robot";
1414

1515
public string Description => "A Command which spawns you as robot into the Map";
1616

1717
public KeyCode Key => KeyCode.None;
1818

19-
public float Exp => 10f;
19+
public float Exp => PluginExtensions.GetExp(Name, 1f);
2020

21-
public float Cooldown => 0f;
21+
public float Cooldown => PluginExtensions.GetCooldown(Name, 0f);
2222

2323
public CommandResult Execute(CommandContext context)
2424
{

Scp079Rework/Commands/ScanCommand.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ public class ScanCommand : I079Command
99
{
1010
public KeyCode Key => KeyCode.None;
1111

12-
public int RequiredLevel => 3;
12+
public int RequiredLevel => PluginExtensions.GetRequiredLevel(Name, 3);
1313

14-
public float Energy => 100f;
14+
public float Energy => PluginExtensions.GetEnergy(Name, 100f);
1515

16-
public float Exp => 5f;
16+
public float Exp => PluginExtensions.GetExp(Name, 5f);
1717

1818
public string Name => "scan";
1919

2020
public string Description => "Shows you where youre Targets are";
2121

22-
public float Cooldown => 0f;
22+
public float Cooldown => PluginExtensions.GetCooldown(Name, 0f);
2323

2424
public CommandResult Execute(CommandContext context)
2525
{
@@ -32,7 +32,9 @@ public CommandResult Execute(CommandContext context)
3232
var pocket = "";
3333
foreach(var player in Server.Get.Players)
3434
{
35-
switch (player.Room.Zone)
35+
if (player.RoleType == RoleType.Spectator || player.RoleType == RoleType.None || player.RoleID == (int)RoleType.Tutorial) continue;
36+
37+
switch (player.Room?.Zone)
3638
{
3739
case ZoneType.LCZ:
3840
lcz += $"\n - {player} : {player.RoleName}";

Scp079Rework/Commands/ScpCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ public class ScpCommand : I079Command
99
{
1010
public KeyCode Key => KeyCode.Alpha4;
1111

12-
public int RequiredLevel => 2;
12+
public int RequiredLevel => PluginExtensions.GetRequiredLevel(Name, 2);
1313

14-
public float Energy => 50f;
14+
public float Energy => PluginExtensions.GetEnergy(Name, 50f);
1515

16-
public float Exp => 1f;
16+
public float Exp => PluginExtensions.GetExp(Name, 1f);
1717

1818
public string Name => "scp";
1919

2020
public string Description => "brings you near a other Scp";
2121

22-
public float Cooldown => 0f;
22+
public float Cooldown => PluginExtensions.GetCooldown(Name, 0f);
2323

2424
public CommandResult Execute(CommandContext context)
2525
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Reflection;
44
using System;
55

6-
namespace Scp079Rework.Commands
6+
namespace Scp079Rework.Handlers
77
{
88
public class CommandHandler
99
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using System.Linq;
44

5-
namespace Scp079Rework
5+
namespace Scp079Rework.Handlers
66
{
77
public class EventHandlers
88
{
@@ -34,7 +34,7 @@ private void OnDeath(Synapse.Api.Events.SynapseEventArguments.PlayerDeathEventAr
3434

3535
private void OnKeyPress(Synapse.Api.Events.SynapseEventArguments.PlayerKeyPressEventArgs ev)
3636
{
37-
if((ev.Player.RoleID == (int)RoleType.Scp079 || ev.Player.RoleID == 79) && Commands.CommandHandler.Handler.GetCommand(ev.KeyCode,out var cmd))
37+
if((ev.Player.RoleID == (int)RoleType.Scp079 || ev.Player.RoleID == 79) && CommandHandler.Handler.GetCommand(ev.KeyCode,out var cmd))
3838
{
3939
if (Scp079SynapseCommand.cooldown.TryGetValue(cmd.Name, out var time) && Time.time < time)
4040
{

0 commit comments

Comments
 (0)