Ejemplo n.º 1
0
        private void HandleRazeTerritoryResponse(int responseID)
        {
            Model model = GetDialogCustomData <Model>();

            // Safety check to ensure buildings aren't able to be razed.
            if (model.FlagMarker == null)
            {
                return;
            }

            switch (responseID)
            {
            case 1:     // Confirm / REALLY CONFIRM
                if (model.IsConfirmingTerritoryRaze)
                {
                    _structure.RazeTerritory(model.FlagMarker);
                    GetPC().FloatingText(_color.Red("Territory razed!"));
                    EndConversation();
                }
                else
                {
                    model.IsConfirmingTerritoryRaze = true;
                    SetResponseText("RazeTerritoryPage", 1, _color.Red("REALLY CONFIRM RAZE TERRITORY"));
                }

                break;

            case 2:     // Back
                model.IsConfirmingTerritoryRaze = false;
                SetResponseText("RazeTerritoryPage", 1, _color.Red("Confirm Raze Territory"));
                ChangePage("MainPage");
                break;
            }
        }