static void Postfix(Quest __instance) { if (Multiplayer.Client == null) { return; } MultiplayerAsyncQuest.TryRemoveCachedQuest(__instance); }
static void Postfix(ref Quest __result) { if (!MultiplayerWorldComp.asyncTime) { return; } MultiplayerAsyncQuest.CacheQuest(__result); }
static void Prefix(Quest __instance, ref MapAsyncTimeComp __state) { if (!MultiplayerWorldComp.asyncTime) { return; } __state = MultiplayerAsyncQuest.TryGetCachedQuestMap(__instance); __state?.PreContext(); }
static bool Prefix() { if (!MultiplayerWorldComp.asyncTime) { return(true); } //Only tick world quest during world time MultiplayerAsyncQuest.TickWorldQuests(); return(false); }
static void Prefix(Quest __instance, ref MapAsyncTimeComp __state) { //Make sure quest is accepted and async time is enabled and there are parts to this quest if (__instance.State != QuestState.NotYetAccepted || !MultiplayerWorldComp.asyncTime || __instance.parts == null) { return; } __state = MultiplayerAsyncQuest.CacheQuest(__instance); __state?.PreContext(); }
static void Postfix(ref Quest __result) { if (Multiplayer.Client == null) { return; } if (!Multiplayer.GameComp.asyncTime) { return; } MultiplayerAsyncQuest.CacheQuest(__result); }
static void Prefix(Quest __instance, ref AsyncTimeComp __state) { if (Multiplayer.Client == null) { return; } if (!Multiplayer.GameComp.asyncTime) { return; } __state = MultiplayerAsyncQuest.TryGetCachedQuestMap(__instance); __state?.PreContext(); }
static void Postfix() { if (!MultiplayerWorldComp.asyncTime) { return; } MultiplayerAsyncQuest.Reset(); foreach (var quest in Find.QuestManager.QuestsListForReading) { MultiplayerAsyncQuest.CacheQuest(quest); } }
static void Prefix(MapParent settlement) { if (!MultiplayerWorldComp.asyncTime) { return; } var mapAsyncTimeComp = settlement.Map.AsyncTime(); if (mapAsyncTimeComp != null) { MultiplayerAsyncQuest.TryRemoveCachedMap(mapAsyncTimeComp); } }
static void Postfix(Quest __instance) { MultiplayerAsyncQuest.TryRemoveCachedQuest(__instance); }