Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F156824
init.lua
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
init.lua
View Options
-- 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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 3, 5:55 AM (2 h, 30 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
bc/24/c2eb6f16eed0d7b0b1096d411e1b
Default Alt Text
init.lua (1 KB)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment