From 391916f685afe93d9afb021b81f8d5b5789822bc Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 6 Nov 2011 21:02:23 +0100 Subject: Merged three global script states into one These scripts could trivially share one script state, since the methods called on them from the server are not overlapping. This does leave them open to access each other's global variables, but that's the problem with global variables. The one remaining global script file name is now configurable, so that it may also be set to a script in a different scripting language. The two related script options are: script_mainFile (default: scripts/main.lua) script_defaultEngine (default: lua) - renamed from defaultScriptEngine Reviewed-by: jurkan Reviewed-by: Yohann Ferreira --- example/serverdata/scripts/main.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 example/serverdata/scripts/main.lua (limited to 'example/serverdata/scripts') diff --git a/example/serverdata/scripts/main.lua b/example/serverdata/scripts/main.lua new file mode 100644 index 0000000..d5d8bd0 --- /dev/null +++ b/example/serverdata/scripts/main.lua @@ -0,0 +1,17 @@ +---------------------------------------------------------------------------------- +-- Copyright 2011 Manasource Development Team -- +-- -- +-- This file is part of Manasource. -- +-- -- +-- Manasource is free software; you can redistribute it and/or modify it -- +-- under the terms of the GNU General Public License as published by the Free -- +-- Software Foundation; either version 2 of the License, or any later version. -- +---------------------------------------------------------------------------------- + +-- This is the main script file loaded by the server, as configured in +-- manaserv.xml. It defines how certain global events should be handled. + +-- At the moment the event handlers are split up over the following files: +require "scripts/global_events" +require "scripts/special_actions" +require "scripts/crafting" -- cgit