Skip to content

Commit f13c11e

Browse files
committed
Fix item pickup
1 parent c48a1da commit f13c11e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

UsefulHints/EventHandlers/Items/Hints.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ private static void OnGrenadeHurting(HurtingEventArgs ev)
6363
// SCP 207 Handler
6464
private static void OnPickingUpSCP207(PickingUpItemEventArgs ev)
6565
{
66-
if (ev.Player.IsEffectActive<Scp207>() && ev.Pickup.Type != ItemType.AntiSCP207)
67-
ev.Player.ShowHint($"<color=#A60C0E>{new string('\n', 10)}{string.Format(UsefulHints.Instance.Config.Scp207HintMessage, ev.Player.GetEffect(EffectType.Scp207).Intensity)}</color>", 4);
66+
if (ev.Pickup.Type == ItemType.SCP207 || ev.Pickup.Type == ItemType.AntiSCP207)
67+
{
68+
if (ev.Player.IsEffectActive<Scp207>() && ev.Pickup.Type != ItemType.AntiSCP207)
69+
ev.Player.ShowHint($"<color=#A60C0E>{new string('\n', 10)}{string.Format(UsefulHints.Instance.Config.Scp207HintMessage, ev.Player.GetEffect(EffectType.Scp207).Intensity)}</color>", 4);
6870

69-
if (ev.Player.IsEffectActive<AntiScp207>() && ev.Pickup.Type != ItemType.SCP207)
70-
ev.Player.ShowHint($"<color=#C53892>{new string('\n', 10)}{string.Format(UsefulHints.Instance.Config.AntiScp207HintMessage, ev.Player.GetEffect(EffectType.AntiScp207).Intensity)}</color>", 4);
71+
if (ev.Player.IsEffectActive<AntiScp207>() && ev.Pickup.Type != ItemType.SCP207)
72+
ev.Player.ShowHint($"<color=#C53892>{new string('\n', 10)}{string.Format(UsefulHints.Instance.Config.AntiScp207HintMessage, ev.Player.GetEffect(EffectType.AntiScp207).Intensity)}</color>", 4);
73+
}
7174
}
7275
private static void OnEquipSCP207(ChangingItemEventArgs ev)
7376
{

UsefulHints/UsefulHints.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class UsefulHints : Plugin<Config>
99
public override string Name => "Useful Hints";
1010
public override string Author => "Vretu";
1111
public override string Prefix { get; } = "UH";
12-
public override Version Version => new Version(1, 9, 6);
12+
public override Version Version => new Version(1, 9, 7);
1313
public override Version RequiredExiledVersion { get; } = new Version(9, 0, 0);
1414
public override PluginPriority Priority { get; } = PluginPriority.Low;
1515
public static UsefulHints Instance { get; private set; }

0 commit comments

Comments
 (0)