Example #1
0
 private void LocationEvents_BuildingsChanged(object sender, EventArgsLocationBuildingsChanged e)
 {
     if (e.Location.Name.Equals("Farm"))
     {
         UpdateFarmBuildingLocs();
     }
 }
Example #2
0
 /// <summary>The event called when a building is added or removed in a location.</summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event arguments.</param>
 private void LocationEvents_BuildingsChanged(object sender, EventArgsLocationBuildingsChanged e)
 {
     if (e.Location is BuildableGameLocation location)
     {
         foreach (Building building in e.Added)
         {
             this.FixGarage(building, location);
         }
     }
 }
Example #3
0
        /*
         * END ADD AND REMOVE ARCHWAY
         *
         */



        /*
         * EDIT WINERY WIDTH
         * calls AddArch or RemoveArch depending on what the player did.
         */
        public void LocationEvents_BuildingsChanged(object sender, EventArgsLocationBuildingsChanged e)
        {
            foreach (Building building in e.Added)
            {
                if (building.indoors.Value != null && building.buildingType.Value == "Winery")
                {
                    AddArch(building);
                }
            }
            foreach (Building building in e.Removed)
            {
                if (building.indoors.Value != null && building.buildingType.Value == "Winery")
                {
                    RemoveArch(building);
                }
            }
        }