static bool Prefix(Caravan caravan) { //When not playing multiplayer, don't modify behavior. if (Multiplayer.Client == null) { return(true); } //If in the middle of creating a proxy, don't cancel. //This is needed since CaravanSplittingProxy uses Dialog_SplitCaravan as a base class. if (CaravanSplittingProxy.CreatingProxy) { return(true); } //Otherwise cancel creation of the Dialog_SplitCaravan. // If there's already an active session, open the window associated with it. // Otherwise, create a new session. if (Multiplayer.WorldComp.splitSession != null) { Multiplayer.WorldComp.splitSession.OpenWindow(true); } else { CaravanSplittingSession.CreateSplittingSession(caravan); } return(false); }
private void CancelButtonClicked() { CaravanSplittingSession.CancelSplittingSession(); }
private void ResetButtonClicked() { SoundDefOf.Tick_Low.PlayOneShotOnCamera(); CaravanSplittingSession.ResetSplittingSession(); }
private void AcceptButtonClicked() { CaravanSplittingSession.AcceptSplitSession(); }