Ninja throwing star ability fix (#31684)
fixed ninja star not spawning Co-authored-by: YourUsername <you@example.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user