summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scripts/CMakeLists.txt2
-rw-r--r--src/scripts/Custom/README.md16
-rw-r--r--src/scripts/ScriptLoader.h1
3 files changed, 18 insertions, 1 deletions
diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt
index 769bf26c5e..27945f8391 100644
--- a/src/scripts/CMakeLists.txt
+++ b/src/scripts/CMakeLists.txt
@@ -51,7 +51,7 @@ if(SCRIPTS)
include(Pet/CMakeLists.txt)
endif()
-if(EXISTS "Custom/CMakeLists.txt")
+if(EXISTS "${AC_SCRIPTS_DIR}/Custom/CMakeLists.txt")
include(Custom/CMakeLists.txt)
endif()
diff --git a/src/scripts/Custom/README.md b/src/scripts/Custom/README.md
index 8473a630fd..7b9e83d4e0 100644
--- a/src/scripts/Custom/README.md
+++ b/src/scripts/Custom/README.md
@@ -8,3 +8,19 @@ add scripts to project solution.
BTW, **We strongly suggest you** to use our module system to create your custom
powerful module instead of simple scripts.
+
+
+
+
+-----------------
+CMakeLists.txt example:
+
+set(scripts_STAT_SRCS
+ ${scripts_STAT_SRCS}
+ ${AC_SCRIPTS_DIR}/Custom/your_script.cpp
+ ${AC_SCRIPTS_DIR}/Custom/your_script.h
+)
+
+AC_ADD_SCRIPT_LOADER("Custom" "ScriptLoader.h")
+
+message(" -> Prepared: My custom scripts")
diff --git a/src/scripts/ScriptLoader.h b/src/scripts/ScriptLoader.h
index b9a86d3089..6ac5ef0fe2 100644
--- a/src/scripts/ScriptLoader.h
+++ b/src/scripts/ScriptLoader.h
@@ -7,6 +7,7 @@
#ifndef SC_SCRIPTLOADER_H
#define SC_SCRIPTLOADER_H
+void AddCustomScripts();
void AddScripts();
void AddSpellScripts();
void AddCommandScripts();