From f329d17083dae74db950c76fd0b99951f7fe4b98 Mon Sep 17 00:00:00 2001 From: Barbz Date: Sun, 18 Mar 2018 20:32:32 +0100 Subject: [PATCH] Custom scripts - Style of the readme on Github Made it easier to read --- src/server/scripts/Custom/README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/server/scripts/Custom/README.md b/src/server/scripts/Custom/README.md index 05944b870..7390b6f92 100644 --- a/src/server/scripts/Custom/README.md +++ b/src/server/scripts/Custom/README.md @@ -1,26 +1,25 @@ # Custom folder -Here you can create a CMakeLists.txt file where to add your custom scripts -They will be git-ignored +Here you can create a CMakeLists.txt file where to add your custom scripts. +They will be git-ignored. -Remember to use cmake macro inside your CMakeLists.txt to correctly -add scripts to project solution. +Remember to use cmake macros inside your CMakeLists.txt to correctly add your scripts to the project solution. - -/!\ BTW, **We strongly suggest you** to use our module system to create your custom -powerful module instead of simple scripts. +**/!\ BTW, we strongly suggest you to use our module system to create your custom powerful module instead of simple scripts.** ------------------ -How to: +--------------------------- -1) Create a CMakeLists.txt in this directory +## How to add your custom script: + +**1 - Create a CMakeLists.txt in this directory** Example (everything below is needed, just replace with your scripts' names): +``` set(scripts_STAT_SRCS ${scripts_STAT_SRCS} ${AC_SCRIPTS_DIR}/Custom/your_script.cpp @@ -30,8 +29,8 @@ set(scripts_STAT_SRCS AC_ADD_SCRIPT_LOADER("Custom" "ScriptLoader.h") message(" -> Prepared: My custom scripts") +``` +**2 - Add the script to ../ScriptLoader.cpp** -2) Add them to ../ScriptLoader.cpp - -Open the file and go at the end of the file to know what to edit. +Open the file `ScriptLoader.cpp` and go at the end to know what to edit.