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

Method removeIndustry

src/OpenLoco/src/Map/SurfaceElement.cpp:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace OpenLoco::World
18{
19 void SurfaceElement::removeIndustry(const World::Pos2& pos)
20 {
21 if (isIndustrial())
22 {
23 setIsIndustrialFlag(false);
24 setGrowthStage(0);
25 setVariation(0);
26 auto z = baseHeight();
27 Ui::ViewportManager::invalidate(pos, z, z + 32, ZoomLevel::eighth);
28 TownManager::updateTownInfo(pos, 0, 0, -30, 0);
29 }
30 }
31
32 static void updateNonIndustrialSurface(SurfaceElement& elSurface, const World::Pos2 loc)
33 {

Callers 2

removeSurfaceIndustryFunction · 0.80

Calls 2

updateTownInfoFunction · 0.85
invalidateFunction · 0.50

Tested by

no test coverage detected