1
0
Fork 0

Fix: [Script] Make compat layers fool proof (#13680)

pull/13683/head
Loïc Guilloux 2025-03-01 17:05:47 +01:00 committed by GitHub
parent c81d9b43ea
commit e02474fc3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 130 additions and 130 deletions

View File

@ -96,158 +96,158 @@ AIEngine.IsValidEngine <- function(engine_id)
return AIEngine.IsBuildable(engine_id); return AIEngine.IsBuildable(engine_id);
} }
AIEngine._GetName <- AIEngine.GetName; AIEngine.GetNameCompat0_7 <- AIEngine.GetName;
AIEngine.GetName <- function(engine_id) AIEngine.GetName <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return null; if (!AIEngine.IsBuildable(engine_id)) return null;
return AIEngine._GetName(engine_id); return AIEngine.GetNameCompat0_7(engine_id);
} }
AIEngine._GetCargoType <- AIEngine.GetCargoType; AIEngine.GetCargoTypeCompat0_7 <- AIEngine.GetCargoType;
AIEngine.GetCargoType <- function(engine_id) AIEngine.GetCargoType <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return 255; if (!AIEngine.IsBuildable(engine_id)) return 255;
return AIEngine._GetCargoType(engine_id); return AIEngine.GetCargoTypeCompat0_7(engine_id);
} }
AIEngine._CanRefitCargo <- AIEngine.CanRefitCargo; AIEngine.CanRefitCargoCompat0_7 <- AIEngine.CanRefitCargo;
AIEngine.CanRefitCargo <- function(engine_id, cargo_id) AIEngine.CanRefitCargo <- function(engine_id, cargo_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return false; if (!AIEngine.IsBuildable(engine_id)) return false;
return AIEngine._CanRefitCargo(engine_id, cargo_id); return AIEngine.CanRefitCargoCompat0_7(engine_id, cargo_id);
} }
AIEngine._CanPullCargo <- AIEngine.CanPullCargo; AIEngine.CanPullCargoCompat0_7 <- AIEngine.CanPullCargo;
AIEngine.CanPullCargo <- function(engine_id, cargo_id) AIEngine.CanPullCargo <- function(engine_id, cargo_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return false; if (!AIEngine.IsBuildable(engine_id)) return false;
return AIEngine._CanPullCargo(engine_id, cargo_id); return AIEngine.CanPullCargoCompat0_7(engine_id, cargo_id);
} }
AIEngine._GetCapacity <- AIEngine.GetCapacity; AIEngine.GetCapacityCompat0_7 <- AIEngine.GetCapacity;
AIEngine.GetCapacity <- function(engine_id) AIEngine.GetCapacity <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetCapacity(engine_id); return AIEngine.GetCapacityCompat0_7(engine_id);
} }
AIEngine._GetReliability <- AIEngine.GetReliability; AIEngine.GetReliabilityCompat0_7 <- AIEngine.GetReliability;
AIEngine.GetReliability <- function(engine_id) AIEngine.GetReliability <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetReliability(engine_id); return AIEngine.GetReliabilityCompat0_7(engine_id);
} }
AIEngine._GetMaxSpeed <- AIEngine.GetMaxSpeed; AIEngine.GetMaxSpeedCompat0_7 <- AIEngine.GetMaxSpeed;
AIEngine.GetMaxSpeed <- function(engine_id) AIEngine.GetMaxSpeed <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetMaxSpeed(engine_id); return AIEngine.GetMaxSpeedCompat0_7(engine_id);
} }
AIEngine._GetPrice <- AIEngine.GetPrice; AIEngine.GetPriceCompat0_7 <- AIEngine.GetPrice;
AIEngine.GetPrice <- function(engine_id) AIEngine.GetPrice <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetPrice(engine_id); return AIEngine.GetPriceCompat0_7(engine_id);
} }
AIEngine._GetMaxAge <- AIEngine.GetMaxAge; AIEngine.GetMaxAgeCompat0_7 <- AIEngine.GetMaxAge;
AIEngine.GetMaxAge <- function(engine_id) AIEngine.GetMaxAge <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetMaxAge(engine_id); return AIEngine.GetMaxAgeCompat0_7(engine_id);
} }
AIEngine._GetRunningCost <- AIEngine.GetRunningCost; AIEngine.GetRunningCostCompat0_7 <- AIEngine.GetRunningCost;
AIEngine.GetRunningCost <- function(engine_id) AIEngine.GetRunningCost <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetRunningCost(engine_id); return AIEngine.GetRunningCostCompat0_7(engine_id);
} }
AIEngine._GetPower <- AIEngine.GetPower; AIEngine.GetPowerCompat0_7 <- AIEngine.GetPower;
AIEngine.GetPower <- function(engine_id) AIEngine.GetPower <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetPower(engine_id); return AIEngine.GetPowerCompat0_7(engine_id);
} }
AIEngine._GetWeight <- AIEngine.GetWeight; AIEngine.GetWeightCompat0_7 <- AIEngine.GetWeight;
AIEngine.GetWeight <- function(engine_id) AIEngine.GetWeight <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetWeight(engine_id); return AIEngine.GetWeightCompat0_7(engine_id);
} }
AIEngine._GetMaxTractiveEffort <- AIEngine.GetMaxTractiveEffort; AIEngine.GetMaxTractiveEffortCompat0_7 <- AIEngine.GetMaxTractiveEffort;
AIEngine.GetMaxTractiveEffort <- function(engine_id) AIEngine.GetMaxTractiveEffort <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetMaxTractiveEffort(engine_id); return AIEngine.GetMaxTractiveEffortCompat0_7(engine_id);
} }
AIEngine._GetDesignDate <- AIEngine.GetDesignDate; AIEngine.GetDesignDateCompat0_7 <- AIEngine.GetDesignDate;
AIEngine.GetDesignDate <- function(engine_id) AIEngine.GetDesignDate <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetDesignDate(engine_id); return AIEngine.GetDesignDateCompat0_7(engine_id);
} }
AIEngine._GetVehicleType <- AIEngine.GetVehicleType; AIEngine.GetVehicleTypeCompat0_7 <- AIEngine.GetVehicleType;
AIEngine.GetVehicleType <- function(engine_id) AIEngine.GetVehicleType <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return AIVehicle.VT_INVALID; if (!AIEngine.IsBuildable(engine_id)) return AIVehicle.VT_INVALID;
return AIEngine._GetVehicleType(engine_id); return AIEngine.GetVehicleTypeCompat0_7(engine_id);
} }
AIEngine._IsWagon <- AIEngine.IsWagon; AIEngine.IsWagonCompat0_7 <- AIEngine.IsWagon;
AIEngine.IsWagon <- function(engine_id) AIEngine.IsWagon <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return false; if (!AIEngine.IsBuildable(engine_id)) return false;
return AIEngine._IsWagon(engine_id); return AIEngine.IsWagonCompat0_7(engine_id);
} }
AIEngine._CanRunOnRail <- AIEngine.CanRunOnRail; AIEngine.CanRunOnRailCompat0_7 <- AIEngine.CanRunOnRail;
AIEngine.CanRunOnRail <- function(engine_id, track_rail_type) AIEngine.CanRunOnRail <- function(engine_id, track_rail_type)
{ {
if (!AIEngine.IsBuildable(engine_id)) return false; if (!AIEngine.IsBuildable(engine_id)) return false;
return AIEngine._CanRunOnRail(engine_id, track_rail_type); return AIEngine.CanRunOnRailCompat0_7(engine_id, track_rail_type);
} }
AIEngine._HasPowerOnRail <- AIEngine.HasPowerOnRail; AIEngine.HasPowerOnRailCompat0_7 <- AIEngine.HasPowerOnRail;
AIEngine.HasPowerOnRail <- function(engine_id, track_rail_type) AIEngine.HasPowerOnRail <- function(engine_id, track_rail_type)
{ {
if (!AIEngine.IsBuildable(engine_id)) return false; if (!AIEngine.IsBuildable(engine_id)) return false;
return AIEngine._HasPowerOnRail(engine_id, track_rail_type); return AIEngine.HasPowerOnRailCompat0_7(engine_id, track_rail_type);
} }
AIEngine._GetRoadType <- AIEngine.GetRoadType; AIEngine.GetRoadTypeCompat0_7 <- AIEngine.GetRoadType;
AIEngine.GetRoadType <- function(engine_id) AIEngine.GetRoadType <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return AIRoad.ROADTYPE_INVALID; if (!AIEngine.IsBuildable(engine_id)) return AIRoad.ROADTYPE_INVALID;
return AIEngine._GetRoadType(engine_id); return AIEngine.GetRoadTypeCompat0_7(engine_id);
} }
AIEngine._GetRailType <- AIEngine.GetRailType; AIEngine.GetRailTypeCompat0_7 <- AIEngine.GetRailType;
AIEngine.GetRailType <- function(engine_id) AIEngine.GetRailType <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return AIRail.RAILTYPE_INVALID; if (!AIEngine.IsBuildable(engine_id)) return AIRail.RAILTYPE_INVALID;
return AIEngine._GetRailType(engine_id); return AIEngine.GetRailTypeCompat0_7(engine_id);
} }
AIEngine._IsArticulated <- AIEngine.IsArticulated; AIEngine.IsArticulatedCompat0_7 <- AIEngine.IsArticulated;
AIEngine.IsArticulated <- function(engine_id) AIEngine.IsArticulated <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return false; if (!AIEngine.IsBuildable(engine_id)) return false;
return AIEngine._IsArticulated(engine_id); return AIEngine.IsArticulatedCompat0_7(engine_id);
} }
AIEngine._GetPlaneType <- AIEngine.GetPlaneType; AIEngine.GetPlaneTypeCompat0_7 <- AIEngine.GetPlaneType;
AIEngine.GetPlaneType <- function(engine_id) AIEngine.GetPlaneType <- function(engine_id)
{ {
if (!AIEngine.IsBuildable(engine_id)) return -1; if (!AIEngine.IsBuildable(engine_id)) return -1;
return AIEngine._GetPlaneType(engine_id); return AIEngine.GetPlaneTypeCompat0_7(engine_id);
} }
_AIWaypointList <- AIWaypointList; _AIWaypointList <- AIWaypointList;

View File

@ -7,20 +7,20 @@
/* This file contains code to downgrade the API from 1.1 to 1.0. */ /* This file contains code to downgrade the API from 1.1 to 1.0. */
AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation; AIRoad.BuildRoadStationCompat1_0 <- AIRoad.BuildRoadStation;
AIRoad.BuildRoadStation <- function(tile, front, road_veh_type, station_id) AIRoad.BuildRoadStation <- function(tile, front, road_veh_type, station_id)
{ {
if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false; if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false;
return AIRoad._BuildRoadStation(tile, front, road_veh_type, station_id); return AIRoad.BuildRoadStationCompat1_0(tile, front, road_veh_type, station_id);
} }
AIRoad._BuildDriveThroughRoadStation <- AIRoad.BuildDriveThroughRoadStation; AIRoad.BuildDriveThroughRoadStationCompat1_0 <- AIRoad.BuildDriveThroughRoadStation;
AIRoad.BuildDriveThroughRoadStation <- function(tile, front, road_veh_type, station_id) AIRoad.BuildDriveThroughRoadStation <- function(tile, front, road_veh_type, station_id)
{ {
if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false; if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false;
return AIRoad._BuildDriveThroughRoadStation(tile, front, road_veh_type, station_id); return AIRoad.BuildDriveThroughRoadStationCompat1_0(tile, front, road_veh_type, station_id);
} }
AIBridgeList.HasNext <- AIBridgeList.HasNext <-
@ -59,10 +59,10 @@ function()
return !this.IsEnd(); return !this.IsEnd();
} }
AIIndustry._IsCargoAccepted <- AIIndustry.IsCargoAccepted; AIIndustry.IsCargoAcceptedCompat1_0 <- AIIndustry.IsCargoAccepted;
AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id) AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id)
{ {
return AIIndustry._IsCargoAccepted(industry_id, cargo_id) != AIIndustry.CAS_NOT_ACCEPTED; return AIIndustry.IsCargoAcceptedCompat1_0(industry_id, cargo_id) != AIIndustry.CAS_NOT_ACCEPTED;
} }
AIAbstractList <- AIList; AIAbstractList <- AIList;

