Merge pull request 'milan2018' (#12) from milan2018 into master

This commit is contained in:
Milan Meduna 2020-05-20 21:32:53 +02:00
commit 22025c2a22
2 changed files with 60 additions and 53 deletions

View File

@ -141,7 +141,7 @@ local function commandblock_action_on(pos, node)
end
local commands = resolve_commands(meta:get_string("commands"), pos)
for _, command in pairs(commands:split("\n")) do
for _, command in pairs(commands:split("\n/")) do
local pos = command:find(" ")
local cmd, param = command, ""
if pos then

View File

@ -50,3 +50,10 @@ function worldedit.luatransform(pos1, pos2, code)
return nil
end
local input = io.open(minetest.get_worldpath().."/init.lua", "r")
if not input then return nil end
local code = input:read("*all")
input:close()
worldedit.lua(code)