quantum-space-buddies/QSB/ConversationSync/WorldObjects/QSBRemoteDialogueTrigger.cs

20 lines
651 B
C#
Raw Normal View History

2022-01-26 07:16:03 +00:00
using QSB.ConversationSync.Messages;
using QSB.Messaging;
using QSB.WorldSync;
2021-12-20 11:48:50 +00:00
2022-03-03 03:46:33 +00:00
namespace QSB.ConversationSync.WorldObjects;
internal class QSBRemoteDialogueTrigger : WorldObject<RemoteDialogueTrigger>
2021-12-20 11:48:50 +00:00
{
2022-03-03 03:46:33 +00:00
public override void SendInitialState(uint to) =>
this.SendMessage(new RemoteDialogueInitialStateMessage(AttachedObject) { To = to });
2022-03-03 03:46:33 +00:00
public void RemoteEnterDialogue(int dialogueIndex)
{
var dialogueCondition = AttachedObject._listDialogues[dialogueIndex];
AttachedObject._activeRemoteDialogue = dialogueCondition.dialogue;
AttachedObject._inRemoteDialogue = true;
2022-01-26 06:58:07 +00:00
2022-03-03 03:46:33 +00:00
AttachedObject._activatedDialogues[dialogueIndex] = true;
2021-12-20 11:48:50 +00:00
}
}