summaryrefslogtreecommitdiff
path: root/src/script/api/game
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 21:02:33 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 21:02:33 +0000
commit084f4e6aacc9b3ad8f6ac319a55027307cfa5f00 (patch)
tree604b1fc3becb05539705904ff59a465e2641ac54 /src/script/api/game
parent5858c534202ef45039293e3a6020993621cc55a8 (diff)
downloadopenttd-084f4e6aacc9b3ad8f6ac319a55027307cfa5f00.tar.xz
(svn r23629) -Add: allow ScriptRoad::BuildRoad, ScriptBridge::BuildBridge (for roads) and ScriptTunnel:BuildTunnel (for roads) to work for GameScript
Diffstat (limited to 'src/script/api/game')
-rw-r--r--src/script/api/game/game_bridge.hpp.sq1
-rw-r--r--src/script/api/game/game_road.hpp.sq2
-rw-r--r--src/script/api/game/game_tile.hpp.sq1
-rw-r--r--src/script/api/game/game_tunnel.hpp.sq1
4 files changed, 5 insertions, 0 deletions
diff --git a/src/script/api/game/game_bridge.hpp.sq b/src/script/api/game/game_bridge.hpp.sq
index d4c2d0583..56b327471 100644
--- a/src/script/api/game/game_bridge.hpp.sq
+++ b/src/script/api/game/game_bridge.hpp.sq
@@ -42,6 +42,7 @@ void SQGSBridge_Register(Squirrel *engine)
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii");
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i");
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMinLength, "GetMinLength", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::BuildBridge, "BuildBridge", 5, ".iiii");
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetOtherBridgeEnd, "GetOtherBridgeEnd", 2, ".i");
SQGSBridge.PostRegister(engine);
diff --git a/src/script/api/game/game_road.hpp.sq b/src/script/api/game/game_road.hpp.sq
index 5dd857ded..f398b6b00 100644
--- a/src/script/api/game/game_road.hpp.sq
+++ b/src/script/api/game/game_road.hpp.sq
@@ -59,6 +59,8 @@ void SQGSRoad_Register(Squirrel *engine)
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, ".i");
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, ".i");
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoad, "BuildRoad", 3, ".ii");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadFull, "BuildRoadFull", 3, ".ii");
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetBuildCost, "GetBuildCost", 3, ".ii");
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
diff --git a/src/script/api/game/game_tile.hpp.sq b/src/script/api/game/game_tile.hpp.sq
index 53e02578b..a25a175b5 100644
--- a/src/script/api/game/game_tile.hpp.sq
+++ b/src/script/api/game/game_tile.hpp.sq
@@ -77,6 +77,7 @@ void SQGSTile_Register(Squirrel *engine)
ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i");
SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii");
SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsWaterTile, "IsWaterTile", 2, ".i");
SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsCoastTile, "IsCoastTile", 2, ".i");
diff --git a/src/script/api/game/game_tunnel.hpp.sq b/src/script/api/game/game_tunnel.hpp.sq
index 49a6311de..e2d94bfcd 100644
--- a/src/script/api/game/game_tunnel.hpp.sq
+++ b/src/script/api/game/game_tunnel.hpp.sq
@@ -39,6 +39,7 @@ void SQGSTunnel_Register(Squirrel *engine)
SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::IsTunnelTile, "IsTunnelTile", 2, ".i");
SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::GetOtherTunnelEnd, "GetOtherTunnelEnd", 2, ".i");
+ SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::BuildTunnel, "BuildTunnel", 3, ".ii");
SQGSTunnel.PostRegister(engine);
}