uncloak ninja after attacking (#20892)
* raise MeleeAttackEvent on the user after swinging * add disable bool to RevealNinja * uncloak ninja after attacking --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -96,7 +96,7 @@ public abstract class SharedNinjaSuitSystem : EntitySystem
|
||||
/// <summary>
|
||||
/// Force uncloaks the user and disables suit abilities.
|
||||
/// </summary>
|
||||
public void RevealNinja(EntityUid uid, EntityUid user, NinjaSuitComponent? comp = null, StealthClothingComponent? stealthClothing = null)
|
||||
public void RevealNinja(EntityUid uid, EntityUid user, bool disable = true, NinjaSuitComponent? comp = null, StealthClothingComponent? stealthClothing = null)
|
||||
{
|
||||
if (!Resolve(uid, ref comp, ref stealthClothing))
|
||||
return;
|
||||
@@ -104,6 +104,9 @@ public abstract class SharedNinjaSuitSystem : EntitySystem
|
||||
if (!StealthClothing.SetEnabled(uid, user, false, stealthClothing))
|
||||
return;
|
||||
|
||||
if (!disable)
|
||||
return;
|
||||
|
||||
// previously cloaked, disable abilities for a short time
|
||||
_audio.PlayPredicted(comp.RevealSound, uid, user);
|
||||
// all abilities check for a usedelay on the ninja
|
||||
|
||||
Reference in New Issue
Block a user