summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-07-19 13:57:04 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-07-19 16:26:14 +0200
commitb82b6fab9a4ba2ca372bec716fecc99bcc173cd4 (patch)
treefc4b5e3ac93ca004eb4d958a5ccad9f840790b56 /scripts
parentf1be42335770c4e59ad83fc69e7244c5bfb3b188 (diff)
downloadmanaserv-b82b6fab9a4ba2ca372bec716fecc99bcc173cd4.tar.gz
manaserv-b82b6fab9a4ba2ca372bec716fecc99bcc173cd4.tar.bz2
manaserv-b82b6fab9a4ba2ca372bec716fecc99bcc173cd4.tar.xz
manaserv-b82b6fab9a4ba2ca372bec716fecc99bcc173cd4.zip
Adapted the inline documentation for markdown docs
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lua/libmana.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/lua/libmana.lua b/scripts/lua/libmana.lua
index 7393ce60..5e7ca46f 100644
--- a/scripts/lua/libmana.lua
+++ b/scripts/lua/libmana.lua
@@ -25,12 +25,12 @@ require "scripts/lua/libmana-constants"
-- survive a server reboot.
--
-- **Example:**
--- <code lua>
+-- {% highlight lua %}
-- local value = map["a key"]
-- if value == "some value" then
-- map["a key"] = "other value"
-- end
--- </code>
+-- {% endhighlight %}
map = setmetatable({}, {
__index = function(_, key)
return getvar_map(key)
@@ -52,12 +52,12 @@ map = setmetatable({}, {
-- of a variable between you requesting to old value and setting a new value.
--
-- **Example:**
--- <code lua>
+-- {% highlight lua %}
-- local value = world["a key"]
-- if value == "some value" then
-- world["a key"] = "other value"
-- end
--- </code>
+-- {% endhighlight %}
world = setmetatable({}, {
__index = function(_, key)
return getvar_world(key)
@@ -267,9 +267,11 @@ end
-- and value of the changed variable.
--
-- **Example:**
--- <code lua>on_mapvar_changed(key, function(key, value)
+-- {% highlight lua %}
+-- on_mapvar_changed(key, function(key, value)
-- log(LOG_DEBUG, "mapvar " .. key .. " has new value " .. value)
--- end)</code>
+-- end)
+-- {% endhighlight %}
function on_mapvar_changed(key, funct)
if not onmapvar_functs[key] then
onmapvar_functs[key] = {}
@@ -285,9 +287,11 @@ end
-- and value of the changed variable.
--
-- **Example:**
--- <code lua>on_worldvar_changed(key, function(key, value)
+-- {% highlight lua %}
+-- on_worldvar_changed(key, function(key, value)
-- log(LOG_DEBUG, "worldvar " .. key .. " has new value " .. value)
--- end)</code>
+-- end)
+-- {% endhighlight %}
function on_worldvar_changed(key, funct)
if not onworldvar_functs[key] then
onworldvar_functs[key] = {}