View File

@ -7,14 +7,14 @@
/* This file contains code to downgrade the API from 1.9 to 1.8. */ /* This file contains code to downgrade the API from 1.9 to 1.8. */
AIBridge._GetName <- AIBridge.GetName; AIBridge.GetNameCompat1_8 <- AIBridge.GetName;
AIBridge.GetName <- function(bridge_id) AIBridge.GetName <- function(bridge_id)
{ {
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); return AIBridge.GetNameCompat1_8(bridge_id, AIVehicle.VT_RAIL);
} }
AIGroup._CreateGroup <- AIGroup.CreateGroup; AIGroup.CreateGroupCompat1_8 <- AIGroup.CreateGroup;
AIGroup.CreateGroup <- function(vehicle_type) AIGroup.CreateGroup <- function(vehicle_type)
{ {
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); return AIGroup.CreateGroupCompat1_8(vehicle_type, AIGroup.GROUP_INVALID);
} }

View File

@ -7,12 +7,12 @@
/* This file contains code to downgrade the API from 13 to 12. */ /* This file contains code to downgrade the API from 13 to 12. */
AIRoad._HasRoadType <- AIRoad.HasRoadType; AIRoad.HasRoadTypeCompat12 <- AIRoad.HasRoadType;
AIRoad.HasRoadType <- function(tile, road_type) AIRoad.HasRoadType <- function(tile, road_type)
{ {
local list = AIRoadTypeList(AIRoad.GetRoadTramType(road_type)); local list = AIRoadTypeList(AIRoad.GetRoadTramType(road_type));
foreach (rt, _ in list) { foreach (rt, _ in list) {
if (AIRoad._HasRoadType(tile, rt)) { if (AIRoad.HasRoadTypeCompat12(tile, rt)) {
return true; return true;
} }
} }

View File

@ -17,22 +17,22 @@ class AICompat14 {
} }
} }
AIBaseStation._SetName <- AIBaseStation.SetName; AIBaseStation.SetNameCompat14 <- AIBaseStation.SetName;
AIBaseStation.SetName <- function(id, name) { return AIBaseStation._SetName(id, AICompat14.Text(name)); } AIBaseStation.SetName <- function(id, name) { return AIBaseStation.SetNameCompat14(id, AICompat14.Text(name)); }
AICompany._SetName <- AICompany.SetName; AICompany.SetNameCompat14 <- AICompany.SetName;
AICompany.SetName <- function(name) { return AICompany._SetName(AICompat14.Text(name)); } AICompany.SetName <- function(name) { return AICompany.SetNameCompat14(AICompat14.Text(name)); }
AICompany._SetPresidentName <- AICompany.SetPresidentName; AICompany.SetPresidentNameCompat14 <- AICompany.SetPresidentName;
AICompany.SetPresidentName <- function(name) { return AICompany._SetPresidentName(AICompat14.Text(name)); } AICompany.SetPresidentName <- function(name) { return AICompany.SetPresidentNameCompat14(AICompat14.Text(name)); }
AIGroup._SetName <- AIGroup.SetName; AIGroup.SetNameCompat14 <- AIGroup.SetName;
AIGroup.SetName <- function(id, name) { return AIGroup._SetName(id, AICompat14.Text(name)); } AIGroup.SetName <- function(id, name) { return AIGroup.SetNameCompat14(id, AICompat14.Text(name)); }
AISign._BuildSign <- AISign.BuildSign; AISign.BuildSignCompat14 <- AISign.BuildSign;
AISign.BuildSign <- function(id, name) { return AISign._BuildSign(id, AICompat14.Text(name)); } AISign.BuildSign <- function(id, name) { return AISign.BuildSignCompat14(id, AICompat14.Text(name)); }
AITown._FoundTown <- AITown.FoundTown; AITown.FoundTownCompat14 <- AITown.FoundTown;
AITown.FoundTown <- function(tile, size, city, layout, name) { return AITown._FoundTown(tile, size, city, layout, AICompat14.Text(name)); } AITown.FoundTown <- function(tile, size, city, layout, name) { return AITown.FoundTownCompat14(tile, size, city, layout, AICompat14.Text(name)); }
AIVehicle._SetName <- AIVehicle.SetName; AIVehicle.SetNameCompat14 <- AIVehicle.SetName;
AIVehicle.SetName <- function(id, name) { return AIVehicle._SetName(id, AICompat14.Text(name)); } AIVehicle.SetName <- function(id, name) { return AIVehicle.SetNameCompat14(id, AICompat14.Text(name)); }

