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

Function orderDownCommand

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

0x004B4CCB based on

Source from the content-addressed store, hash-verified

2926
2927 // 0x004B4CCB based on
2928 static bool orderDownCommand(Vehicles::VehicleHead* const head, const uint32_t orderOffset)
2929 {
2930 GameCommands::VehicleOrderDownArgs args{};
2931 args.head = head->id;
2932 args.orderOffset = orderOffset - head->orderTableOffset;
2933
2934 GameCommands::setErrorTitle(StringIds::empty);
2935 auto result = GameCommands::doCommand(args, GameCommands::Flags::apply);
2936
2937 Vehicles::OrderManager::generateNumDisplayFrames(head); // Note: order changed, check if this matters.
2938 return result != GameCommands::kFailure;
2939 }
2940
2941 static bool orderReverseCommand(Vehicles::VehicleHead* const head)
2942 {

Callers

nothing calls this directly

Calls 3

setErrorTitleFunction · 0.85
generateNumDisplayFramesFunction · 0.85
doCommandFunction · 0.50

Tested by

no test coverage detected