(svn r23614) -Add: more API functions exposed to NoGo (part 1)

This commit is contained in:
truebrain
2011-12-19 20:57:23 +00:00
parent 1616961ea2
commit 436cf09923
41 changed files with 1100 additions and 25 deletions

View File

@@ -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)