Skip to content

Commit

Permalink
[luadefs-server] Clean up RadarArea
Browse files Browse the repository at this point in the history
  • Loading branch information
qaisjp committed Sep 10, 2015
1 parent a7f8cad commit d753afd
Show file tree
Hide file tree
Showing 12 changed files with 345 additions and 350 deletions.
3 changes: 1 addition & 2 deletions MTA10_Server/mods/deathmatch/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ LOGIC = \
./logic/lua/CLuaFunctionDefs.Event.cpp \
./logic/lua/CLuaFunctionDefs.Misc.cpp \
./logic/lua/CLuaFunctionDefs.PREG.cpp \
./logic/lua/CLuaFunctionDefs.RadarArea.cpp \
./logic/lua/CLuaFunctionDefs.Server.cpp \
./logic/lua/CLuaFunctionDefs.UTF.cpp \
./logic/lua/CLuaFunctionDefs.Utility.cpp \
Expand All @@ -218,7 +217,6 @@ LOGIC = \
./logic/lua/LuaUtils.cpp \
./logic/lua/oopdefs/CLuaOOPFunctionDefs.Connection.cpp \
./logic/lua/oopdefs/CLuaOOPFunctionDefs.Player.cpp \
./logic/lua/oopdefs/CLuaOOPFunctionDefs.RadarArea.cpp \
./logic/luadefs/CLuaACLDefs.cpp \
./logic/luadefs/CLuaBitDefs.cpp \
./logic/luadefs/CLuaBlipDefs.cpp \
Expand All @@ -235,6 +233,7 @@ LOGIC = \
./logic/luadefs/CLuaPedDefs.cpp \
./logic/luadefs/CLuaPickupDefs.cpp \
./logic/luadefs/CLuaPlayerDefs.cpp \
./logic/luadefs/CLuaRadarAreaDefs.cpp \
./logic/luadefs/CLuaResourceDefs.cpp \
./logic/luadefs/CLuaTeamDefs.cpp \
./logic/luadefs/CLuaTextDefs.cpp \
Expand Down
1 change: 1 addition & 0 deletions MTA10_Server/mods/deathmatch/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ struct SAclRequest;
#include "luadefs/CLuaPedDefs.h"
#include "luadefs/CLuaPickupDefs.h"
#include "luadefs/CLuaPlayerDefs.h"
#include "luadefs/CLuaRadarAreaDefs.h"
#include "luadefs/CLuaResourceDefs.h"
#include "luadefs/CLuaTeamDefs.h"
#include "luadefs/CLuaTextDefs.h"
Expand Down
4 changes: 2 additions & 2 deletions MTA10_Server/mods/deathmatch/_ServerDeathmatch 2008.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
<ClCompile Include="logic\luadefs\CLuaObjectDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaPedDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaPlayerDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaRadarAreaDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaTeamDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaTimerDefs.cpp" />
<ClCompile Include="logic\luadefs\CLuaVector2Defs.cpp" />
Expand All @@ -472,7 +473,6 @@
<ClCompile Include="logic\lua\CLuaFunctionDefs.Event.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.Misc.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.PREG.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.RadarArea.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.Server.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.UTF.cpp" />
<ClCompile Include="logic\lua\CLuaFunctionDefs.Utility.cpp" />
Expand All @@ -483,7 +483,6 @@
<ClCompile Include="logic\lua\CLuaVector4.cpp" />
<ClCompile Include="logic\lua\oopdefs\CLuaOOPFunctionDefs.Player.cpp" />
<ClCompile Include="logic\lua\oopdefs\CLuaOOPFunctionDefs.Connection.cpp" />
<ClCompile Include="logic\lua\oopdefs\CLuaOOPFunctionDefs.RadarArea.cpp" />
<ClCompile Include="logic\packets\CPlayerNetworkStatusPacket.cpp" />
<ClCompile Include="Server.cpp" />
<ClCompile Include="StdInc.cpp">
Expand Down Expand Up @@ -886,6 +885,7 @@
<ClInclude Include="logic\luadefs\CLuaObjectDefs.h" />
<ClInclude Include="logic\luadefs\CLuaPedDefs.h" />
<ClInclude Include="logic\luadefs\CLuaPlayerDefs.h" />
<ClInclude Include="logic\luadefs\CLuaRadarAreaDefs.h" />
<ClInclude Include="logic\luadefs\CLuaTeamDefs.h" />
<ClInclude Include="logic\luadefs\CLuaTimerDefs.h" />
<ClInclude Include="logic\luadefs\CLuaVector2Defs.h" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,6 @@
<ClCompile Include="logic\lua\CLuaFunctionDefs.Weapon.cpp">
<Filter>Source Files\logic\lua</Filter>
</ClCompile>
<ClCompile Include="logic\lua\CLuaFunctionDefs.RadarArea.cpp">
<Filter>Source Files\logic\lua</Filter>
</ClCompile>
<ClCompile Include="logic\lua\CLuaFunctionDefs.ColShape.cpp">
<Filter>Source Files\logic\lua</Filter>
</ClCompile>
Expand All @@ -960,9 +957,6 @@
<ClCompile Include="logic\lua\CLuaFunctionDefs.Misc.cpp">
<Filter>Source Files\logic\lua</Filter>
</ClCompile>
<ClCompile Include="logic\lua\oopdefs\CLuaOOPFunctionDefs.RadarArea.cpp">
<Filter>Source Files\logic\oopdefs</Filter>
</ClCompile>
<ClCompile Include="logic\packets\CPlayerNetworkStatusPacket.cpp">
<Filter>Source Files\logic\packets</Filter>
</ClCompile>
Expand Down Expand Up @@ -993,6 +987,9 @@
<ClCompile Include="logic\luadefs\CLuaObjectDefs.cpp">
<Filter>Source Files\logic\luadefs</Filter>
</ClCompile>
<ClCompile Include="logic\luadefs\CLuaRadarAreaDefs.cpp">
<Filter>Source Files\logic\luadefs</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="logic\CLightsyncManager.h">
Expand Down Expand Up @@ -1883,6 +1880,9 @@
<ClInclude Include="logic\luadefs\CLuaObjectDefs.h">
<Filter>Header Files\logic\luadefs</Filter>
</ClInclude>
<ClInclude Include="logic\luadefs\CLuaRadarAreaDefs.h">
<Filter>Header Files\logic\luadefs</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Xml Include="acl.xml">
Expand Down
14 changes: 0 additions & 14 deletions MTA10_Server/mods/deathmatch/logic/lua/CLuaFunctionDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@ class CLuaFunctionDefs
LUA_DECLARE ( AddDebugHook );
LUA_DECLARE ( RemoveDebugHook );

