Page MenuHome1F616EMO Bugtracker

No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/signs_lib_mod/init.lua b/signs_lib_mod/init.lua
index 7a977e2..150b750 100644
--- a/signs_lib_mod/init.lua
+++ b/signs_lib_mod/init.lua
@@ -1,56 +1,58 @@
-- twi_mods/signs_lib_mod/init.lua
-- Signs Lib Modifications
--[[
Copyright (C) 2018-2024 VannessaE and contributors
Copyright (C) 2024 1F616EMO
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
]]
+signs_lib.glow_item = "default:torch"
+
-- If locked, signs can be modified by both area owner (if protected) and the sign owner
local old_can_modify = signs_lib.can_modify
function signs_lib.can_modify(pos, player)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
if owner ~= "" then
-- That means there is a owner
local playername
if type(player) == "userdata" then
playername = player:get_player_name()
elseif type(player) == "string" then
playername = player
else
playername = ""
end
if playername == owner then
return true
end
if minetest.is_protected(pos, "") then
-- The area is protected, let the owner to edit
if not minetest.is_protected(pos, playername) then
return true
end
end
return false
end
return old_can_modify(pos, player)
end
\ No newline at end of file
diff --git a/signs_lib_mod/mod.conf b/signs_lib_mod/mod.conf
index e7cc568..d527ac8 100644
--- a/signs_lib_mod/mod.conf
+++ b/signs_lib_mod/mod.conf
@@ -1,2 +1,2 @@
name = signs_lib_mod
-depends = signs_lib
\ No newline at end of file
+depends = signs_lib, default

File Metadata

Mime Type
text/x-diff
Expires
Sun, Apr 5, 9:31 AM (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9a/56/b51f2101dbecc9ce69c74d72d0e0
Default Alt Text
(2 KB)

Event Timeline