summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-01-15 00:18:56 -0800
committerAuke Kok <auke-jan.h.kok@intel.com>2015-01-15 00:18:56 -0800
commited78d442b39510ed9a67249811914e92a18360cf (patch)
tree522ff5992793390700d49d633b6188a4dc76ad41
parent7efd6eac9fecac1b9f769c250a2599dd18e53f87 (diff)
Allow changing of blocks.
-rw-r--r--init.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 4720d0b..0917861 100644
--- a/init.lua
+++ b/init.lua
@@ -449,12 +449,21 @@ local function sedimentology()
end
local function sedcmd(name, param)
- if param == "stats" then
+ local paramlist = string.split(param, " ")
+ if paramlist[1] == "stats" then
local output = "Sedimentology mod statistics:" ..
"\nconsidered: " .. stat_considered ..
"\ndisplaced: " .. stat_displaced ..
"\ndegraded: " .. stat_degraded
return true, output
+ elseif paramlist[1] == "blocks" then
+ if tonumber(paramlist[2]) then
+ count = tonumber(paramlist[2])
+ return true, "Set blocks to " .. count
+ else
+ return true, "Blocks: " .. count
+ end
+
end
return true, "Command completed succesfully"
end