// Radar area create/destroy funcs
LUA_DECLARE ( CreateRadarArea );

// Radar area get funcs
LUA_DECLARE ( GetRadarAreaSize );
LUA_DECLARE ( GetRadarAreaColor );
LUA_DECLARE ( IsRadarAreaFlashing );
LUA_DECLARE ( IsInsideRadarArea );

// Radar area set funcs
LUA_DECLARE ( SetRadarAreaSize );
LUA_DECLARE ( SetRadarAreaColor );
LUA_DECLARE ( SetRadarAreaFlashing );

// Explosion funcs
LUA_DECLARE ( CreateExplosion );

Expand Down
25 changes: 1 addition & 24 deletions MTA10_Server/mods/deathmatch/logic/lua/CLuaMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,29 +249,6 @@ void CLuaMain::AddColShapeClass ( lua_State* luaVM )
}


void CLuaMain::AddRadarAreaClass ( lua_State* luaVM )
{
lua_newclass ( luaVM );

lua_classfunction ( luaVM, "create", "createRadarArea" );
lua_classfunction ( luaVM, "isInside", "isInsideRadarArea" );

lua_classfunction ( luaVM, "isFlashing", "isRadarAreaFlashing" );
lua_classfunction ( luaVM, "getSize", "getRadarAreaSize" );
lua_classfunction ( luaVM, "getColor", "getRadarAreaColor" );

lua_classfunction ( luaVM, "setSize", "setRadarAreaSize" );
lua_classfunction ( luaVM, "setFlashing", "setRadarAreaFlashing" );
lua_classfunction ( luaVM, "setColor", "setRadarAreaColor" );

lua_classvariable ( luaVM, "flashing", "setRadarAreaFlashing", "isRadarAreaFlashing" );
//lua_classvariable ( luaVM, "color", "setRadarAreaColor", "getRadarAreaColor" );
lua_classvariable ( luaVM, "size", "setRadarAreaSize", "getRadarAreaSize", CLuaFunctionDefs::SetRadarAreaSize, CLuaOOPDefs::GetRadarAreaSize );

lua_registerclass ( luaVM, "RadarArea", "Element" );
}


