(svn r23614) -Add: more API functions exposed to NoGo (part 1)
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
/* static */ bool ScriptVehicle::IsValidVehicle(VehicleID vehicle_id)
|
||||
{
|
||||
const Vehicle *v = ::Vehicle::GetIfValid(vehicle_id);
|
||||
return v != NULL && v->owner == _current_company && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::Train::From(v)->IsFreeWagon()));
|
||||
return v != NULL && (v->owner == _current_company || _current_company == OWNER_DEITY) && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::Train::From(v)->IsFreeWagon()));
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptVehicle::GetNumWagons(VehicleID vehicle_id)
|
||||
|
Reference in New Issue
Block a user