summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-02-19 16:26:18 +0100
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-02-19 16:26:18 +0100
commitcfb6d69e62db38e5104ee245ae08cbf419ca4a96 (patch)
treec7b02cc76cb81a8fb641aaf1250ed2ff64c7d7e2
parent96bcfa321a8ee8a618a739339a4369aa58d589f3 (diff)
downloadplaces-cfb6d69e62db38e5104ee245ae08cbf419ca4a96.tar.gz
places-cfb6d69e62db38e5104ee245ae08cbf419ca4a96.tar.bz2
places-cfb6d69e62db38e5104ee245ae08cbf419ca4a96.zip
Added direct teleport into exec chamber
-rw-r--r--depends.txt2
-rw-r--r--init.lua5
2 files changed, 7 insertions, 0 deletions
diff --git a/depends.txt b/depends.txt
new file mode 100644
index 0000000..cdf2c91
--- /dev/null
+++ b/depends.txt
@@ -0,0 +1,2 @@
+xban2?
+banish?
diff --git a/init.lua b/init.lua
index d47e014..6e0cf27 100644
--- a/init.lua
+++ b/init.lua
@@ -1,4 +1,5 @@
local spawn_spawnpos = minetest.setting_get_pos("static_spawnpoint")
+local execution_pos = {x=-310,y=0,z=-40}
places = {}
@@ -14,6 +15,10 @@ places.register_place = function (name, pos, command)
if not player then
return false, "Player not found"
end
+ if xban and xban.get_property(nm, "jailed") then
+ player:setpos(execution_pos)
+ return true, "Nice try! You can't escape!"
+ end
player:setpos(pos)
return true, "Teleporting to "..name.."..."
end,