mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-12 22:14:37 +00:00
use bool for npc anim event instead of 2-option enum
This commit is contained in:
parent
f0fe15847e
commit
2ae4fb9805
@ -4,9 +4,9 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.Animation.NPC.Messages
|
||||
{
|
||||
internal class NpcAnimationMessage : QSBEnumWorldObjectMessage<INpcAnimController, AnimationEvent>
|
||||
internal class NpcAnimationMessage : QSBBoolWorldObjectMessage<INpcAnimController>
|
||||
{
|
||||
public NpcAnimationMessage(AnimationEvent animationEvent) => Value = animationEvent;
|
||||
public NpcAnimationMessage(bool start) => Value = start;
|
||||
|
||||
public NpcAnimationMessage() { }
|
||||
|
||||
@ -14,14 +14,13 @@ namespace QSB.Animation.NPC.Messages
|
||||
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
switch (Value)
|
||||
if (Value)
|
||||
{
|
||||
case AnimationEvent.StartConversation:
|
||||
WorldObject.StartConversation();
|
||||
break;
|
||||
case AnimationEvent.EndConversation:
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldObject.EndConversation();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ namespace QSB.Animation.NPC.Patches
|
||||
return true;
|
||||
}
|
||||
|
||||
ownerOfThis.SendMessage(new NpcAnimationMessage(AnimationEvent.StartConversation));
|
||||
ownerOfThis.SendMessage(new NpcAnimationMessage(true));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ namespace QSB.Animation.NPC.Patches
|
||||
return true;
|
||||
}
|
||||
|
||||
ownerOfThis.SendMessage(new NpcAnimationMessage(AnimationEvent.EndConversation));
|
||||
ownerOfThis.SendMessage(new NpcAnimationMessage(false));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user