| 21 | #include "../../safeguards.h" |
| 22 | |
| 23 | ScriptVehicleList::ScriptVehicleList(HSQUIRRELVM vm) |
| 24 | { |
| 25 | EnforceDeityOrCompanyModeValid_Void(); |
| 26 | |
| 27 | bool is_deity = ScriptCompanyMode::IsDeity(); |
| 28 | ::CompanyID owner = ScriptObject::GetCompany(); |
| 29 | |
| 30 | ScriptList::FillList<Vehicle>(vm, this, |
| 31 | [is_deity, owner](const Vehicle *v) { |
| 32 | return (is_deity || v->owner == owner) && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::Train::From(v)->IsFreeWagon())); |
| 33 | } |
| 34 | ); |
| 35 | } |
| 36 | |
| 37 | ScriptVehicleList_Station::ScriptVehicleList_Station(HSQUIRRELVM vm) |
| 38 | { |
nothing calls this directly
no test coverage detected