Merge branch 'master' into jgrpp
# Conflicts: # config.lib # projects/openttd_vs140.vcxproj # projects/openttd_vs140.vcxproj.filters # projects/openttd_vs141.vcxproj # projects/openttd_vs141.vcxproj.filters # projects/openttd_vs142.vcxproj # projects/openttd_vs142.vcxproj.filters # src/aircraft_cmd.cpp # src/base_station_base.h # src/core/pool_type.hpp # src/disaster_vehicle.cpp # src/economy.cpp # src/engine.cpp # src/group.h # src/group_cmd.cpp # src/group_gui.cpp # src/lang/english.txt # src/lang/german.txt # src/linkgraph/linkgraph_gui.cpp # src/network/network_command.cpp # src/network/network_server.cpp # src/openttd.cpp # src/order_cmd.cpp # src/road_cmd.cpp # src/saveload/afterload.cpp # src/saveload/cargopacket_sl.cpp # src/saveload/linkgraph_sl.cpp # src/saveload/order_sl.cpp # src/saveload/station_sl.cpp # src/saveload/town_sl.cpp # src/saveload/vehicle_sl.cpp # src/screenshot.cpp # src/screenshot.h # src/settings_gui.cpp # src/settings_type.h # src/smallmap_gui.cpp # src/station.cpp # src/station_cmd.cpp # src/table/settings.ini # src/toolbar_gui.cpp # src/town_cmd.cpp # src/train.h # src/train_cmd.cpp # src/train_gui.cpp # src/vehicle.cpp # src/vehicle_base.h # src/vehiclelist.cpp # src/window_type.h
This commit is contained in:
@@ -56,8 +56,10 @@ void SQAIError_Register(Squirrel *engine)
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
@@ -86,6 +88,7 @@ void SQAIError_Register(Squirrel *engine)
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT);
|
||||
|
||||
|
@@ -24,6 +24,7 @@ void SQAITile_Register(Squirrel *engine)
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E");
|
||||
@@ -69,15 +70,19 @@ void SQAITile_Register(Squirrel *engine)
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED");
|
||||
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii");
|
||||
|
@@ -56,8 +56,10 @@ void SQGSError_Register(Squirrel *engine)
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
@@ -86,6 +88,7 @@ void SQGSError_Register(Squirrel *engine)
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT);
|
||||
|
||||
|
@@ -24,6 +24,7 @@ void SQGSTile_Register(Squirrel *engine)
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED");
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W");
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S");
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E");
|
||||
@@ -69,15 +70,19 @@ void SQGSTile_Register(Squirrel *engine)
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST");
|
||||
SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED");
|
||||
|
||||
SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i");
|
||||
SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii");
|
||||
|
@@ -79,6 +79,8 @@ void SQGSTown_Register(Squirrel *engine)
|
||||
SQGSTown.DefSQStaticMethod(engine, &ScriptTown::ExpandTown, "ExpandTown", 3, ".ii");
|
||||
SQGSTown.DefSQStaticMethod(engine, &ScriptTown::FoundTown, "FoundTown", 6, ".iibi.");
|
||||
SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRating, "GetRating", 3, ".ii");
|
||||
SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetDetailedRating, "GetDetailedRating", 3, ".ii");
|
||||
SQGSTown.DefSQStaticMethod(engine, &ScriptTown::ChangeRating, "ChangeRating", 4, ".iii");
|
||||
SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetAllowedNoise, "GetAllowedNoise", 2, ".i");
|
||||
SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRoadLayout, "GetRoadLayout", 2, ".i");
|
||||
|
||||
|
@@ -140,6 +140,7 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SAVE_PRESET, "WC_SAVE_PRESET");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMERATE_DISPLAY, "WC_FRAMERATE_DISPLAY");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMETIME_GRAPH, "WC_FRAMETIME_GRAPH");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SCREENSHOT, "WC_SCREENSHOT");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INVALID, "WC_INVALID");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLUE, "TC_BLUE");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::TC_SILVER, "TC_SILVER");
|
||||
@@ -590,6 +591,8 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_DISPLAY, "WID_IV_DISPLAY");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_DROPDOWN_ORDER, "WID_ID_DROPDOWN_ORDER");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_DROPDOWN_CRITERIA, "WID_ID_DROPDOWN_CRITERIA");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_FILTER_BY_ACC_CARGO, "WID_ID_FILTER_BY_ACC_CARGO");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_FILTER_BY_PROD_CARGO, "WID_ID_FILTER_BY_PROD_CARGO");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_INDUSTRY_LIST, "WID_ID_INDUSTRY_LIST");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_SCROLLBAR, "WID_ID_SCROLLBAR");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_CAPTION, "WID_IC_CAPTION");
|
||||
@@ -872,6 +875,7 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_NAME, "WID_N_VEH_NAME");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_SPR, "WID_N_VEH_SPR");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_INFO, "WID_N_VEH_INFO");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_SHOW_GROUP, "WID_N_SHOW_GROUP");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_STICKYBOX, "WID_MH_STICKYBOX");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_BACKGROUND, "WID_MH_BACKGROUND");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_SCROLLBAR, "WID_MH_SCROLLBAR");
|
||||
@@ -1030,6 +1034,11 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_OFF, "WID_BROS_LT_OFF");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_ON, "WID_BROS_LT_ON");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_INFO, "WID_BROS_INFO");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE, "WID_SC_TAKE");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_ZOOMIN, "WID_SC_TAKE_ZOOMIN");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_DEFAULTZOOM, "WID_SC_TAKE_DEFAULTZOOM");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_WORLD, "WID_SC_TAKE_WORLD");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_HEIGHTMAP, "WID_SC_TAKE_HEIGHTMAP");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BACKGROUND, "WID_GO_BACKGROUND");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_CURRENCY_DROPDOWN, "WID_GO_CURRENCY_DROPDOWN");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_DISTANCE_DROPDOWN, "WID_GO_DISTANCE_DROPDOWN");
|
||||
|
@@ -18,8 +18,7 @@
|
||||
ScriptClientList::ScriptClientList()
|
||||
{
|
||||
if (!_networking) return;
|
||||
NetworkClientInfo *ci;
|
||||
FOR_ALL_CLIENT_INFOS(ci) {
|
||||
for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) {
|
||||
this->AddItem(ci->client_id);
|
||||
}
|
||||
}
|
||||
@@ -36,8 +35,7 @@ ScriptClientList_Company::ScriptClientList_Company(ScriptCompany::CompanyID comp
|
||||
c = (CompanyID)company;
|
||||
}
|
||||
|
||||
NetworkClientInfo *ci;
|
||||
FOR_ALL_CLIENT_INFOS(ci) {
|
||||
for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) {
|
||||
if (ci->client_playas == c) this->AddItem(ci->client_id);
|
||||
}
|
||||
}
|
||||
|
@@ -26,8 +26,7 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type)
|
||||
|
||||
case ScriptTile::TRANSPORT_AIR: {
|
||||
/* Hangars are not seen as real depots by the depot code. */
|
||||
const Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
for (const Station *st : Station::Iterate()) {
|
||||
if (st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) {
|
||||
for (uint i = 0; i < st->airport.GetNumHangars(); i++) {
|
||||
this->AddItem(st->airport.GetHangarTile(i));
|
||||
@@ -39,8 +38,7 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type)
|
||||
}
|
||||
|
||||
/* Handle 'standard' depots. */
|
||||
const Depot *depot;
|
||||
FOR_ALL_DEPOTS(depot) {
|
||||
for (const Depot *depot : Depot::Iterate()) {
|
||||
if ((::GetTileOwner(depot->xy) == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && ::IsTileType(depot->xy, tile_type)) this->AddItem(depot->xy);
|
||||
}
|
||||
}
|
||||
|
@@ -15,8 +15,7 @@
|
||||
|
||||
ScriptEngineList::ScriptEngineList(ScriptVehicle::VehicleType vehicle_type)
|
||||
{
|
||||
Engine *e;
|
||||
FOR_ALL_ENGINES_OF_TYPE(e, (::VehicleType)vehicle_type) {
|
||||
for (const Engine *e : Engine::IterateType((::VehicleType)vehicle_type)) {
|
||||
if (ScriptObject::GetCompany() == OWNER_DEITY || HasBit(e->company_avail, ScriptObject::GetCompany())) this->AddItem(e->index);
|
||||
}
|
||||
}
|
||||
|
@@ -108,10 +108,10 @@ public:
|
||||
ERR_NOT_ENOUGH_CASH, // [STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY]
|
||||
|
||||
/** Local authority won't allow the previous action */
|
||||
ERR_LOCAL_AUTHORITY_REFUSES, // [STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS]
|
||||
ERR_LOCAL_AUTHORITY_REFUSES, // [STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE]
|
||||
|
||||
/** The piece of infrastructure you tried to build is already in place */
|
||||
ERR_ALREADY_BUILT, // [STR_ERROR_ALREADY_BUILT, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST]
|
||||
ERR_ALREADY_BUILT, // [STR_ERROR_ALREADY_BUILT, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_TREE_ALREADY_HERE]
|
||||
|
||||
/** Area isn't clear, try to demolish the building on it */
|
||||
ERR_AREA_NOT_CLEAR, // [STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_RAILROAD, STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, STR_ERROR_BUOY_IN_THE_WAY, STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, STR_ERROR_COMPANY_HEADQUARTERS_IN, STR_ERROR_OBJECT_IN_THE_WAY, STR_ERROR_MUST_REMOVE_ROAD_FIRST, STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, STR_ERROR_EXCAVATION_WOULD_DAMAGE]
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
ERR_VEHICLE_IN_THE_WAY, // [STR_ERROR_TRAIN_IN_THE_WAY, STR_ERROR_ROAD_VEHICLE_IN_THE_WAY, STR_ERROR_SHIP_IN_THE_WAY, STR_ERROR_AIRCRAFT_IN_THE_WAY]
|
||||
|
||||
/** Site is unsuitable */
|
||||
ERR_SITE_UNSUITABLE, // [STR_ERROR_SITE_UNSUITABLE]
|
||||
ERR_SITE_UNSUITABLE, // [STR_ERROR_SITE_UNSUITABLE, STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE]
|
||||
|
||||
/** Too close to the edge of the map */
|
||||
ERR_TOO_CLOSE_TO_EDGE, // [STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP]
|
||||
|
@@ -154,8 +154,7 @@
|
||||
|
||||
Money profit = 0;
|
||||
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->group_id != group_id) continue;
|
||||
if (!v->IsPrimaryVehicle()) continue;
|
||||
|
||||
@@ -179,8 +178,7 @@
|
||||
uint32 occupancy = 0;
|
||||
uint32 vehicle_count = 0;
|
||||
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->group_id != group_id) continue;
|
||||
if (!v->IsPrimaryVehicle()) continue;
|
||||
|
||||
|
@@ -15,8 +15,7 @@
|
||||
|
||||
ScriptGroupList::ScriptGroupList()
|
||||
{
|
||||
Group *g;
|
||||
FOR_ALL_GROUPS(g) {
|
||||
for (const Group *g : Group::Iterate()) {
|
||||
if (g->owner == ScriptObject::GetCompany()) this->AddItem(g->index);
|
||||
}
|
||||
}
|
||||
|
@@ -15,17 +15,14 @@
|
||||
|
||||
ScriptIndustryList::ScriptIndustryList()
|
||||
{
|
||||
Industry *i;
|
||||
FOR_ALL_INDUSTRIES(i) {
|
||||
for (const Industry *i : Industry::Iterate()) {
|
||||
this->AddItem(i->index);
|
||||
}
|
||||
}
|
||||
|
||||
ScriptIndustryList_CargoAccepting::ScriptIndustryList_CargoAccepting(CargoID cargo_id)
|
||||
{
|
||||
const Industry *i;
|
||||
|
||||
FOR_ALL_INDUSTRIES(i) {
|
||||
for (const Industry *i : Industry::Iterate()) {
|
||||
for (byte j = 0; j < lengthof(i->accepts_cargo); j++) {
|
||||
if (i->accepts_cargo[j] == cargo_id) this->AddItem(i->index);
|
||||
}
|
||||
@@ -34,9 +31,7 @@ ScriptIndustryList_CargoAccepting::ScriptIndustryList_CargoAccepting(CargoID car
|
||||
|
||||
ScriptIndustryList_CargoProducing::ScriptIndustryList_CargoProducing(CargoID cargo_id)
|
||||
{
|
||||
const Industry *i;
|
||||
|
||||
FOR_ALL_INDUSTRIES(i) {
|
||||
for (const Industry *i : Industry::Iterate()) {
|
||||
for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
|
||||
if (i->produced_cargo[j] == cargo_id) this->AddItem(i->index);
|
||||
}
|
||||
|
@@ -16,8 +16,7 @@
|
||||
|
||||
ScriptSignList::ScriptSignList()
|
||||
{
|
||||
Sign *s;
|
||||
FOR_ALL_SIGNS(s) {
|
||||
for (const Sign *s : Sign::Iterate()) {
|
||||
if (ScriptSign::IsValidSign(s->index)) this->AddItem(s->index);
|
||||
}
|
||||
}
|
||||
|
@@ -18,8 +18,7 @@
|
||||
|
||||
ScriptStationList::ScriptStationList(ScriptStation::StationType station_type)
|
||||
{
|
||||
Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
for (Station *st : Station::Iterate()) {
|
||||
if ((st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && (st->facilities & station_type) != 0) this->AddItem(st->index);
|
||||
}
|
||||
}
|
||||
|
@@ -17,8 +17,7 @@ ScriptStoryPageElementList::ScriptStoryPageElementList(ScriptStoryPage::StoryPag
|
||||
{
|
||||
if (!ScriptStoryPage::IsValidStoryPage(story_page_id)) return;
|
||||
|
||||
StoryPageElement *pe;
|
||||
FOR_ALL_STORY_PAGE_ELEMENTS(pe) {
|
||||
for (StoryPageElement *pe : StoryPageElement::Iterate()) {
|
||||
if (pe->page == story_page_id) {
|
||||
this->AddItem(pe->index);
|
||||
}
|
||||
|
@@ -19,8 +19,7 @@ ScriptStoryPageList::ScriptStoryPageList(ScriptCompany::CompanyID company)
|
||||
uint8 c = company;
|
||||
if (company == ScriptCompany::COMPANY_INVALID) c = INVALID_COMPANY;
|
||||
|
||||
StoryPage *p;
|
||||
FOR_ALL_STORY_PAGES(p) {
|
||||
for (StoryPage *p : StoryPage::Iterate()) {
|
||||
if (p->company == c || p->company == INVALID_COMPANY) {
|
||||
this->AddItem(p->index);
|
||||
}
|
||||
|
@@ -15,8 +15,7 @@
|
||||
|
||||
ScriptSubsidyList::ScriptSubsidyList()
|
||||
{
|
||||
const Subsidy *s;
|
||||
FOR_ALL_SUBSIDIES(s) {
|
||||
for (const Subsidy *s : Subsidy::Iterate()) {
|
||||
this->AddItem(s->index);
|
||||
}
|
||||
}
|
||||
|
@@ -40,6 +40,9 @@ public:
|
||||
|
||||
/** There is a tunnel underneath */
|
||||
ERR_EXCAVATION_WOULD_DAMAGE, // [STR_ERROR_EXCAVATION_WOULD_DAMAGE]
|
||||
|
||||
/** Reached the limit for terraforming/clearing/planting */
|
||||
ERR_LIMIT_REACHED, // [STR_ERROR_TERRAFORM_LIMIT_REACHED, STR_ERROR_CLEARING_LIMIT_REACHED, STR_ERROR_TREE_PLANT_LIMIT_REACHED]
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -336,6 +336,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ int ScriptTown::GetDetailedRating(TownID town_id, ScriptCompany::CompanyID company_id)
|
||||
{
|
||||
if (!IsValidTown(town_id)) return TOWN_RATING_INVALID;
|
||||
ScriptCompany::CompanyID company = ScriptCompany::ResolveCompanyID(company_id);
|
||||
if (company == ScriptCompany::COMPANY_INVALID) return TOWN_RATING_INVALID;
|
||||
|
||||
const Town *t = ::Town::Get(town_id);
|
||||
return t->ratings[company];
|
||||
}
|
||||
|
||||
/* static */ bool ScriptTown::ChangeRating(TownID town_id, ScriptCompany::CompanyID company_id, int delta)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY);
|
||||
EnforcePrecondition(false, IsValidTown(town_id));
|
||||
ScriptCompany::CompanyID company = ScriptCompany::ResolveCompanyID(company_id);
|
||||
EnforcePrecondition(false, company != ScriptCompany::COMPANY_INVALID);
|
||||
|
||||
const Town *t = ::Town::Get(town_id);
|
||||
int16 new_rating = Clamp(t->ratings[company] + delta, RATING_MINIMUM, RATING_MAXIMUM);
|
||||
if (new_rating == t->ratings[company]) return false;
|
||||
|
||||
uint16 p2 = 0;
|
||||
memcpy(&p2, &new_rating, sizeof(p2));
|
||||
|
||||
return ScriptObject::DoCommand(0, town_id | (company_id << 16), p2, CMD_TOWN_RATING);
|
||||
}
|
||||
|
||||
/* static */ int ScriptTown::GetAllowedNoise(TownID town_id)
|
||||
{
|
||||
if (!IsValidTown(town_id)) return -1;
|
||||
@@ -346,8 +373,7 @@
|
||||
}
|
||||
|
||||
int num = 0;
|
||||
const Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
for (const Station *st : Station::Iterate()) {
|
||||
if (st->town == t && (st->facilities & FACIL_AIRPORT) && st->airport.type != AT_OILRIG) num++;
|
||||
}
|
||||
return max(0, 2 - num);
|
||||
|
@@ -423,6 +423,30 @@ public:
|
||||
*/
|
||||
static TownRating GetRating(TownID town_id, ScriptCompany::CompanyID company_id);
|
||||
|
||||
/**
|
||||
* Get the accurate rating of a company within a town.
|
||||
* @param town_id The town to get the rating for.
|
||||
* @param company_id The company to get the rating for.
|
||||
* @pre IsValidTown(town_id).
|
||||
* @pre ScriptCompany.ResolveCompanyID(company) != ScriptCompany::COMPANY_INVALID.
|
||||
* @return The rating as a number between -1000 (worst) and 1000 (best).
|
||||
* @api -ai
|
||||
*/
|
||||
static int GetDetailedRating(TownID town_id, ScriptCompany::CompanyID company_id);
|
||||
|
||||
/**
|
||||
* Change the rating of a company within a town.
|
||||
* @param town_id The town to change the rating in.
|
||||
* @param company_id The company to change the rating for.
|
||||
* @param delta How much to change rating by (range -1000 to +1000).
|
||||
* @return True if the rating was changed.
|
||||
* @pre IsValidTown(town_id).
|
||||
* @pre ScriptCompany.ResolveCompanyID(company) != ScriptCompany::COMPANY_INVALID.
|
||||
* @pre no company mode in scope
|
||||
* @api -ai
|
||||
*/
|
||||
static bool ChangeRating(TownID town_id, ScriptCompany::CompanyID company_id, int delta);
|
||||
|
||||
/**
|
||||
* Get the maximum level of noise that still can be added by airports
|
||||
* before the town start to refuse building a new airport.
|
||||
|
@@ -15,8 +15,7 @@
|
||||
|
||||
ScriptTownList::ScriptTownList()
|
||||
{
|
||||
Town *t;
|
||||
FOR_ALL_TOWNS(t) {
|
||||
for (const Town *t : Town::Iterate()) {
|
||||
this->AddItem(t->index);
|
||||
}
|
||||
}
|
||||
|
@@ -20,8 +20,7 @@
|
||||
|
||||
ScriptVehicleList::ScriptVehicleList()
|
||||
{
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if ((v->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::Train::From(v)->IsFreeWagon()))) this->AddItem(v->index);
|
||||
}
|
||||
}
|
||||
@@ -30,8 +29,7 @@ ScriptVehicleList_Station::ScriptVehicleList_Station(StationID station_id)
|
||||
{
|
||||
if (!ScriptBaseStation::IsValidBaseStation(station_id)) return;
|
||||
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if ((v->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && v->IsPrimaryVehicle()) {
|
||||
const Order *order;
|
||||
|
||||
@@ -81,8 +79,7 @@ ScriptVehicleList_Depot::ScriptVehicleList_Depot(TileIndex tile)
|
||||
return;
|
||||
}
|
||||
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if ((v->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && v->IsPrimaryVehicle() && v->type == type) {
|
||||
const Order *order;
|
||||
|
||||
@@ -109,8 +106,7 @@ ScriptVehicleList_Group::ScriptVehicleList_Group(GroupID group_id)
|
||||
{
|
||||
if (!ScriptGroup::IsValidGroup((ScriptGroup::GroupID)group_id)) return;
|
||||
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->owner == ScriptObject::GetCompany() && v->IsPrimaryVehicle()) {
|
||||
if (v->group_id == group_id) this->AddItem(v->index);
|
||||
}
|
||||
@@ -121,8 +117,7 @@ ScriptVehicleList_DefaultGroup::ScriptVehicleList_DefaultGroup(ScriptVehicle::Ve
|
||||
{
|
||||
if (vehicle_type < ScriptVehicle::VT_RAIL || vehicle_type > ScriptVehicle::VT_AIR) return;
|
||||
|
||||
const Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->owner == ScriptObject::GetCompany() && v->IsPrimaryVehicle()) {
|
||||
if (v->type == (::VehicleType)vehicle_type && v->group_id == ScriptGroup::GROUP_DEFAULT) this->AddItem(v->index);
|
||||
}
|
||||
|
@@ -17,8 +17,7 @@
|
||||
|
||||
ScriptWaypointList::ScriptWaypointList(ScriptWaypoint::WaypointType waypoint_type)
|
||||
{
|
||||
const Waypoint *wp;
|
||||
FOR_ALL_WAYPOINTS(wp) {
|
||||
for (const Waypoint *wp : Waypoint::Iterate()) {
|
||||
if ((wp->facilities & waypoint_type) &&
|
||||
(wp->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY || wp->owner == OWNER_NONE)) this->AddItem(wp->index);
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@
|
||||
#include "../../widgets/osk_widget.h"
|
||||
#include "../../widgets/rail_widget.h"
|
||||
#include "../../widgets/road_widget.h"
|
||||
#include "../../widgets/screenshot_widget.h"
|
||||
#include "../../widgets/settings_widget.h"
|
||||
#include "../../widgets/sign_widget.h"
|
||||
#include "../../widgets/smallmap_widget.h"
|
||||
@@ -799,6 +800,12 @@ public:
|
||||
*/
|
||||
WC_FRAMETIME_GRAPH = ::WC_FRAMETIME_GRAPH,
|
||||
|
||||
/**
|
||||
* Screenshot window; %Window numbers:
|
||||
* - 0 = #ScreenshotWidgets
|
||||
*/
|
||||
WC_SCREENSHOT = ::WC_SCREENSHOT,
|
||||
|
||||
WC_INVALID = ::WC_INVALID, ///< Invalid window.
|
||||
};
|
||||
|
||||
@@ -1540,6 +1547,8 @@ public:
|
||||
enum IndustryDirectoryWidgets {
|
||||
WID_ID_DROPDOWN_ORDER = ::WID_ID_DROPDOWN_ORDER, ///< Dropdown for the order of the sort.
|
||||
WID_ID_DROPDOWN_CRITERIA = ::WID_ID_DROPDOWN_CRITERIA, ///< Dropdown for the criteria of the sort.
|
||||
WID_ID_FILTER_BY_ACC_CARGO = ::WID_ID_FILTER_BY_ACC_CARGO, ///< Accepted cargo filter dropdown list.
|
||||
WID_ID_FILTER_BY_PROD_CARGO = ::WID_ID_FILTER_BY_PROD_CARGO, ///< Produced cargo filter dropdown list.
|
||||
WID_ID_INDUSTRY_LIST = ::WID_ID_INDUSTRY_LIST, ///< Industry list.
|
||||
WID_ID_SCROLLBAR = ::WID_ID_SCROLLBAR, ///< Scrollbar of the list.
|
||||
};
|
||||
@@ -1964,6 +1973,7 @@ public:
|
||||
WID_N_VEH_NAME = ::WID_N_VEH_NAME, ///< Name of the new vehicle.
|
||||
WID_N_VEH_SPR = ::WID_N_VEH_SPR, ///< Graphical display of the new vehicle.
|
||||
WID_N_VEH_INFO = ::WID_N_VEH_INFO, ///< Some technical data of the new vehicle.
|
||||
WID_N_SHOW_GROUP = ::WID_N_SHOW_GROUP, ///< Show vehicle's group
|
||||
};
|
||||
|
||||
/** Widgets of the #MessageHistoryWindow class. */
|
||||
@@ -2211,6 +2221,17 @@ public:
|
||||
WID_BROS_INFO = ::WID_BROS_INFO, ///< Station acceptance info.
|
||||
};
|
||||
|
||||
/* automatically generated from ../../widgets/screenshot_widget.h */
|
||||
/** Widgets of the #ScreenshotWindow class. */
|
||||
enum ScreenshotWindowWidgets {
|
||||
WID_SC_TAKE = ::WID_SC_TAKE, ///< Button for taking a normal screenshot
|
||||
WID_SC_TAKE_ZOOMIN = ::WID_SC_TAKE_ZOOMIN, ///< Button for taking a zoomed in screenshot
|
||||
WID_SC_TAKE_DEFAULTZOOM = ::WID_SC_TAKE_DEFAULTZOOM, ///< Button for taking a screenshot at normal zoom
|
||||
WID_SC_TAKE_WORLD = ::WID_SC_TAKE_WORLD, ///< Button for taking a screenshot of the whole world
|
||||
WID_SC_TAKE_HEIGHTMAP = ::WID_SC_TAKE_HEIGHTMAP, ///< Button for taking a heightmap "screenshot"
|
||||
WID_SC_TAKE_MINIMAP = ::WID_SC_TAKE_MINIMAP, ///< Button for taking a minimap screenshot
|
||||
};
|
||||
|
||||
/* automatically generated from ../../widgets/settings_widget.h */
|
||||
/** Widgets of the #GameOptionsWindow class. */
|
||||
enum GameOptionsWidgets {
|
||||
|
@@ -193,6 +193,8 @@ namespace SQConvert {
|
||||
template <> inline int Return<ScriptWindow::BuildRoadDepotWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildRoadDepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::BuildRoadStationWidgets GetParam(ForceType<ScriptWindow::BuildRoadStationWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildRoadStationWidgets)tmp; }
|
||||
template <> inline int Return<ScriptWindow::BuildRoadStationWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildRoadStationWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::ScreenshotWindowWidgets GetParam(ForceType<ScriptWindow::ScreenshotWindowWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ScreenshotWindowWidgets)tmp; }
|
||||
template <> inline int Return<ScriptWindow::ScreenshotWindowWidgets>(HSQUIRRELVM vm, ScriptWindow::ScreenshotWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::GameOptionsWidgets GetParam(ForceType<ScriptWindow::GameOptionsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GameOptionsWidgets)tmp; }
|
||||
template <> inline int Return<ScriptWindow::GameOptionsWidgets>(HSQUIRRELVM vm, ScriptWindow::GameOptionsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::GameSettingsWidgets GetParam(ForceType<ScriptWindow::GameSettingsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GameSettingsWidgets)tmp; }
|
||||
|
Reference in New Issue
Block a user