NPC wake / sleep cleanup (#5679)
This commit is contained in:
@@ -311,11 +311,8 @@ namespace Content.Shared.MobState.Components
|
||||
state.EnterState(OwnerUid, Owner.EntityManager);
|
||||
state.UpdateState(OwnerUid, threshold, Owner.EntityManager);
|
||||
|
||||
var message = new MobStateChangedMessage(this, old, state);
|
||||
#pragma warning disable 618
|
||||
SendMessage(message);
|
||||
#pragma warning restore 618
|
||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, message);
|
||||
var message = new MobStateChangedEvent(this, old, state);
|
||||
Owner.EntityManager.EventBus.RaiseLocalEvent(OwnerUid, message);
|
||||
|
||||
Dirty();
|
||||
}
|
||||
|
||||
@@ -4,11 +4,9 @@ using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Shared.MobState
|
||||
{
|
||||
#pragma warning disable 618
|
||||
public class MobStateChangedMessage : ComponentMessage
|
||||
#pragma warning restore 618
|
||||
public class MobStateChangedEvent : EntityEventArgs
|
||||
{
|
||||
public MobStateChangedMessage(
|
||||
public MobStateChangedEvent(
|
||||
MobStateComponent component,
|
||||
IMobState? oldMobState,
|
||||
IMobState currentMobState)
|
||||
Reference in New Issue
Block a user