(svn r23615) -Add: more API functions exposed to NoGo (part 2)

This commit is contained in:
truebrain
2011-12-19 20:57:34 +00:00
parent 436cf09923
commit 9359c6fc47
49 changed files with 914 additions and 46 deletions

View File

@@ -22,7 +22,7 @@ ScriptVehicleList::ScriptVehicleList()
{
const Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->owner == _current_company && v->IsPrimaryVehicle()) this->AddItem(v->index);
if ((v->owner == _current_company || _current_company == OWNER_DEITY) && v->IsPrimaryVehicle()) this->AddItem(v->index);
}
}
@@ -32,7 +32,7 @@ ScriptVehicleList_Station::ScriptVehicleList_Station(StationID station_id)
const Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->owner == _current_company && v->IsPrimaryVehicle()) {
if ((v->owner == _current_company || _current_company == OWNER_DEITY) && v->IsPrimaryVehicle()) {
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
@@ -83,7 +83,7 @@ ScriptVehicleList_Depot::ScriptVehicleList_Depot(TileIndex tile)
const Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->owner == _current_company && v->IsPrimaryVehicle() && v->type == type) {
if ((v->owner == _current_company || _current_company == OWNER_DEITY) && v->IsPrimaryVehicle() && v->type == type) {
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {