Skip to content

Commit

Permalink
Removed redundacies
Browse files Browse the repository at this point in the history
  • Loading branch information
DGvagabond committed Jun 16, 2022
1 parent a70330e commit f7e0f2e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace SCP008X
using Exiled.Events.EventArgs;
using Exiled.API.Features;
using Exiled.API.Enums;
using SCP008X.DamageUtilities;
using MEC;

public class EventHandlers
Expand All @@ -37,7 +36,6 @@ public void OnHurt(HurtingEventArgs ev)
if (ev.Attacker.Role == RoleType.Scp0492)
{
ev.Amount = Scp008X.Instance.Config.ZombieDamage;
return;
}
}

Expand Down Expand Up @@ -79,14 +77,14 @@ public void OnReviving(StartingRecallEventArgs ev)

public void OnDying(DyingEventArgs ev)
{
if (ev.Killer == null && ev?.Handler?.Type is DamageType.Poison)
if (ev.Killer == null && ev.Handler?.Type is DamageType.Poison)
{
ev.IsAllowed = false;
CustomRole.Get(typeof(Scp008))?.AddRole(ev.Target);
return;
}

if(ev?.Killer?.Role == RoleType.Scp0492){
if(ev.Killer?.Role == RoleType.Scp0492){
ev.IsAllowed = false;
CustomRole.Get(typeof(Scp008))?.AddRole(ev.Target);
Timing.CallDelayed(1f, delegate
Expand All @@ -102,7 +100,6 @@ public void OnShoot(ShootingEventArgs ev)
if(targetPlayer != null){
if(ev.Shooter.Role.Side is Side.Scp && targetPlayer.Role.Side is Side.Scp){
ev.IsAllowed = false;
return;
}
}
}
Expand Down

0 comments on commit f7e0f2e

Please sign in to comment.