void CLuaMain::AddConnectionClass ( lua_State* luaVM )
{
lua_newclass ( luaVM );
Expand Down Expand Up @@ -331,10 +308,10 @@ void CLuaMain::InitClasses ( lua_State* luaVM )
CLuaTeamDefs ::AddClass ( luaVM );
CLuaWaterDefs ::AddClass ( luaVM );
CLuaTimerDefs ::AddClass ( luaVM );
CLuaRadarAreaDefs ::AddClass ( luaVM );
AddAccountClass ( luaVM );
AddBanClass ( luaVM );
AddColShapeClass ( luaVM );
AddRadarAreaClass ( luaVM );
AddConnectionClass ( luaVM );
AddQueryHandleClass ( luaVM );
}
Expand Down
1 change: 0 additions & 1 deletion MTA10_Server/mods/deathmatch/logic/lua/CLuaMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ class CLuaMain //: public CClient
void AddAccountClass ( lua_State* luaVM );
void AddBanClass ( lua_State* luaVM );
void AddColShapeClass ( lua_State* luaVM );
void AddRadarAreaClass ( lua_State* luaVM );
void AddConnectionClass ( lua_State* luaVM );
void AddQueryHandleClass ( lua_State* luaVM );

Expand Down
15 changes: 1 addition & 14 deletions MTA10_Server/mods/deathmatch/logic/lua/CLuaManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,6 @@ void CLuaManager::LoadCFunctions ( void )
CLuaCFunctions::AddFunction ( "addDebugHook", CLuaFunctionDefs::AddDebugHook );
CLuaCFunctions::AddFunction ( "removeDebugHook", CLuaFunctionDefs::RemoveDebugHook );

// Radar area create/destroy funcs
CLuaCFunctions::AddFunction ( "createRadarArea", CLuaFunctionDefs::CreateRadarArea );

// Radar area get funcs
CLuaCFunctions::AddFunction ( "getRadarAreaSize", CLuaFunctionDefs::GetRadarAreaSize );
CLuaCFunctions::AddFunction ( "getRadarAreaColor", CLuaFunctionDefs::GetRadarAreaColor );
CLuaCFunctions::AddFunction ( "isRadarAreaFlashing", CLuaFunctionDefs::IsRadarAreaFlashing );
CLuaCFunctions::AddFunction ( "isInsideRadarArea", CLuaFunctionDefs::IsInsideRadarArea );

// Radar area set funcs
CLuaCFunctions::AddFunction ( "setRadarAreaSize", CLuaFunctionDefs::SetRadarAreaSize );
CLuaCFunctions::AddFunction ( "setRadarAreaColor", CLuaFunctionDefs::SetRadarAreaColor );
CLuaCFunctions::AddFunction ( "setRadarAreaFlashing", CLuaFunctionDefs::SetRadarAreaFlashing );

// Explosion create funcs
CLuaCFunctions::AddFunction ( "createExplosion", CLuaFunctionDefs::CreateExplosion );

Expand Down Expand Up @@ -330,6 +316,7 @@ void CLuaManager::LoadCFunctions ( void )
CLuaTeamDefs::LoadFunctions ();
CLuaWaterDefs::LoadFunctions ();
CLuaTimerDefs::LoadFunctions ();
CLuaRadarAreaDefs::LoadFunctions ();

// All-Seeing Eye Functions
CLuaCFunctions::AddFunction ( "getGameType", CLuaFunctionDefs::GetGameType );
Expand Down
3 changes: 0 additions & 3 deletions MTA10_Server/mods/deathmatch/logic/lua/oopdefs/CLuaOOPDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ class CLuaOOPDefs : public CLuaDefs

// Connection
LUA_DECLARE ( DbQuery );

// RadarArea
LUA_DECLARE ( GetRadarAreaSize );
};

#endif

This file was deleted.

0 comments on commit d753afd

Please sign in to comment.