private void RegisterAskUndock(GenericShip ship) { if (BoardTools.Board.IsOffTheBoard(ship)) { return; } bool canUndock = true; ship.CallCanReleaseDockedShipRegular(ref canUndock); if (canUndock) { Triggers.RegisterTrigger(new Trigger() { Name = "Undocking decision", TriggerType = TriggerTypes.OnMovementFinish, TriggerOwner = ship.Owner.PlayerNo, EventHandler = AskUndock }); } }