mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-13 21:40:50 +00:00
remove logs, rename methods
This commit is contained in:
parent
e9d39634ab
commit
b5c890c1d5
@ -25,7 +25,6 @@ namespace QSB.ConversationSync
|
||||
|
||||
public override void OnReceiveRemote(ConversationMessage message)
|
||||
{
|
||||
DebugLog.DebugWrite($"Conv. type {message.Type} id {message.ObjectId} text {message.Message}");
|
||||
switch (message.Type)
|
||||
{
|
||||
case ConversationType.Character:
|
||||
@ -36,6 +35,10 @@ namespace QSB.ConversationSync
|
||||
ConversationManager.Instance.DisplayPlayerConversationBox((uint)message.ObjectId, message.Message);
|
||||
break;
|
||||
case ConversationType.EndCharacter:
|
||||
if (message.ObjectId == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
UnityEngine.Object.Destroy(ConversationManager.Instance.BoxMappings[WorldRegistry.OldDialogueTrees[message.ObjectId]]);
|
||||
break;
|
||||
case ConversationType.EndPlayer:
|
||||
|
@ -35,25 +35,21 @@ namespace QSB.ConversationSync
|
||||
|
||||
public void SendPlayerOption(string text)
|
||||
{
|
||||
DebugLog.DebugWrite("sending player option - " + text);
|
||||
GlobalMessenger<uint, string, ConversationType>.FireEvent(EventNames.QSBConversation, PlayerRegistry.LocalPlayerId, text, ConversationType.Player);
|
||||
}
|
||||
|
||||
public void SendCharacterDialogue(int id, string text)
|
||||
{
|
||||
DebugLog.DebugWrite("sending char dialoge - " + text);
|
||||
GlobalMessenger<uint, string, ConversationType>.FireEvent(EventNames.QSBConversation, (uint)id, text, ConversationType.Character);
|
||||
}
|
||||
|
||||
public void EndConversationPlayer()
|
||||
public void CloseBoxPlayer()
|
||||
{
|
||||
DebugLog.DebugWrite("Ending conversation -- player");
|
||||
GlobalMessenger<uint, string, ConversationType>.FireEvent(EventNames.QSBConversation, PlayerRegistry.LocalPlayerId, "", ConversationType.EndPlayer);
|
||||
}
|
||||
|
||||
public void EndConversationCharacter(int id)
|
||||
public void CloseBoxCharacter(int id)
|
||||
{
|
||||
DebugLog.DebugWrite("Ending conversation -- character");
|
||||
GlobalMessenger<uint, string, ConversationType>.FireEvent(EventNames.QSBConversation, (uint)id, "", ConversationType.EndCharacter);
|
||||
}
|
||||
|
||||
|
@ -15,9 +15,9 @@ namespace QSB.ConversationSync
|
||||
|
||||
public static void EndConversation()
|
||||
{
|
||||
ConversationManager.Instance.EndConversationCharacter(PlayerRegistry.LocalPlayer.CurrentDialogueID);
|
||||
ConversationManager.Instance.CloseBoxCharacter(PlayerRegistry.LocalPlayer.CurrentDialogueID);
|
||||
PlayerRegistry.LocalPlayer.CurrentDialogueID = -1;
|
||||
ConversationManager.Instance.EndConversationPlayer();
|
||||
ConversationManager.Instance.CloseBoxPlayer();
|
||||
}
|
||||
|
||||
public static bool InputDialogueOption(int optionIndex, DialogueBoxVer2 ____currentDialogueBox)
|
||||
@ -25,8 +25,7 @@ namespace QSB.ConversationSync
|
||||
if (optionIndex < 0)
|
||||
{
|
||||
// in a page where there is no selectable options
|
||||
//PlayerRegistry.LocalPlayer.CurrentDialogueID = -1;
|
||||
ConversationManager.Instance.EndConversationPlayer();
|
||||
ConversationManager.Instance.CloseBoxPlayer();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user