mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Ninja throwing star ability fix (#31684)
fixed ninja star not spawning Co-authored-by: YourUsername <you@example.com>
This commit is contained in:
parent
ee5ebef2a0
commit
34c90cf200
2 changed files with 11 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ public sealed class NinjaGlovesSystem : SharedNinjaGlovesSystem
|
|||
{
|
||||
var ev = new NinjaBatteryChangedEvent(battery.Value, suit);
|
||||
RaiseLocalEvent(user, ref ev);
|
||||
RaiseLocalEvent(suit, ref ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,16 @@ public sealed class NinjaSuitSystem : SharedNinjaSuitSystem
|
|||
base.NinjaEquipped(ent, user);
|
||||
|
||||
_ninja.SetSuitPowerAlert(user);
|
||||
|
||||
// raise event to let ninja components get starting battery
|
||||
_ninja.GetNinjaBattery(user.Owner, out var uid, out var _);
|
||||
|
||||
if (uid is not {} battery_uid)
|
||||
return;
|
||||
|
||||
var ev = new NinjaBatteryChangedEvent(battery_uid, ent.Owner);
|
||||
RaiseLocalEvent(ent, ref ev);
|
||||
RaiseLocalEvent(user, ref ev);
|
||||
}
|
||||
|
||||
// TODO: if/when battery is in shared, put this there too
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue