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

Function paintLand

src/OpenLoco/src/Ui/Windows/TerraForm.cpp:1610–1627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1608 }
1609
1610 static void paintLand()
1611 {
1612 // CHANGE: Allows the player to change land type outside of the scenario editor.
1613 if (_adjustToolSize != 0)
1614 {
1615 if (_lastSelectedLand != 0xFF)
1616 {
1617 GameCommands::setErrorTitle(StringIds::error_cant_change_land_type);
1618 auto [pointA, pointB] = World::getMapSelectionArea();
1619
1620 ChangeLandMaterialArgs args{};
1621 args.pointA = pointA;
1622 args.pointB = pointB;
1623 args.landType = _lastSelectedLand;
1624 GameCommands::doCommand(args, Flags::apply);
1625 }
1626 }
1627 }
1628
1629 // 0x004BC9ED
1630 static void onToolDown([[maybe_unused]] Window& self, const WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id, [[maybe_unused]] const int16_t x, [[maybe_unused]] const int16_t y)

Callers 2

onToolDownFunction · 0.85
toolDragFunction · 0.85

Calls 3

setErrorTitleFunction · 0.85
getMapSelectionAreaFunction · 0.85
doCommandFunction · 0.50

Tested by

no test coverage detected