~gpcf/misc-patches

[PATCH 1/2] Make the position configurable with settings

Details
Message ID
<OS3P286MB197955269912F744D37EEBACDB29A@OS3P286MB1979.JPNP286.PROD.OUTLOOK.COM>
DKIM signature
missing
Download raw message
Patch: +9 -3
---
 depends.txt      | 2 --
 init.lua         | 3 ++-
 mod.conf         | 5 +++++
 settingtypes.txt | 2 ++
 4 files changed, 9 insertions(+), 3 deletions(-)
 delete mode 100644 depends.txt
 create mode 100644 mod.conf
 create mode 100644 settingtypes.txt

diff --git a/depends.txt b/depends.txt
deleted file mode 100644
index a7f2a5e..0000000
--- a/depends.txt
@@ -1,2 +0,0 @@
beds
xban2
diff --git a/init.lua b/init.lua
index 521f901..94cdfb3 100644
--- a/init.lua
+++ b/init.lua
@@ -4,7 +4,8 @@
--AGPLv3

local spawn_spawnpos = minetest.setting_get_pos("static_spawnpoint")
local banish_pos = {x=-300,y=7,z=-48}
-- {x=-300,y=7,z=-48} on LinuxForks
local banish_pos = minetest.setting_get_pos("banish.banish_pos") or vector.new(0,0,0)
banish = {}
banish.spawn = {}
local modpath = minetest.get_modpath("banish")
diff --git a/mod.conf b/mod.conf
new file mode 100644
index 0000000..0c36594
--- /dev/null
+++ b/mod.conf
@@ -0,0 +1,5 @@
name = banish
description = Banish bad players to another location
depends = beds, xban2
author = gpcf
title = Banish 
diff --git a/settingtypes.txt b/settingtypes.txt
new file mode 100644
index 0000000..b211c56
--- /dev/null
+++ b/settingtypes.txt
@@ -0,0 +1,2 @@
# Place where banished players are sent
banish.banish_pos (Banishment position) v3f (0.0, 0.0, 0.0)
-- 
2.39.2
Reply to thread Export thread (mbox)