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

Function removeAirplaneGhost

src/OpenLoco/src/Ui/Windows/Vehicle.cpp:4438–4450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4436 }
4437
4438 static void removeAirplaneGhost(const Vehicles::VehicleHead& head)
4439 {
4440 // Note: don't use isPlaced as we need to know if its a ghost
4441 // consider creating isGhostPlaced
4442 if (head.tileX != -1 && head.has38Flags(Vehicles::Flags38::isGhost))
4443 {
4444 GameCommands::VehiclePickupAirArgs gcArgs{};
4445 gcArgs.head = head.id;
4446 auto flags = GameCommands::Flags::apply | GameCommands::Flags::noErrorWindow | GameCommands::Flags::ghost;
4447 GameCommands::doCommand(gcArgs, flags);
4448 }
4449 _ghostAirportStationId = StationId::null;
4450 }
4451
4452 // 0x004B2AFA
4453 static void pickupToolUpdateAir(const Vehicles::VehicleHead& head, const int16_t x, const int16_t y)

Callers 2

pickupToolUpdateAirFunction · 0.85
pickupToolDownAirFunction · 0.85

Calls 2

has38FlagsMethod · 0.80
doCommandFunction · 0.50

Tested by

no test coverage detected