MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / removeStationFromCargoStats

Function removeStationFromCargoStats

src/OpenLoco/src/World/StationManager.cpp:664–678  ·  view source on GitHub ↗

0x0048F850

Source from the content-addressed store, hash-verified

662
663 // 0x0048F850
664 static void removeStationFromCargoStats(const StationId removedStationId)
665 {
666 for (auto& station : stations())
667 {
668 for (auto& stats : station.cargoStats)
669 {
670 if (stats.origin == removedStationId)
671 {
672 stats.origin = StationId::null;
673 stats.quantity = 0;
674 Ui::WindowManager::invalidate(Ui::WindowType::station, enumValue(station.id()));
675 }
676 }
677 }
678 }
679
680 // 0x0048F7D1
681 void deallocateStation(const StationId stationId)

Callers 1

deallocateStationFunction · 0.85

Calls 4

stationsFunction · 0.85
enumValueFunction · 0.85
invalidateFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected