22 lines
645 B
C#
Raw Normal View History

using QSB.ConversationSync.Messages;
using QSB.Messaging;
using QSB.WorldSync;
2022-05-13 22:38:06 +01:00
namespace QSB.ConversationSync.WorldObjects;
2022-08-24 14:43:57 -07:00
/// <summary>
/// BUG: do conversation leave on player leave so other people can actually talk lol
/// </summary>
2022-05-13 22:38:06 +01:00
public class QSBCharacterDialogueTree : WorldObject<CharacterDialogueTree>
{
public override void SendInitialState(uint to)
{
var playerId = ConversationManager.Instance.GetPlayerTalkingToTree(AttachedObject);
if (playerId != uint.MaxValue)
{
this.SendMessage(new ConversationStartEndMessage(playerId, true) { To = to });
}
// TODO: maybe also sync the dialogue box and player box?
2022-05-13 22:38:06 +01:00
}
}