private void LocationEvents_BuildingsChanged(object sender, EventArgsLocationBuildingsChanged e) { if (e.Location.Name.Equals("Farm")) { UpdateFarmBuildingLocs(); } }
/// <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); } } }
/* * 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); } } }