protected static void ShutdownListener() { if (sListener != null) { sListener.Dispose(); } sListener = null; }
protected static void UpdateListener() { ShutdownListener(); Mailbox box = Mailbox.GetMailboxOnHomeLot(Sim.ActiveActor); if (box != null) { GameStates.PreReturnHome -= box.PreReturnHome; sListener = new MailBoxListener(box); GameStates.PreReturnHome += sListener.PreReturnHome; } }