Updated trigger names in the server

This commit is contained in:
Kayne Ruse
2015-02-27 05:33:47 +11:00
parent 3431d323e5
commit a00ddb3142
8 changed files with 15 additions and 16 deletions
+2 -2
View File
@@ -42,7 +42,7 @@
#include "monster_system_api.hpp" #include "monster_system_api.hpp"
#include "network_api.hpp" #include "network_api.hpp"
#include "room_system_api.hpp" #include "room_system_api.hpp"
#include "waypoint_system_api.hpp" #include "trigger_system_api.hpp"
//these libs are loaded by lua.c and are readily available to any Lua program //these libs are loaded by lua.c and are readily available to any Lua program
static const luaL_Reg loadedlibs[] = { static const luaL_Reg loadedlibs[] = {
@@ -68,7 +68,7 @@ static const luaL_Reg preloadedlibs[] = {
{TORTUGA_MONSTER_SYSTEM_API, openMonsterSystemAPI}, {TORTUGA_MONSTER_SYSTEM_API, openMonsterSystemAPI},
{TORTUGA_NETWORK_API, openNetworkAPI}, {TORTUGA_NETWORK_API, openNetworkAPI},
{TORTUGA_ROOM_SYSTEM_API, openRoomSystemAPI}, {TORTUGA_ROOM_SYSTEM_API, openRoomSystemAPI},
{TORTUGA_WAYPOINT_SYSTEM_API, openWaypointSystemAPI}, {TORTUGA_TRIGGER_SYSTEM_API, openTriggerSystemAPI},
{NULL, NULL} {NULL, NULL}
}; };
-1
View File
@@ -28,7 +28,6 @@
#include "config_utility.hpp" #include "config_utility.hpp"
#include "room_manager.hpp" #include "room_manager.hpp"
#include "udp_network_utility.hpp" #include "udp_network_utility.hpp"
#include "waypoint_manager.hpp"
#include <stdexcept> #include <stdexcept>
#include <iostream> #include <iostream>
+2 -2
View File
@@ -1,5 +1,5 @@
#include directories #include directories
INCLUDES+=. accounts characters clients entities monsters rooms server_utilities waypoints ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities INCLUDES+=. accounts characters clients entities monsters rooms server_utilities triggers ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
#libraries #libraries
#the order of the $(LIBS) is important, at least for MinGW #the order of the $(LIBS) is important, at least for MinGW
@@ -32,7 +32,7 @@ all: $(OBJ) $(OUT)
$(MAKE) -C monsters $(MAKE) -C monsters
$(MAKE) -C rooms $(MAKE) -C rooms
$(MAKE) -C server_utilities $(MAKE) -C server_utilities
$(MAKE) -C waypoints $(MAKE) -C triggers
$(CXX) $(CXXFLAGS) -o $(OUT) $(OBJ) $(LIBS) $(CXX) $(CXXFLAGS) -o $(OUT) $(OBJ) $(LIBS)
$(OBJ): | $(OBJDIR) $(OBJ): | $(OBJDIR)
+1 -1
View File
@@ -1,5 +1,5 @@
#config #config
INCLUDES+=. ../characters ../entities ../monsters ../server_utilities ../waypoints ../../common/gameplay ../../common/map ../../common/utilities INCLUDES+=. ../characters ../entities ../monsters ../server_utilities ../triggers ../../common/gameplay ../../common/map ../../common/utilities
LIBS+= LIBS+=
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES)) CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
+3 -3
View File
@@ -59,9 +59,9 @@ static int getMonsterMgr(lua_State* L) {
return 1; return 1;
} }
static int getWaypointMgr(lua_State* L) { static int getTriggerMgr(lua_State* L) {
RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1)); RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1));
lua_pushlightuserdata(L, reinterpret_cast<void*>(room->GetWaypointMgr()) ); lua_pushlightuserdata(L, reinterpret_cast<void*>(room->GetTriggerMgr()) );
return 1; return 1;
} }
@@ -95,7 +95,7 @@ static const luaL_Reg roomLib[] = {
{"GetPager",getPager}, {"GetPager",getPager},
{"GetMonsterMgr",getMonsterMgr}, {"GetMonsterMgr",getMonsterMgr},
{"GetWaypointMgr",getWaypointMgr}, {"GetTriggerMgr",getTriggerMgr},
{"SetOnTick", setOnTick}, {"SetOnTick", setOnTick},
+3 -3
View File
@@ -61,8 +61,8 @@ MonsterManager* RoomData::GetMonsterMgr() {
return &monsterMgr; return &monsterMgr;
} }
WaypointManager* RoomData::GetWaypointMgr() { TriggerManager* RoomData::GetTriggerMgr() {
return &waypointMgr; return &triggerMgr;
} }
std::list<CharacterData*>* RoomData::GetCharacterList() { std::list<CharacterData*>* RoomData::GetCharacterList() {
@@ -73,7 +73,7 @@ lua_State* RoomData::SetLuaState(lua_State* L) {
lua = L; lua = L;
pager.SetLuaState(lua); pager.SetLuaState(lua);
monsterMgr.SetLuaState(lua); monsterMgr.SetLuaState(lua);
waypointMgr.SetLuaState(lua); triggerMgr.SetLuaState(lua);
return lua; return lua;
} }
+3 -3
View File
@@ -25,7 +25,7 @@
#include "character_data.hpp" #include "character_data.hpp"
#include "monster_manager.hpp" #include "monster_manager.hpp"
#include "region_pager_lua.hpp" #include "region_pager_lua.hpp"
#include "waypoint_manager.hpp" #include "trigger_manager.hpp"
#include "lua.hpp" #include "lua.hpp"
@@ -48,7 +48,7 @@ public:
RegionPagerLua* GetPager(); RegionPagerLua* GetPager();
MonsterManager* GetMonsterMgr(); MonsterManager* GetMonsterMgr();
WaypointManager* GetWaypointMgr(); TriggerManager* GetTriggerMgr();
std::list<CharacterData*>* GetCharacterList(); std::list<CharacterData*>* GetCharacterList();
//API interfaces //API interfaces
@@ -70,7 +70,7 @@ private:
//members //members
RegionPagerLua pager; RegionPagerLua pager;
MonsterManager monsterMgr; MonsterManager monsterMgr;
WaypointManager waypointMgr; TriggerManager triggerMgr;
std::list<CharacterData*> characterList; std::list<CharacterData*> characterList;
//API //API
+1 -1
View File
@@ -1,5 +1,5 @@
#config #config
INCLUDES+=. ../accounts ../characters ../clients ../entities ../monsters ../rooms ../waypoints ../../common/gameplay ../../common/map ../../common/network ../../common/network/packet_types ../../common/utilities INCLUDES+=. ../accounts ../characters ../clients ../entities ../monsters ../rooms ../triggers ../../common/gameplay ../../common/map ../../common/network ../../common/network/packet_types ../../common/utilities
LIBS+= LIBS+=
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES)) CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))