Skip to content

Commit

Permalink
Fixed tinybrain moment
Browse files Browse the repository at this point in the history
  • Loading branch information
Simyon264 committed May 15, 2022
1 parent fbf9ce5 commit 5c2e8ba
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions SCP008/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Plugin : Plugin<Config>
public override string Name { get; } = "SCP008";
public override string Prefix { get; } = "scp008";
public override string Author { get; } = "Simyon";
public override Version Version { get; } = new Version(1, 0, 0);
public override Version Version { get; } = new Version(1, 0, 1);
public override PluginPriority Priority { get; } = PluginPriority.High;

public List<Player> infectedPlayers = new List<Player>();
Expand Down Expand Up @@ -134,17 +134,20 @@ public void Infect(Player player)

public void UsingItem(UsedItemEventArgs ev)
{
if (ev.Item.Type == ItemType.SCP500)
if (infectedPlayers.Contains(ev.Player))
{
Heal008(ev.Player);
ev.Player.Broadcast(5, Config.CureMessage);
}
if (ev.Item.Type == ItemType.Medkit)
{
if (IsInChance(50))
if (ev.Item.Type == ItemType.SCP500)
{
ev.Player.Broadcast(5, Config.CureMessage);
Heal008(ev.Player);
ev.Player.Broadcast(5, Config.CureMessage);
}
if (ev.Item.Type == ItemType.Medkit)
{
if (IsInChance(50))
{
ev.Player.Broadcast(5, Config.CureMessage);
Heal008(ev.Player);
}
}
}
}
Expand Down

0 comments on commit 5c2e8ba

Please sign in to comment.