Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Made it work
Browse files Browse the repository at this point in the history
  • Loading branch information
PintTheDragon committed Jul 10, 2020
1 parent efc37cc commit 060ace7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions Buddy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ class Buddy : Plugin<Config>

public string prefixedMessage = "";

private Boolean shouldSetRoundStartedTrue = false;

public static Buddy singleton;

public override void OnDisabled()
Expand All @@ -79,11 +77,6 @@ public override void OnEnabled()
this.buddyRequestAcceptMessage = this.buddyRequestAcceptMessage.Replace("$unBuddyCMD", "." + buddyUnbuddyCommand);
this.successMessage = this.successMessage.Replace("$unBuddyCMD", "." + buddyUnbuddyCommand);
EventHandlers = new EventHandlers(this);
if (shouldSetRoundStartedTrue)
{
EventHandlers.RoundStarted = true;
shouldSetRoundStartedTrue = false;
}
Exiled.Events.Handlers.Server.RoundStarted += EventHandlers.OnRoundStart;
Exiled.Events.Handlers.Player.Joined += EventHandlers.OnPlayerJoin;
Exiled.Events.Handlers.Server.RestartingRound += EventHandlers.OnRoundRestart;
Expand All @@ -99,8 +92,6 @@ public override void OnEnabled()

public override void OnReloaded()
{
//I'm going to assume a reload happens during the middle of a game
shouldSetRoundStartedTrue = true;
}

public void removePerson(string userID)
Expand Down
3 changes: 0 additions & 3 deletions EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class EventHandlers

private RoleType[] tmpArr = { RoleType.Scp049, RoleType.Scp079, RoleType.Scp096, RoleType.Scp106, RoleType.Scp173, RoleType.Scp93953, RoleType.Scp93989 };
private Random rnd = new Random();
public bool RoundStarted = false;

public void OnPlayerJoin(JoinedEventArgs ev)
{
Expand Down Expand Up @@ -70,13 +69,11 @@ private IEnumerator<float> sendBroadcast(Player p)

public void OnRoundStart()
{
RoundStarted = true;
Timing.RunCoroutine(doTheSCPThing());
}

public void OnRoundRestart()
{
RoundStarted = false;
if (buddyPlugin.Config.resetBuddiesEveryRound)
buddyPlugin.buddies = new Dictionary<string, string>();
}
Expand Down

0 comments on commit 060ace7

Please sign in to comment.