@@ -56,8 +56,6 @@ void CLuaVehicleDefs::LoadFunctions()
5656 CLuaCFunctions::AddFunction ( " isTrainDerailable" , IsTrainDerailable );
5757 CLuaCFunctions::AddFunction ( " getTrainDirection" , GetTrainDirection );
5858 CLuaCFunctions::AddFunction ( " getTrainSpeed" , GetTrainSpeed );
59- CLuaCFunctions::AddFunction ( " getTrainTrack" , GetTrainTrack );
60- CLuaCFunctions::AddFunction ( " getTrainPosition" , GetTrainPosition );
6159 CLuaCFunctions::AddFunction ( " isVehicleBlown" , IsVehicleBlown );
6260 CLuaCFunctions::AddFunction ( " getVehicleHeadLightColor" , GetVehicleHeadLightColor );
6361 CLuaCFunctions::AddFunction ( " getVehicleDoorOpenRatio" , GetVehicleDoorOpenRatio );
@@ -101,8 +99,6 @@ void CLuaVehicleDefs::LoadFunctions()
10199 CLuaCFunctions::AddFunction ( " setTrainDerailable" , SetTrainDerailable );
102100 CLuaCFunctions::AddFunction ( " setTrainDirection" , SetTrainDirection );
103101 CLuaCFunctions::AddFunction ( " setTrainSpeed" , SetTrainSpeed );
104- CLuaCFunctions::AddFunction ( " setTrainTrack" , SetTrainTrack );
105- CLuaCFunctions::AddFunction ( " setTrainPosition" , SetTrainPosition );
106102 CLuaCFunctions::AddFunction ( " setVehicleHeadLightColor" , SetVehicleHeadLightColor );
107103 CLuaCFunctions::AddFunction ( " setVehicleTurretPosition" , SetVehicleTurretPosition );
108104 CLuaCFunctions::AddFunction ( " setVehicleDoorOpenRatio" , SetVehicleDoorOpenRatio );
@@ -156,8 +152,6 @@ void CLuaVehicleDefs::AddClass ( lua_State* luaVM )
156152 lua_classfunction ( luaVM, " getSirens" , " getVehicleSirens" );
157153 lua_classfunction ( luaVM, " getDirection" , " getTrainDirection" );
158154 lua_classfunction ( luaVM, " getTrainSpeed" , " getTrainSpeed" );
159- lua_classfunction ( luaVM, " getTrack" , " getTrainTrack" );
160- lua_classfunction ( luaVM, " getTrainPosition" , " getTrainPosition" );
161155 lua_classfunction ( luaVM, " getHeadLightColor" , " getVehicleHeadLightColor" );
162156 lua_classfunction ( luaVM, " getColor" , " getVehicleColor" );
163157 lua_classfunction ( luaVM, " getCompatibleUpgrades" , " getVehicleCompatibleUpgrades" );
@@ -215,8 +209,6 @@ void CLuaVehicleDefs::AddClass ( lua_State* luaVM )
215209 lua_classfunction ( luaVM, " setDerailable" , " setTrainDerailable" );
216210 lua_classfunction ( luaVM, " setDerailed" , " setTrainDerailed" );
217211 lua_classfunction ( luaVM, " setDirection" , " setTrainDirection" );
218- lua_classfunction ( luaVM, " setTrack" , " setTrainTrack" );
219- lua_classfunction ( luaVM, " setTrainPosition" , " setTrainPosition" );
220212 lua_classfunction ( luaVM, " setTrainSpeed" , " setTrainSpeed" ); // Reduce confusion
221213
222214 lua_classvariable ( luaVM, " damageProof" , " setVehicleDamageProof" , " isVehicleDamageProof" );
@@ -226,8 +218,6 @@ void CLuaVehicleDefs::AddClass ( lua_State* luaVM )
226218 lua_classvariable ( luaVM, " blown" , " blowVehicle" , " isVehicleBlown" );
227219 lua_classvariable ( luaVM, " direction" , " setTrainDirection" , " getTrainDirection" );
228220 lua_classvariable ( luaVM, " trainSpeed" , " setTrainSpeed" , " getTrainSpeed" );
229- lua_classvariable ( luaVM, " track" , " setTrainTrack" , " getTrainTrack" );
230- lua_classvariable ( luaVM, " trainPosition" , " getTrainPosition" , " getTrainPosition" );
231221 lua_classvariable ( luaVM, " taxiLightOn" , " setVehicleTaxiLightOn" , " isVehicleTaxiLightOn" );
232222 lua_classvariable ( luaVM, " fuelTankExplodable" , " setVehicleFuelTankExplodable" , " isVehicleFuelTankExplodable" );
233223 lua_classvariable ( luaVM, " plateText" , " setVehiclePlateText" , " getVehiclePlateText" );
@@ -1715,54 +1705,6 @@ int CLuaVehicleDefs::GetTrainSpeed ( lua_State* luaVM )
17151705}
17161706
17171707
1718- int CLuaVehicleDefs::GetTrainPosition ( lua_State* luaVM )
1719- {
1720- CVehicle* pVehicle;
1721-
1722- CScriptArgReader argStream ( luaVM );
1723- argStream.ReadUserData ( pVehicle );
1724-
1725- if ( !argStream.HasErrors () )
1726- {
1727- float fPosition ;
1728- if ( CStaticFunctionDefinitions::GetTrainPosition ( pVehicle, fPosition ) )
1729- {
1730- lua_pushnumber ( luaVM, fPosition );
1731- return 1 ;
1732- }
1733- }
1734- else
1735- m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
1736-
1737- lua_pushboolean ( luaVM, false );
1738- return 1 ;
1739- }
1740-
1741-
1742- int CLuaVehicleDefs::GetTrainTrack ( lua_State* luaVM )
1743- {
1744- CVehicle* pVehicle;
1745-
1746- CScriptArgReader argStream ( luaVM );
1747- argStream.ReadUserData ( pVehicle );
1748-
1749- if ( !argStream.HasErrors () )
1750- {
1751- uchar ucTrack;
1752- if ( CStaticFunctionDefinitions::GetTrainTrack ( pVehicle, ucTrack ) )
1753- {
1754- lua_pushnumber ( luaVM, ucTrack );
1755- return 1 ;
1756- }
1757- }
1758- else
1759- m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
1760-
1761- lua_pushboolean ( luaVM, false );
1762- return 1 ;
1763- }
1764-
1765-
17661708int CLuaVehicleDefs::FixVehicle ( lua_State* luaVM )
17671709{
17681710 CElement* pElement;
@@ -2766,59 +2708,6 @@ int CLuaVehicleDefs::SetTrainSpeed ( lua_State* luaVM )
27662708}
27672709
27682710
2769- int CLuaVehicleDefs::SetTrainTrack ( lua_State* luaVM )
2770- {
2771- CVehicle* pVehicle;
2772- uchar ucTrack;
2773-
2774- CScriptArgReader argStream ( luaVM );
2775- argStream.ReadUserData ( pVehicle );
2776- argStream.ReadNumber ( ucTrack );
2777-
2778- if ( !argStream.HasErrors () )
2779- {
2780- if ( ( ucTrack >= 0 ) && ( ucTrack <= 3 ) ) {
2781- if ( CStaticFunctionDefinitions::SetTrainTrack ( pVehicle, ucTrack ) )
2782- {
2783- lua_pushboolean ( luaVM, true );
2784- return 1 ;
2785- }
2786- }
2787- m_pScriptDebugging->LogCustom ( luaVM, " track number should be between 0 and 3 inclusive" );
2788- }
2789- else
2790- m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
2791-
2792- lua_pushboolean ( luaVM, false );
2793- return 1 ;
2794- }
2795-
2796-
2797- int CLuaVehicleDefs::SetTrainPosition ( lua_State* luaVM )
2798- {
2799- CVehicle* pVehicle;
2800- float fPosition ;
2801-
2802- CScriptArgReader argStream ( luaVM );
2803- argStream.ReadUserData ( pVehicle );
2804- argStream.ReadNumber ( fPosition );
2805-
2806- if ( !argStream.HasErrors () )
2807- {
2808- if ( CStaticFunctionDefinitions::SetTrainPosition ( pVehicle, fPosition ) )
2809- {
2810- lua_pushboolean ( luaVM, true );
2811- return 1 ;
2812- }
2813- }
2814- else
2815- m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
2816-
2817- lua_pushboolean ( luaVM, false );
2818- return 1 ;
2819- }
2820-
2821-
28222711int CLuaVehicleDefs::SetVehicleHeadLightColor ( lua_State* luaVM )
28232712{
28242713 CVehicle* pVehicle;
0 commit comments