View File

@ -7,8 +7,8 @@
/* This file contains code to downgrade the API from 1.11 to 1.10. */ /* This file contains code to downgrade the API from 1.11 to 1.10. */
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance; GSCompany.ChangeBankBalanceCompat1_10 <- GSCompany.ChangeBankBalance;
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type) GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
{ {
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID); return GSCompany.ChangeBankBalanceCompat1_10(company, delta, expenses_type, GSMap.TILE_INVALID);
} }

View File

@ -7,10 +7,10 @@
/* This file contains code to downgrade the API from 1.4 to 1.3. */ /* This file contains code to downgrade the API from 1.4 to 1.3. */
GSTown._SetGrowthRate <- GSTown.SetGrowthRate; GSTown.SetGrowthRateCompat1_3 <- GSTown.SetGrowthRate;
GSTown.SetGrowthRate <- function(town_id, days_between_town_growth) GSTown.SetGrowthRate <- function(town_id, days_between_town_growth)
{ {
/* Growth rate 0 caused resetting the custom growth rate. While this was undocumented, it was used nevertheless (ofc). */ /* Growth rate 0 caused resetting the custom growth rate. While this was undocumented, it was used nevertheless (ofc). */
if (days_between_town_growth == 0) days_between_town_growth = GSTown.TOWN_GROWTH_NORMAL; if (days_between_town_growth == 0) days_between_town_growth = GSTown.TOWN_GROWTH_NORMAL;
return GSTown._SetGrowthRate(town_id, days_between_town_growth); return GSTown.SetGrowthRateCompat1_3(town_id, days_between_town_growth);
} }

