Skip to content

Commit

Permalink
removed just a bit of debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxWorn3365 committed Jul 13, 2024
1 parent 8de9f12 commit b344e2d
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 28 deletions.
10 changes: 5 additions & 5 deletions UncomplicatedCustomRoles/Commands/CommandParent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ internal class CommandParent : ParentCommand

public override void LoadGeneratedCommands()
{
RegisteredCommands.Add(new UCRList());
RegisteredCommands.Add(new UCROwner());
RegisteredCommands.Add(new UCRRole());
RegisteredCommands.Add(new UCRSpawn());
RegisteredCommands.Add(new UCRReload());
RegisteredCommands.Add(new List());
RegisteredCommands.Add(new Owner());
RegisteredCommands.Add(new Role());
RegisteredCommands.Add(new Spawn());
RegisteredCommands.Add(new Reload());
}

public List<IUCRCommand> RegisteredCommands { get; } = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace UncomplicatedCustomRoles.Commands
{
public class UCRList : IUCRCommand
public class List : IUCRCommand
{
public string Name { get; } = "list";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
namespace UncomplicatedCustomRoles.Commands
{
[CommandHandler(typeof(GameConsoleCommandHandler))]
internal class UCRLogShare : ParentCommand
internal class LogShare : ParentCommand
{
public UCRLogShare() => LoadGeneratedCommands();
public LogShare() => LoadGeneratedCommands();

public override string Command { get; } = "ucrlogs";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace UncomplicatedCustomRoles.Commands
{
public class UCROwner : IUCRCommand
public class Owner : IUCRCommand
{
public string Name { get; } = "owner";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace UncomplicatedCustomRoles.Commands
{
#pragma warning disable CS0618 // Obsolete
public class UCRReload : IUCRCommand
public class Reload : IUCRCommand
{
public string Name { get; } = "reload";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace UncomplicatedCustomRoles.Commands
{
public class UCRRole : IUCRCommand
public class Role : IUCRCommand
{
public string Name { get; } = "role";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace UncomplicatedCustomRoles.Commands
{
public class UCRSpawn : IUCRCommand
public class Spawn : IUCRCommand
{
public string Name { get; } = "spawn";

Expand Down
10 changes: 1 addition & 9 deletions UncomplicatedCustomRoles/Events/EventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,28 +99,20 @@ public void OnSpawning(SpawningEventArgs ev)
if (ev.Player is null)
return;

LogManager.Debug("Called CHANGINGROLE event");
LogManager.Debug("Called SPAWNING event");

if (Plugin.InternalCooldownQueue.Contains(ev.Player.Id))
return;

LogManager.Debug("Called CHANGINGROLE A event");

if (Plugin.PlayerRegistry.ContainsKey(ev.Player.Id))
return;

LogManager.Debug("Called CHANGINGROLE B event");

if (!Plugin.Instance.DoSpawnBasicRoles)
return;

LogManager.Debug("Called CHANGINGROLE C event");

if (ev.Player.IsNPC)
return;

LogManager.Debug("Called CHANGINGROLE E event");

string LogReason = string.Empty;
if (Plugin.Instance.Config.AllowOnlyNaturalSpawns && !Plugin.RoleSpawnQueue.Contains(ev.Player.Id))
{
Expand Down
1 change: 0 additions & 1 deletion UncomplicatedCustomRoles/Manager/SpawnManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ public static void SummonSubclassApplier(Player Player, ICustomRole Role)
if (Role.CustomInfo != null && Role.CustomInfo != string.Empty)
Player.CustomInfo += $"\n{Role.CustomInfo}";


if (!Plugin.RolesCount[Role.Id].Contains(Player.Id))
{
Plugin.RolesCount[Role.Id].Add(Player.Id);
Expand Down
12 changes: 6 additions & 6 deletions UncomplicatedCustomRoles/UncomplicatedCustomRoles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
<Compile Include="API\Features\Behaviour\SpawnBehaviour.cs" />
<Compile Include="API\Features\Behaviour\StaminaBehaviour.cs" />
<Compile Include="Commands\CommandParent.cs" />
<Compile Include="Commands\UCRList.cs" />
<Compile Include="Commands\UCRLogShare.cs" />
<Compile Include="Commands\UCROwner.cs" />
<Compile Include="Commands\UCRRole.cs" />
<Compile Include="Commands\UCRReload.cs" />
<Compile Include="Commands\UCRSpawn.cs" />
<Compile Include="Commands\List.cs" />
<Compile Include="Commands\LogShare.cs" />
<Compile Include="Commands\Owner.cs" />
<Compile Include="Commands\Role.cs" />
<Compile Include="Commands\Reload.cs" />
<Compile Include="Commands\Spawn.cs" />
<Compile Include="Config.cs" />
<Compile Include="Elements\CustomRole.cs" />
<Compile Include="Enums\SpawnLocationType.cs" />
Expand Down

0 comments on commit b344e2d

Please sign in to comment.