mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
No spead merge (#475)
* Revert "[GoobPort] WIZ REAL (#465)"
This reverts commit 091a8ff433.
* fix local
This commit is contained in:
@@ -361,22 +361,17 @@ namespace Content.Shared.StatusEffect
|
||||
/// <param name="uid">The entity to check on.</param>
|
||||
/// <param name="key">The status effect ID to check for</param>
|
||||
/// <param name="status">The status effect component, should you already have it.</param>
|
||||
/// <param name="raiseEvent">Goobstation. Whether to raise BeforeStatusEffectAddedEvent</param>
|
||||
public bool CanApplyEffect(EntityUid uid, string key, StatusEffectsComponent? status = null, bool raiseEvent = true) // Goob edit
|
||||
public bool CanApplyEffect(EntityUid uid, string key,
|
||||
StatusEffectsComponent? status = null)
|
||||
{
|
||||
// don't log since stuff calling this prolly doesn't care if we don't actually have it
|
||||
if (!Resolve(uid, ref status, false))
|
||||
return false;
|
||||
|
||||
// Goob edit start
|
||||
if (raiseEvent)
|
||||
{
|
||||
var ev = new BeforeStatusEffectAddedEvent(key);
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
if (ev.Cancelled)
|
||||
return false;
|
||||
}
|
||||
// Goob edit end
|
||||
var ev = new BeforeStatusEffectAddedEvent(key);
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
if (ev.Cancelled)
|
||||
return false;
|
||||
|
||||
if (!_prototypeManager.TryIndex<StatusEffectPrototype>(key, out var proto))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user