private void GetAmountAndCapacity(string name, out int amount, out int capacity, out bool modded) { CitizenManager citizenManager; NetManager netManager; AudioManager audioManager; VehicleManager vehicleManager; switch (name) { case "Areas": GameAreaManager gameAreaManager = Singleton <GameAreaManager> .instance; amount = gameAreaManager.m_areaCount; capacity = gameAreaManager.m_maxAreaCount; modded = gameAreaManager.m_maxAreaCount > 9 ? true : false; break; case "Buildings": BuildingManager buildingManager = Singleton <BuildingManager> .instance; amount = buildingManager.m_buildingCount; capacity = BuildingManager.MAX_BUILDING_COUNT; modded = false; break; case "Citizens": citizenManager = Singleton <CitizenManager> .instance; amount = citizenManager.m_citizenCount; capacity = CitizenManager.MAX_CITIZEN_COUNT; modded = false; break; case "Citizen Units": citizenManager = Singleton <CitizenManager> .instance; amount = citizenManager.m_unitCount; capacity = CitizenManager.MAX_UNIT_COUNT; modded = false; break; case "Citizen Instances": citizenManager = Singleton <CitizenManager> .instance; amount = citizenManager.m_instanceCount; capacity = CitizenManager.MAX_INSTANCE_COUNT; modded = false; break; case "Disasters": DisasterManager disasterManager = Singleton <DisasterManager> .instance; amount = disasterManager.m_disasterCount; capacity = DisasterManager.MAX_DISASTER_COUNT; modded = false; break; case "Districts": DistrictManager districtManager = Singleton <DistrictManager> .instance; amount = districtManager.m_districtCount; capacity = DistrictManager.MAX_DISTRICT_COUNT; modded = false; break; case "Events": EventManager eventManager = Singleton <EventManager> .instance; amount = eventManager.m_eventCount; capacity = EventManager.MAX_EVENT_COUNT; modded = false; break; case "Loans": EconomyManager economyManager = Singleton <EconomyManager> .instance; amount = economyManager.CountLoans(); capacity = EconomyManager.MAX_LOANS; modded = false; break; case "Net Segments": netManager = Singleton <NetManager> .instance; amount = netManager.m_segmentCount; capacity = NetManager.MAX_SEGMENT_COUNT; modded = false; break; case "Net Nodes": netManager = Singleton <NetManager> .instance; amount = netManager.m_nodeCount; capacity = NetManager.MAX_NODE_COUNT; modded = false; break; case "Net Lanes": netManager = Singleton <NetManager> .instance; amount = netManager.m_laneCount; capacity = NetManager.MAX_LANE_COUNT; modded = false; break; case "Path Units": PathManager pathManager = Singleton <PathManager> .instance; amount = pathManager.m_pathUnitCount; capacity = PathManager.MAX_PATHUNIT_COUNT; modded = false; break; case "Props": PropManager propManager = Singleton <PropManager> .instance; amount = propManager.m_propCount; capacity = PropManager.MAX_PROP_COUNT; modded = false; break; case "Radio Channels": audioManager = Singleton <AudioManager> .instance; amount = audioManager.m_radioChannelCount; capacity = AudioManager.MAX_RADIO_CHANNEL_COUNT; modded = false; break; case "Radio Contents": audioManager = Singleton <AudioManager> .instance; amount = audioManager.m_radioContentCount; capacity = AudioManager.MAX_RADIO_CONTENT_COUNT; modded = false; break; case "Transport Lines": TransportManager transportManager = Singleton <TransportManager> .instance; amount = transportManager.m_lineCount; capacity = TransportManager.MAX_LINE_COUNT; modded = false; break; case "Trees": TreeManager treeManager = Singleton <TreeManager> .instance; amount = treeManager.m_treeCount; capacity = treeManager.m_trees.m_size > 262144 ? (int)treeManager.m_trees.m_size : TreeManager.MAX_TREE_COUNT; modded = treeManager.m_trees.m_size > 262144 ? true : false; break; case "Vehicles": vehicleManager = Singleton <VehicleManager> .instance; amount = vehicleManager.m_vehicleCount; capacity = VehicleManager.MAX_VEHICLE_COUNT; modded = false; break; case "Vehicles Parked": vehicleManager = Singleton <VehicleManager> .instance; amount = vehicleManager.m_parkedCount; capacity = VehicleManager.MAX_PARKED_COUNT; modded = false; break; case "Zoned Blocks": ZoneManager zoneManager = Singleton <ZoneManager> .instance; amount = zoneManager.m_blockCount; capacity = ZoneManager.MAX_BLOCK_COUNT; modded = false; break; default: amount = 0; capacity = 0; modded = false; break; } }