meditation button fix

This commit is contained in:
Mister_Nebula 2022-10-02 17:24:01 +01:00
parent b41e2c64bf
commit 45fdc77a90

View File

@ -146,6 +146,21 @@ public class ConversationPatches : QSBPatch
public static void SetPersistentCondition(string condition, bool state) =>
new PersistentConditionMessage(condition, state).Send();
[HarmonyPrefix]
[HarmonyPatch(typeof(GameSave), nameof(GameSave.GetPersistentCondition))]
public static bool GetPersistentCondition(string condition, ref bool __result)
{
// stinky fix to meditation button appearing
if (condition == "KNOWS_MEDITATION")
{
__result = false;
return false;
}
return true;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(DialogueConditionManager), nameof(DialogueConditionManager.AddCondition))]
public static void AddCondition(string conditionName, bool conditionState) =>