fix dialogue condition funkiness

This commit is contained in:
Mister_Nebula 2022-01-29 20:41:12 +00:00
parent de419da227
commit 3c88bc7072
2 changed files with 9 additions and 1 deletions

View File

@ -166,5 +166,13 @@ namespace QSB.ConversationSync.Patches
new PersistentConditionMessage(condition, state).Send(); new PersistentConditionMessage(condition, state).Send();
} }
} }
[HarmonyPrefix]
[HarmonyPatch(typeof(DialogueConditionManager), nameof(DialogueConditionManager.AddCondition))]
public static bool AddCondition(string conditionName, bool conditionState)
{
new DialogueConditionMessage(conditionName, conditionState).Send();
return true;
}
} }
} }

View File

@ -154,7 +154,7 @@ namespace QSB.WorldSync
} }
DebugLog.DebugWrite($"DIALOGUE CONDITIONS :"); DebugLog.DebugWrite($"DIALOGUE CONDITIONS :");
DialogueConditions = (Dictionary<string, bool>)DialogueConditionManager.SharedInstance._dictConditions; DialogueConditions = new(DialogueConditionManager.SharedInstance._dictConditions);
foreach (var item in DialogueConditions) foreach (var item in DialogueConditions)
{ {
DebugLog.DebugWrite($"- {item.Key}, {item.Value}"); DebugLog.DebugWrite($"- {item.Key}, {item.Value}");