Ejemplo n.º 1
0
        private Location CreateNewLocationFromForm()
        {
            tempLocation = new Location(cbLocation.Text, tbLocDesc.Text);
            tempLocation.TransitionLocation = ChBxTransitionLocation.Checked;
            tempLocation.StartingLocation   = rBstartingLocation.Checked;



            Zone zone = world.GetZoneFromString(cbZone.Text);

            tempLocation.AddAccessPointsToLocation(tempAccessPoints);
            zone.AddLocation(tempLocation);
            if (rBstartingLocation.Checked == true)
            {
                SetLocationAsGameEntryPoint(tempLocation, world);
            }

            foreach (AccessPoint ap in tempLocation.AccessPoints)
            {
                if (!ap.IsOppositeAccessPointExisting(tempLocation, currentZone, world))
                {
                    Zone oppositeZone = world.GetZoneFromString(ap.DestZone);

                    Location locReceivingNewAccessPoint = oppositeZone.GetLocationByName(ap.DestLoc);
                    ap.CreateOppositeAccessPoint(tempLocation, currentZone, locReceivingNewAccessPoint);//TO DO Get the receiving Location
                }
            }
            //tempLocation.Inventory = objectEditor.tempInventoryFromCurrentLocation;
            tempLocation.Void        = objectEditor.rootObjectCopy;
            world.LastLocationEdited = tempLocation;
            return(tempLocation);
        }
Ejemplo n.º 2
0
 private void SaveModificationToLocation()
 {
     locationToEdit.AddAccessPointsToLocation(tempAccessPoints);
     locationToEdit.Title       = cbLocation.Text;
     locationToEdit.Description = tbLocDesc.Text;
 }