From 37bb528e211841057a471bf2b0fb2104809d9584 Mon Sep 17 00:00:00 2001
From: Miki_hero <100715076+Mikihero@users.noreply.github.com>
Date: Fri, 20 May 2022 00:17:59 +0200
Subject: [PATCH] Add files via upload
---
EventTools/Config.cs | 8 +++++++-
EventTools/EventTools.cs | 30 ++++++++++++------------------
EventTools/EventTools.csproj | 4 ++++
3 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/EventTools/Config.cs b/EventTools/Config.cs
index 5103846..c83685d 100644
--- a/EventTools/Config.cs
+++ b/EventTools/Config.cs
@@ -72,5 +72,11 @@ public sealed class Config : IConfig
[Description("The amount of time (in miliseconds) after which the 'rounlock is still enabled reminder' will be sent.")]
public int RLReminderTime { get; set; } = 300000;
- }
+
+ [Description("The broadcast to be sent whenever the lottery command is used. [NUMBER] will be replaced with the rolled number.")]
+ public string LotteryBC { get; set; } = "[NUMBER]";
+
+ [Description("The closing tags for the above config path.")]
+ public string LotteryBCClosingTags { get; set; } = "";
+ }
}
\ No newline at end of file
diff --git a/EventTools/EventTools.cs b/EventTools/EventTools.cs
index 2eb6d89..6d53b26 100644
--- a/EventTools/EventTools.cs
+++ b/EventTools/EventTools.cs
@@ -11,24 +11,24 @@ public class EventTools : Plugin
private static Timer aTimer;
private static Timer aTimer2;
- private static readonly Lazy LazyInstance = new Lazy(() => new EventTools());
- public static EventTools Instance => LazyInstance.Value;
-
- public override PluginPriority Priority { get; } = PluginPriority.Medium;
+ public static EventTools Instance;
+ public override Version RequiredExiledVersion => new Version(5, 2, 1);
+ public static int tester1 = 2;
+ public static int tester2 = 2;
- private EventTools()
+ public override void OnEnabled()
{
-
+ Instance = this;
+ SetTimer();
+ SetTimer2();
}
- public static int tester1 = 2;
- public static int tester2 = 2;
public static void RoundLockAdminChat(Object sender, ElapsedEventArgs e)
{
if (Round.IsLocked == true)
{
- string message = EventTools.Instance.Config.RLEnabledMessage;
+ string message = Instance.Config.RLEnabledMessage;
tester1 = 1;
if (tester2 == 2)
{
@@ -59,7 +59,7 @@ public static void RoundLockAdminChat(Object sender, ElapsedEventArgs e)
}
else
{
- string message = EventTools.Instance.Config.RLDisabledMessage;
+ string message = Instance.Config.RLDisabledMessage;
tester1 = 0;
if (tester2 == 2)
{
@@ -92,7 +92,7 @@ public static void RoundLockAdminChat(Object sender, ElapsedEventArgs e)
public static void RoundLockAdminChatReminder(Object sender, ElapsedEventArgs e)
{
- string message = EventTools.Instance.Config.RLStillEnabled;
+ string message = Instance.Config.RLStillEnabled;
if (Round.IsLocked == true)
{
foreach (Player player in Player.List)
@@ -115,17 +115,11 @@ private static void SetTimer()
private static void SetTimer2()
{
- int time = EventTools.Instance.Config.RLReminderTime;
+ int time = Instance.Config.RLReminderTime;
aTimer2 = new Timer(time);
aTimer2.Elapsed += RoundLockAdminChatReminder;
aTimer2.AutoReset = true;
aTimer2.Enabled = true;
}
-
- public override void OnEnabled()
- {
- SetTimer();
- SetTimer2();
- }
}
}
diff --git a/EventTools/EventTools.csproj b/EventTools/EventTools.csproj
index 1a445b3..fc94655 100644
--- a/EventTools/EventTools.csproj
+++ b/EventTools/EventTools.csproj
@@ -36,6 +36,9 @@
False
..\..\..\exiled files\EXILED\Plugins\dependencies\0Harmony.dll
+
+ ..\..\..\..\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll
+
False
..\..\..\exiled files\Assembly-CSharp_publicized.dll
@@ -106,6 +109,7 @@
+