public void DemolishSegmentGroup(NetInfoGroupViewReadModel netInfoGroupViewReadModel) { _simulationManager.AddAction(() => { foreach (var netInfoReplacementModel in netInfoGroupViewReadModel.NetInfoReplacementModels) { DemolishNetSegments(netInfoReplacementModel.SystemNameOriginal); } _coverageManager.CoverageUpdated(ItemClass.Service.None, ItemClass.SubService.None, ItemClass.Level.None); _netManager.m_nodesUpdated = true; }); Debug.Log($"Demolish of {netInfoGroupViewReadModel.DisplayNameOriginal} completed."); }
public void DemolishSegmentGroup(NetInfoGroupViewReadModel netInfoGroupViewReadModel) { this.simulationManager.AddAction(() => { foreach (var netInfoReplacementModel in netInfoGroupViewReadModel.NetInfoReplacementModels) { this.DemolishNetSegments(netInfoReplacementModel); } }); coverageManager.CoverageUpdated(ItemClass.Service.None, ItemClass.SubService.None, ItemClass.Level.None); this.netManager.m_nodesUpdated = true; DebugOutputPanel.AddMessage( ColossalFramework.Plugins.PluginManager.MessageType.Warning, $"Demolish of {netInfoGroupViewReadModel.DisplayNameOriginal} completed." ); }
private void DeleteBuildingImpl(ref ushort buildingId, ref Building building) { if (building.Info.m_buildingAI.CheckBulldozing(buildingId, ref building) != ToolBase.ToolErrors.None) { return; } var buildingRefundAmount = building.GetRefundAmount(ref buildingId); if (buildingRefundAmount != 0) { economyManager.AddResource(EconomyManager.Resource.RefundAmount, buildingRefundAmount, building.Info.m_class); } building.DispatchAutobulldozeEffect(ref buildingId, nullAudioGroup); buildingManager.ReleaseBuilding(buildingId); if (ItemClass.GetPublicServiceIndex(building.Info.m_class.m_service) != -1) { coverageManager.CoverageUpdated(building.Info.m_class.m_service, building.Info.m_class.m_subService, building.Info.m_class.m_level); } }