Build 08
- switched all ownership checks to use player names
This commit is contained in:
parent
c852d74a2c
commit
5ad8d58ea9
15
README.txt
15
README.txt
|
@ -1,8 +1,12 @@
|
|||
Giftbox Mod v2.2
|
||||
Giftbox Mod v2.3
|
||||
By Leslie E. Krause
|
||||
|
||||
Giftbox provides an assortment user-customizable presents for special occasions, such as
|
||||
holidays and birthdays, in addition to craftable packages and presents.
|
||||
|
||||
https://forum.minetest.net/viewtopic.php?f=9&t=19133
|
||||
|
||||
|
||||
Repository
|
||||
----------------------
|
||||
|
||||
|
@ -66,11 +70,14 @@ Version 2.2 (Build 06)
|
|||
Version 2.2 (Build 07)
|
||||
- fixed typo in craft recipe of unsealed package
|
||||
|
||||
Version 2.3 (Build 08)
|
||||
- switched all ownership checks to use player names
|
||||
|
||||
Dependencies
|
||||
----------------------
|
||||
|
||||
Default Mod (required)
|
||||
https://github.com/minetest/minetest_game/default
|
||||
https://github.com/minetest-game-mods/default
|
||||
|
||||
ActiveFormspecs Mod (required)
|
||||
https://bitbucket.org/sorcerykid/formspecs
|
||||
|
@ -86,8 +93,8 @@ Minetest 0.4.15+ required
|
|||
Installation
|
||||
----------------------
|
||||
|
||||
1) Unzip the archive into the mods directory of your game
|
||||
2) Rename the giftbox-master directory to "giftbox"
|
||||
1) Unzip the archive into the mods directory of your game.
|
||||
2) Rename the giftbox-master directory to "giftbox".
|
||||
|
||||
Source Code License
|
||||
----------------------------------------------------------
|
||||
|
|
6
init.lua
6
init.lua
|
@ -1,5 +1,5 @@
|
|||
--------------------------------------------------------
|
||||
-- Minetest :: Giftbox Mod v2.2 (giftbox)
|
||||
-- Minetest :: Giftbox Mod v2.3 (giftbox)
|
||||
--
|
||||
-- See README.txt for licensing and other information.
|
||||
-- Copyright (c) 2016-2018, Leslie E. Krause
|
||||
|
@ -335,7 +335,7 @@ for i, color in ipairs( box_colors ) do
|
|||
"field[1.8,1.9;2.5,0.25;receiver;;" .. meta:get_string( "receiver" ) .. "]"
|
||||
|
||||
-- only placer of gift box should edit properties, not the receiver
|
||||
if default.is_owner( pos, player ) then
|
||||
if default.is_owner( pos, player:get_player_name( ) ) then
|
||||
return formspec
|
||||
end
|
||||
end,
|
||||
|
@ -344,7 +344,7 @@ for i, color in ipairs( box_colors ) do
|
|||
local meta = minetest.get_meta( pos )
|
||||
|
||||
-- only placer of gift box should edit properties, not the receiver
|
||||
if not default.is_owner( pos, player ) then return end
|
||||
if not default.is_owner( pos, owner ) then return end
|
||||
|
||||
if fields.is_anonymous then
|
||||
-- in next version of active formspecs, we should save checkbox state
|
||||
|
|
Loading…
Reference in New Issue