View File

@ -7,8 +7,8 @@
/* This file contains code to downgrade the API from 1.5 to 1.4 */ /* This file contains code to downgrade the API from 1.5 to 1.4 */
GSNews._Create <- GSNews.Create; GSNews.CreateCompat1_4 <- GSNews.Create;
GSNews.Create <- function(type, text, company) GSNews.Create <- function(type, text, company)
{ {
return GSNews._Create(type, text, company, GSNews.NR_NONE, 0); return GSNews.CreateCompat1_4(type, text, company, GSNews.NR_NONE, 0);
} }

View File

@ -7,8 +7,8 @@
/* This file contains code to downgrade the API from 1.9 to 1.8. */ /* This file contains code to downgrade the API from 1.9 to 1.8. */
GSBridge._GetName <- GSBridge.GetName; GSBridge.GetNameCompat1_8 <- GSBridge.GetName;
GSBridge.GetName <- function(bridge_id) GSBridge.GetName <- function(bridge_id)
{ {
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL); return GSBridge.GetNameCompat1_8(bridge_id, GSVehicle.VT_RAIL);
} }

View File

@ -7,12 +7,12 @@
/* This file contains code to downgrade the API from 13 to 12. */ /* This file contains code to downgrade the API from 13 to 12. */
GSRoad._HasRoadType <- GSRoad.HasRoadType; GSRoad.HasRoadTypeCompat12 <- GSRoad.HasRoadType;
GSRoad.HasRoadType <- function(tile, road_type) GSRoad.HasRoadType <- function(tile, road_type)
{ {
local list = GSRoadTypeList(GSRoad.GetRoadTramType(road_type)); local list = GSRoadTypeList(GSRoad.GetRoadTramType(road_type));
foreach (rt, _ in list) { foreach (rt, _ in list) {
if (GSRoad._HasRoadType(tile, rt)) { if (GSRoad.HasRoadTypeCompat12(tile, rt)) {
return true; return true;
} }
} }

View File

@ -18,63 +18,63 @@ class GSCompat14 {
} }
} }
GSBaseStation._SetName <- GSBaseStation.SetName; GSBaseStation.SetNameCompat14 <- GSBaseStation.SetName;
GSBaseStation.SetName <- function(id, name) { return GSBaseStation._SetName(id, GSCompat14.Text(name)); } GSBaseStation.SetName <- function(id, name) { return GSBaseStation.SetNameCompat14(id, GSCompat14.Text(name)); }
GSCompany._SetName <- GSCompany.SetName; GSCompany.SetNameCompat14 <- GSCompany.SetName;
GSCompany.SetName <- function(name) { return GSCompany._SetName(GSCompat14.Text(name)); } GSCompany.SetName <- function(name) { return GSCompany.SetNameCompat14(GSCompat14.Text(name)); }
GSCompany._SetPresidentName <- GSCompany.SetPresidentName; GSCompany.SetPresidentNameCompat14 <- GSCompany.SetPresidentName;
GSCompany.SetPresidentName <- function(name) { return GSCompany._SetPresidentName(GSCompat14.Text(name)); } GSCompany.SetPresidentName <- function(name) { return GSCompany.SetPresidentNameCompat14(GSCompat14.Text(name)); }
GSGoal._New <- GSGoal.New; GSGoal.NewCompat14 <- GSGoal.New;
GSGoal.New <- function(company, goal, type, dest) { return GSGoal._New(company, GSCompat14.Text(goal), type, dest); } GSGoal.New <- function(company, goal, type, dest) { return GSGoal.NewCompat14(company, GSCompat14.Text(goal), type, dest); }
GSGoal._SetText <- GSGoal.SetText; GSGoal.SetTextCompat14 <- GSGoal.SetText;
GSGoal.SetText <- function(id, goal) { return GSGoal._SetText(id, GSCompat14.Text(goal)); } GSGoal.SetText <- function(id, goal) { return GSGoal.SetTextCompat14(id, GSCompat14.Text(goal)); }
GSGoal._SetProgress <- GSGoal.SetProgress; GSGoal.SetProgressCompat14 <- GSGoal.SetProgress;
GSGoal.SetProgress <- function(id, progress) { return GSGoal._SetProgress(id, GSCompat14.Text(progress)); } GSGoal.SetProgress <- function(id, progress) { return GSGoal.SetProgressCompat14(id, GSCompat14.Text(progress)); }
GSGoal._Question <- GSGoal.Question; GSGoal.QuestionCompat14 <- GSGoal.Question;
GSGoal.Question <- function(id, company, question, type, buttons) { return GSGoal._Question(id, company, GSCompat14.Text(question), type, buttons); } GSGoal.Question <- function(id, company, question, type, buttons) { return GSGoal.QuestionCompat14(id, company, GSCompat14.Text(question), type, buttons); }
GSGoal._QuestionClient <- GSGoal.QuestionClient; GSGoal.QuestionClientCompat14 <- GSGoal.QuestionClient;
GSGoal.QuestionClient <- function(id, target, is_client, question, type, buttons) { return GSGoal._QuestionClient(id, target, is_client, GSCompat14.Text(question), type, buttons); } GSGoal.QuestionClient <- function(id, target, is_client, question, type, buttons) { return GSGoal.QuestionClientCompat14(id, target, is_client, GSCompat14.Text(question), type, buttons); }
GSGroup._SetName <- GSGroup.SetName; GSGroup.SetNameCompat14 <- GSGroup.SetName;
GSGroup.SetName <- function(id, name) { return GSGroup._SetName(id, GSCompat14.Text(name)); } GSGroup.SetName <- function(id, name) { return GSGroup.SetNameCompat14(id, GSCompat14.Text(name)); }
GSIndustry._SetText <- GSIndustry.SetText; GSIndustry.SetTextCompat14 <- GSIndustry.SetText;
GSIndustry.SetText <- function(id, text) { return GSIndustry._SetText(id, GSCompat14.Text(text)); } GSIndustry.SetText <- function(id, text) { return GSIndustry.SetTextCompat14(id, GSCompat14.Text(text)); }
GSIndustry._SetProductionLevel <- GSIndustry.SetProductionLevel; GSIndustry.SetProductionLevelCompat14 <- GSIndustry.SetProductionLevel;
GSIndustry.SetProductionLevel <- function(id, level, news, text) { return GSIndustry._SetProductionLevel(id, level, news, GSCompat14.Text(text)); } GSIndustry.SetProductionLevel <- function(id, level, news, text) { return GSIndustry.SetProductionLevelCompat14(id, level, news, GSCompat14.Text(text)); }
GSLeagueTable._New <- GSLeagueTable.New; GSLeagueTable.NewCompat14 <- GSLeagueTable.New;
GSLeagueTable.New <- function(title, header, footer) { return GSLeagueTable._New(GSCompat14.Text(title), GSCompat14.Text(header), GSCompat14.Text(footer)); } GSLeagueTable.New <- function(title, header, footer) { return GSLeagueTable.NewCompat14(GSCompat14.Text(title), GSCompat14.Text(header), GSCompat14.Text(footer)); }
GSLeagueTable._NewElement <- GSLeagueTable.NewElement; GSLeagueTable.NewElementCompat14 <- GSLeagueTable.NewElement;
GSLeagueTable.NewElement <- function(table, rating, company, text, score, type, target) { return GSLeagueTable._NewElement(table, rating, company, GSCompat14.Text(text), GSCompat14.Text(score), type, target); } GSLeagueTable.NewElement <- function(table, rating, company, text, score, type, target) { return GSLeagueTable.NewElementCompat14(table, rating, company, GSCompat14.Text(text), GSCompat14.Text(score), type, target); }
GSLeagueTable._UpdateElementData <- GSLeagueTable.UpdateElementData; GSLeagueTable.UpdateElementDataCompat14 <- GSLeagueTable.UpdateElementData;
GSLeagueTable.UpdateElementData <- function(element, company, text, type, target) { return GSLeagueTable._UpdateElementData(element, company, GSCompat14.Text(text), type, target); } GSLeagueTable.UpdateElementData <- function(element, company, text, type, target) { return GSLeagueTable.UpdateElementDataCompat14(element, company, GSCompat14.Text(text), type, target); }
GSLeagueTable._UpdateElementScore <- GSLeagueTable.UpdateElementScore; GSLeagueTable.UpdateElementScoreCompat14 <- GSLeagueTable.UpdateElementScore;
GSLeagueTable.UpdateElementScore <- function(element, rating, score) { return GSLeagueTable._UpdateElementScore(element, rating, GSCompat14.Text(score)); } GSLeagueTable.UpdateElementScore <- function(element, rating, score) { return GSLeagueTable.UpdateElementScoreCompat14(element, rating, GSCompat14.Text(score)); }
GSNews._Create <- GSNews.Create; GSNews.CreateCompat14 <- GSNews.Create;
GSNews.Create <- function(type, text, company, ref_type, ref) { return GSNews._Create(type, GSCompat14.Text(text), company, ref_type, ref); } GSNews.Create <- function(type, text, company, ref_type, ref) { return GSNews.CreateCompat14(type, GSCompat14.Text(text), company, ref_type, ref); }
GSSign._BuildSign <- GSSign.BuildSign; GSSign.BuildSignCompat14 <- GSSign.BuildSign;
GSSign.BuildSign <- function(id, name) { return GSSign._BuildSign(id, GSCompat14.Text(name)); } GSSign.BuildSign <- function(id, name) { return GSSign.BuildSignCompat14(id, GSCompat14.Text(name)); }
GSStoryPage._New <- GSStoryPage.New; GSStoryPage.NewCompat14 <- GSStoryPage.New;
GSStoryPage.New <- function(company, title) { return GSStoryPage._New(company, GSCompat14.Text(title)); } GSStoryPage.New <- function(company, title) { return GSStoryPage.NewCompat14(company, GSCompat14.Text(title)); }
GSStoryPage._NewElement <- GSStoryPage.NewElement; GSStoryPage.NewElementCompat14 <- GSStoryPage.NewElement;
GSStoryPage.NewElement <- function(page, type, ref, text) { return GSStoryPage._NewElement(page, type, ref, GSCompat14.Text(text)); } GSStoryPage.NewElement <- function(page, type, ref, text) { return GSStoryPage.NewElementCompat14(page, type, ref, GSCompat14.Text(text)); }
GSStoryPage._UpdateElement <- GSStoryPage.UpdateElement; GSStoryPage.UpdateElementCompat14 <- GSStoryPage.UpdateElement;
GSStoryPage.UpdateElement <- function(id, ref, text) { return GSStoryPage._UpdateElement(id, ref, GSCompat14.Text(text)); } GSStoryPage.UpdateElement <- function(id, ref, text) { return GSStoryPage.UpdateElementCompat14(id, ref, GSCompat14.Text(text)); }
GSStoryPage._SetTitle <- GSStoryPage.SetTitle; GSStoryPage.SetTitleCompat14 <- GSStoryPage.SetTitle;
GSStoryPage.SetTitle <- function(page, tile) { return GSStoryPage._SetTitle(page, GSCompat14.Text(title)); } GSStoryPage.SetTitle <- function(page, tile) { return GSStoryPage.SetTitleCompat14(page, GSCompat14.Text(title)); }
GSTown._SetName <- GSTown.SetName; GSTown.SetNameCompat14 <- GSTown.SetName;
GSTown.SetName <- function(id, name) { return GSTown._SetName(id, GSCompat14.Text(name)); } GSTown.SetName <- function(id, name) { return GSTown.SetNameCompat14(id, GSCompat14.Text(name)); }
GSTown._SetText <- GSTown.SetText; GSTown.SetTextCompat14 <- GSTown.SetText;
GSTown.SetText <- function(id, text) { return GSTown._SetText(id, GSCompat14.Text(text)); } GSTown.SetText <- function(id, text) { return GSTown.SetTextCompat14(id, GSCompat14.Text(text)); }
GSTown._FoundTown <- GSTown.FoundTown; GSTown.FoundTownCompat14 <- GSTown.FoundTown;
GSTown.FoundTown <- function(tile, size, city, layout, name) { return GSTown._FoundTown(tile, size, city, layout, GSCompat14.Text(name)); } GSTown.FoundTown <- function(tile, size, city, layout, name) { return GSTown.FoundTownCompat14(tile, size, city, layout, GSCompat14.Text(name)); }
GSVehicle._SetName <- GSVehicle.SetName; GSVehicle.SetNameCompat14 <- GSVehicle.SetName;
GSVehicle.SetName <- function(id, name) { return GSVehicle._SetName(id, GSCompat14.Text(name)); } GSVehicle.SetName <- function(id, name) { return GSVehicle.SetNameCompat14(id, GSCompat14.Text(name)); }