public static void ParticipateInFlareupPostfix(SimGameState __instance, bool __state) { try { // __state is used to tell the postfix (from the prefix) that we're in the middle of accepting a flareup if (!__state) { return; } Flareup flareup = Utilities.currentFlareup(); if (flareup == null) { return; } // Clean up the opposite-side travel contract, if it exists __instance.ClearBreadcrumb(); flareup.removeParticipationContracts(); // When the player arrives, we start the flareup the next day - it's only fair not to make them wait around. :) flareup.countdown = 0; flareup.daysUntilMission = 1; WIIC.modLog.Info?.Write($"Player embarked on flareup at {flareup.location.Name}."); __instance.SetSimRoomState(DropshipLocation.SHIP); __instance.RoomManager.AddWorkQueueEntry(flareup.workOrder); __instance.RoomManager.RefreshTimeline(false); } catch (Exception e) { WIIC.modLog.Error?.Write(e); } }