Exemple #1
0
 public static void UpdateConfiguration(this WorldStructure self, WorldConfiguration changedConfiguration)
 {
     for (int i = 0; i < self.WorldConfigurations.Count; i++)
     {
         if (self.WorldConfigurations[i].Id == changedConfiguration.Id)
         {
             self.WorldConfigurations[i] = changedConfiguration;
         }
     }
 }
Exemple #2
0
        public static void UpdateOrAddLocationPrefab(this WorldStructure self, LocationPrefub changedLocationPrefub)
        {
            for (int i = 0; i < self.Locations.Count; i++)
            {
                if (self.Locations[i].Id == changedLocationPrefub.Id)
                {
                    self.Locations[i] = changedLocationPrefub;
                    return;
                }
            }

            self.Locations.Add(changedLocationPrefub);
        }
Exemple #3
0
        public static void RemoveConfiguration(this WorldStructure self, WorldConfiguration deletedConfiguration)
        {
            WorldConfiguration result = null;

            foreach (WorldConfiguration worldConfiguration in self.WorldConfigurations)
            {
                if (worldConfiguration.Id == deletedConfiguration.Id)
                {
                    result = worldConfiguration;
                }
            }

            if (result != null)
            {
                self.WorldConfigurations.Remove(result);
            }
        }
Exemple #4
0
        public static WorldConfiguration GetConfiguration(this WorldStructure self, string configurationId)
        {
            var worldConfiguration = self.WorldConfigurations.GetWorldConfiguration(configurationId);

            return(worldConfiguration);
        }
Exemple #5
0
        public static WorldLocation GetLocation(this WorldStructure self, string locationSid)
        {
            var worldLocation = self.WorldLocations.GetWorldLocation(locationSid);

            return(worldLocation);
        }