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

Function getVehicle

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

Source from the content-addressed store, hash-verified

127 }
128
129 static Vehicles::VehicleHead* getVehicle(const Window& self)
130 {
131 auto* veh = EntityManager::get<Vehicles::VehicleHead>(EntityId(self.number));
132 if (veh == nullptr)
133 {
134 WindowManager::close(WindowType::vehicle, self.number);
135 return nullptr;
136 }
137 return veh;
138 }
139
140 static bool needsComponentChangeConfirm(EntityId id, const bool checkKeepCargoCheat)
141 {

Callers 15

createViewportFunction · 0.85
createFunction · 0.85
onUpdateFunction · 0.85
onResizeFunction · 0.85
stopStartOpenFunction · 0.85
onStopStartDropdownFunction · 0.85
onCentreViewportDropdownFunction · 0.85
tooltipFunction · 0.85
prepareDrawFunction · 0.85
drawFunction · 0.85
cloneVehicleFunction · 0.85
onMouseUpFunction · 0.85

Calls 2

EntityIdEnum · 0.85
closeFunction · 0.70

Tested by

no test coverage detected