private void DoEditorCelestialBodyCommandExecuted(EditorCelestialBodyCommand command)
        {
            var player = Players[command.Owner];

            if (command.Name == "AddPlanet")
                CelestialBodiesPathPreviews.Sync();
            else if (command.Name == "Remove")
                CelestialBodiesPathPreviews.Sync();
            else if (command.Name == "ShowPathPreview")
                command.CelestialBody.ShowPath = true;
            
            else if (command.Name == "HidePathPreview")
                command.CelestialBody.ShowPath = false;

            player.CelestialBodyMenu.SyncData();
        }
        private void DoExecuteEditorCelestialBodyCommand(EditorCelestialBodyCommand command)
        {
            if (command.Name == "AddPlanet")
                command.CelestialBody = EditorLevelGenerator.GenerateCelestialBody(Simulator, CelestialBodies, VisualPriorities.Default.CelestialBody);
            else
                command.CelestialBody = command.Owner.SimPlayer.ActualSelection.CelestialBody;

            NotifyEditorCommandExecuted(command);
        }
        private void DoEditorCelestialBodyCommand(EditorCelestialBodyCommand command)
        {
            if (command.Name == "Clear")
            {
                Level.CelestialBodyToProtect = null;
            }

            else if (command.Name == "AddPlanet")
            {
                if (Level.CelestialBodyToProtect == null)
                {
                    Level.CelestialBodyToProtect = command.CelestialBody;
                    Level.CelestialBodyToProtect.LifePoints = CommonStash.Lives;
                }
            }

            else if (command.Name == "PushFirst")
            {
                Level.CelestialBodyToProtect = PlanetarySystemController.GetCelestialBodyWithHighestPathPriority(CelestialBodies);

                if (Level.CelestialBodyToProtect == null)
                    Level.CelestialBodyToProtect = PlanetarySystemController.GetAsteroidBelt(CelestialBodies);
                
                Level.CelestialBodyToProtect.LifePoints = CommonStash.Lives;
            }


            else if (command.Name == "PushLast")
            {
                Level.CelestialBodyToProtect = command.CelestialBody;
                Level.CelestialBodyToProtect.LifePoints = CommonStash.Lives;
            }


            else if (command.Name == "Remove")
            {
                Level.CelestialBodyToProtect = PlanetarySystemController.GetAliveCelestialBodyWithHighestPathPriority(CelestialBodies);

                if (Level.CelestialBodyToProtect == null)
                    Level.CelestialBodyToProtect = PlanetarySystemController.GetAsteroidBelt(CelestialBodies);

                if (Level.CelestialBodyToProtect != null)
                    Level.CelestialBodyToProtect.LifePoints = CommonStash.Lives;
            }
        }