Exemplo n.º 1
0
        private void DoSelectBlueprint()
        {
            NWPlayer oPC   = GetPC();
            Model    model = GetDialogCustomData <Model>();

            if (!_structure.PlayerHasPermission(oPC, StructurePermission.CanBuildStructures, model.FlagID))
            {
                oPC.FloatingText("You do not have permission to build structures.");
                BuildMainPage();
                ChangePage("MainPage");
                return;
            }

            if (model.IsTerritoryFlag &&
                _structure.WillBlueprintOverlapWithExistingFlags(GetDialogTarget().Location, model.BlueprintID))
            {
                GetPC().FloatingText("Unable to select blueprint. Area of influence would overlap with another territory.");
            }
            else
            {
                _structure.SelectBlueprint(GetPC(), (NWPlaceable)GetDialogTarget(), model.BlueprintID);
                EndConversation();
            }
        }