private void RefreshRegionBuilding(AgeTransform tableitem, PointOfInterest reference, int index) { ConstructedBuildingGuiItem component = tableitem.GetComponent <ConstructedBuildingGuiItem>(); Diagnostics.Assert(component != null); if (component != null) { component.RefreshRegionBuilding(this.City, reference, base.GuiService.GuiPanelHelper, base.gameObject); component.Toggle.State = false; tableitem.Enable = (this.interactionsAllowed && !this.IsOtherEmpire && !reference.ArmyPillaging.IsValid && !reference.SimulationObject.Tags.Contains(DepartmentOfDefense.PillageStatusDescriptor)); } }
private void RefreshCityImprovement(AgeTransform tableitem, CityImprovement reference, int index) { ConstructedBuildingGuiItem component = tableitem.GetComponent <ConstructedBuildingGuiItem>(); Diagnostics.Assert(component != null); if (component != null) { component.RefreshCityImprovement(this.City, reference, base.gameObject); component.Toggle.State = false; bool flag = !reference.SimulationObject.DescriptorHolders.Exists((SimulationDescriptorHolder match) => match.Descriptor.Name == "CityImprovementUndestroyable"); tableitem.Enable = (flag && this.interactionsAllowed && !this.IsOtherEmpire); } }