1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-02 08:57:44 +00:00

scripts build to their own libs now

This commit is contained in:
GokuWeedLord 2017-12-10 22:04:46 +11:00
parent 68b655dcdd
commit 2474881788
3 changed files with 22 additions and 22 deletions

View file

@ -7,7 +7,7 @@ file(GLOB_RECURSE SCRIPT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
include_directories("../../src/servers/") include_directories("../../src/servers/")
include_directories("../../src/servers/Server_Zone/") include_directories("../../src/servers/Server_Zone/")
foreach(_sourcefile "${SCRIPT_FILES}") foreach(_sourcefile ${SCRIPT_FILES})
get_filename_component(_file "${_sourcefile}" NAME_WE) get_filename_component(_file "${_sourcefile}" NAME_WE)
add_library("${_file}" MODULE "${_sourcefile}" "${SCRIPT_INCLUDE_FILES}") add_library("${_file}" MODULE "${_sourcefile}" "${SCRIPT_INCLUDE_FILES}")
@ -22,4 +22,4 @@ foreach(_sourcefile "${SCRIPT_FILES}")
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/" LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/" LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/"
) )
endforeach(_sourcefile "${SCRIPT_FILES}") endforeach(_sourcefile ${SCRIPT_FILES})

View file

@ -1,15 +1,15 @@
//#include "../ScriptObject.h" #include "../ScriptObject.h"
//
//class ActionScript3 : public ActionScript class ActionScript3 : public ActionScript
//{ {
//public: public:
// ActionScript3() : ActionScript( "AbilityScript3", 3 ) ActionScript3() : ActionScript( "ActionScript3", 3 )
// {} {}
//
// virtual void onCastFinish( Core::Entity::Player player, Core::Entity::ActorPtr targetActor ) virtual void onCastFinish( Core::Entity::Player player, Core::Entity::ActorPtr targetActor )
// { {
// player.addStatusEffectByIdIfNotExist( 50, 20000, player, 30 ); player.addStatusEffectByIdIfNotExist( 50, 20000, player, 30 );
// } }
//}; };
//
//EXPORT_ACTIONSCRIPT( ActionScript3 ) EXPORT_ACTIONSCRIPT( ActionScript3 )

View file

@ -6,11 +6,11 @@ public:
StatusEffect50() : StatusEffectScript( "StatusEffect50", 50 ) StatusEffect50() : StatusEffectScript( "StatusEffect50", 50 )
{} {}
// virtual void onTick( Core::Entity::ActorPtr actor ) virtual void onTick( Core::Entity::ActorPtr actor )
// { {
// if( actor->isPlayer() ) if( actor->isPlayer() )
// actor->getAsPlayer()->sendDebug( "tick tock bitch" ); actor->getAsPlayer()->sendDebug( "tick tock bitch" );
// } }
}; };
EXPORT_STATUSEFFECTSCRIPT( StatusEffect50 ) EXPORT_STATUSEFFECTSCRIPT( StatusEffect50 )