- renamed admin giftbox to "present" for distinction
- renamed associated texture files of present
- replaced owner meta for present with sender instead
- added protection check to inventory take of present
- disabled formspec for recipient of empty present
- added sender/receiver checks when digging giftbox
- made default infotext of giftbox configurable
- changed owner of giftbox to placer for simplicity
- set default receiver of giftbox during placement
- switched all prior references of owner to receiver
- added alias for original admin giftbox
This commit is contained in:
Leslie Krause 2017-12-24 12:37:00 -05:00
parent 3275c40896
commit b6a845ba27
7 changed files with 386 additions and 247 deletions

107
README.txt Normal file
View File

@ -0,0 +1,107 @@
==========================================================
Giftbox Mod v2.0 by sorcerykid
https://forum.minetest.net/viewtopic.php?f=9&t=19133
License of source code
----------------------------------------------------------
GNU Lesser General Public License v3 (LGPL-3.0)
Copyright (c) 2016-2017, Leslie E. Krause
Original source code by maikerumine:
https://github.com/maikerumine/just_test_tribute/blob/master/mods/mt_seasons/nodes.lua
This program is free software; you can redistribute it and/or modify it under the terms of
the GNU Lesser 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 Lesser General Public License for more details.
http://www.gnu.org/licenses/lgpl-2.1.html
License of media (textures, sounds, and models)
----------------------------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
/models/giftbox.obj
by Toby109tt
/textures/present_bottom.png
by lag01
modified by maikerumine
modified by sorcerykid
/textures/present_side.png
by lag01
modified by maikerumine
modified by sorcerykid
/textures/present_top.png
by lag01
modified by maikerumine
modified by sorcerykid
/textures/giftbox_red.png
by Toby109tt
modified by sorcerykid
/textures/giftbox_green.png
by Toby109tt
modified by sorcerykid
/textures/giftbox_blue.png
by Toby109tt
modified by sorcerykid
/textures/giftbox_cyan.png
by Toby109tt
modified by sorcerykid
/textures/giftbox_magenta.png
by Toby109tt
modified by sorcerykid
/textures/giftbox_yellow.png
by Toby109tt
modified by sorcerykid
/textures/giftbox_black.png
by Toby109tt
modified by sorcerykid
/textures/giftbox_white.png
by Toby109tt
modified by sorcerykid
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/

View File

@ -35,6 +35,11 @@ giftbox.present_items = {
"default:meselamp 10",
}
giftbox.giftbox_public_infotext1 = "Gift Box"
giftbox.giftbox_public_infotext2 = "'%s'"
giftbox.giftbox_private_infotext1 = "Gift Box for %s"
giftbox.giftbox_private_infotext2 = "Dear %s: '%s'"
giftbox.giftbox_drops = {
-- digging gift box allows for a single drop of items with a given a rarity
{ items = { "default:sword_diamond" }, rarity = 50 },
@ -43,9 +48,6 @@ giftbox.giftbox_drops = {
{ items = { "default:pick_diamond" }, rarity = 50 },
{ items = { "default:pick_bronze" }, rarity = 25 },
{ items = { "default:gold_lump 5" }, rarity = 10 },
{ items = { "default:coal_lump 10" }, rarity = 10 },
-- default drop must be placed last and have rarity of 0 to avoid empty drops
{ items = { "farming:gingerbread_cookie 5", "farming:candycane 10" }, rarity = 0 },
{ items = { "default:gold_lump 5", "default:coal_lump 10" }, rarity = 0 },
}

516
init.lua
View File

@ -1,243 +1,273 @@
--------------------------------------------------------
-- Minetest :: Giftbox Mod v2.0 alpha (giftbox)
--
-- See README.txt for licensing and other information.
-- Copyright (c) 2016-2017, Leslie Ellen Krause
--
-- ./games/just_test_tribute/mods/giftbox/init.lua
--------------------------------------------------------
giftbox = { }
dofile( minetest.get_modpath( "giftbox" ) .. "/config.lua" )
local box_colors = { "black", "blue", "cyan", "green", "magenta", "red", "white", "yellow" }
-- black = black + grey
-- blue = blue + magenta
-- brown => yellow
-- cyan = cyan + yellow
-- dark_green => green
-- dark_grey => cyan
-- green = green + red
-- grey => white
-- magenta = magenta + cyan
-- orange => red
-- pink => magenta
-- red = red + green
-- violet => blue
-- white = white + grey
-- yellow = yellow + green
minetest.register_node( "giftbox:giftbox", {
description = "Gift Box",
tiles = { "giftbox_top.png", "giftbox_bottom.png", "giftbox_side.png",
"giftbox_side.png", "giftbox_side.png", "giftbox_side.png" },
is_ground_content = false,
groups = { choppy = 2, oddly_breakable_by_hand = 2 },
sounds = default.node_sound_wood_defaults( ),
after_place_node = function( pos, player )
local owner = player:get_player_name( ) or "singleplayer"
local meta = minetest.get_meta( pos )
-- meta:set_string( "owner", owner )
meta:set_string( "infotext", giftbox.present_infotext .. " (placed by " .. owner .. ")" )
end,
on_construct = function ( pos )
local meta = minetest.get_meta( pos )
meta:get_inventory( ):set_size( "main", 1 )
meta:set_string( "oldtime", os.time( ) )
meta:set_string( "newtime", os.time( ) )
end,
can_dig = function ( pos, player )
return not minetest.is_protected( pos, player:get_player_name( ) ) and default.is_empty( pos )
end,
allow_metadata_inventory_take = function( pos, listname, index, stack, player )
if not default.is_owner( pos, player ) then
return 0
end
return stack:get_count( )
end,
allow_metadata_inventory_put = function( pos, listname, index, stack, player )
return 0
end,
on_metadata_inventory_take = function( pos, listname, index, stack, player )
if default.is_empty( pos ) then
minetest.remove_node( pos )
end
minetest.log( "action", string.format( default.STATUS_CONTAINER_GET, player:get_player_name( ), "giftbox", minetest.pos_to_string( pos ) ) )
end,
on_open = function( pos, clicker )
local pname = clicker:get_player_name( )
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
if minetest.check_player_privs( pname, { give = true } ) then
local slot, name
local formspec =
"size[8,6]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"label[1,0.8;Select an item to place in the gift box.]" ..
"list[nodemeta:%s;main;6,0.5;1,1;]"
slot = 0
for _, name in ipairs( giftbox.present_items ) do
formspec = formspec .. "item_image_button[ " .. ( slot % 8 ) .. "," .. ( math.floor ( slot / 8 ) + 2 ) .. ";1,1;" .. name .. ";add " .. name .. ";]"
slot = slot + 1
end
return string.format( formspec, spos )
elseif not minetest.is_protected( pos, pname ) then
local formspec =
"size[10,6.5]" ..
"image[0,0;12,6;" .. giftbox.present_greeting .. "]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"list[nodemeta:%s;main;7,4;1,1;]" ..
"list[current_player;main;1,5.5;8,1;]" ..
default.get_hotbar_bg(1,5.5)
return string.format( formspec, spos )
end
end,
on_close = function( pos, player, fields )
local fname, item
fname = next( fields, nil ) -- use next since we only care about the name of a single button
if minetest.check_player_privs( player:get_player_name( ), { give = true } ) and fname then
item = string.match( fname, "add (.+)" )
if item then
minetest.get_meta( pos ):get_inventory( ):set_stack( "main", 1, item )
minetest.log( "action", string.format( default.STATUS_CONTAINER_PUT, player:get_player_name( ), "present", minetest.pos_to_string( pos ) ) )
end
end
end,
})
for i, color in ipairs( box_colors ) do
minetest.register_node( "giftbox:giftbox_" .. color, {
description = ( color:gsub( "^%l", string.upper ) ) .. " Gift Box",
drawtype = "mesh",
mesh = "giftbox.obj",
tiles = { "giftbox_" .. color .. ".png" },
paramtype = "light",
visual_scale = 0.45,
wield_scale = { x = 1, y = 1, z = 1 }, -- apparently no way to set wield scale of mesh?
sunlight_propagates = true,
is_ground_content = false,
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 1 },
sounds = default.node_sound_dirt_defaults(),
paramtype2 = "facedir",
selection_box = {
type = "fixed",
fixed = {
{ -0.45, -0.5, -0.45, 0.45, 0.45, 0.45 },
}
},
drop = { max_items = 1, items = giftbox.giftbox_drops },
after_place_node = function( pos, player )
-- initial item string: Gift Box (placed by sorcerykid)
local placer = player:get_player_name( ) or "singleplayer"
local meta = minetest.get_meta( pos )
meta:set_string( "owner", default.OWNER_NOBODY )
meta:set_string( "placer", placer )
meta:set_string( "is_anonymous", "false" )
meta:set_string( "infotext", "Public Gift Box (from " .. placer .. ")" )
end,
on_open = function( pos, player, fields )
local meta = minetest.get_meta( pos )
local formspec =
"size[8,3]" ..
default.gui_bg ..
default.gui_bg_img ..
"button_exit[6,2.5;2,0.3;save;Save]" ..
"checkbox[6,1.6;is_anonymous;Anonymous Sender;" .. meta:get_string( "is_anonymous" ) .. "]" ..
"label[0.1,0;Personalize your holiday greeting (or leave blank for the default):]" ..
"field[0.4,1;7.5,0.25;message;;" .. meta:get_string( "message" ) .. "]" ..
"label[0.1,1.5;Recipient:]" ..
"field[1.8,1.9;3.5,0.25;owner;;" .. meta:get_string( "owner" ) .. "]"
-- only placer of gift box should edit properties, not the receiver
if meta:get_string( "placer" ) ~= placer then
return formspec
end
end,
on_close = function( pos, player, fields )
local placer = player:get_player_name( )
local meta = minetest.get_meta( pos )
-- only placer of gift box should edit properties, not the receiver
if meta:get_string( "placer" ) ~= placer then return end
if fields.is_anonymous then
-- in next version of active formspecs, we should save checkbox state
-- in form meta first rather than directly to node meta
meta:set_string( "is_anonymous", fields.is_anonymous )
elseif fields.save and fields.message and fields.owner then
local infotext
if string.len( fields.message ) > 50 then
minetest.chat_send_player( placer, "The specified message is too long." )
return
elseif fields.owner == placer then
minetest.chat_send_player( placer, "You cannot send a gift to yourself." )
return
elseif not "" and not string.find( fields.owner, "^[_A-Za-z0-9]+$" ) then
minetest.chat_send_player( placer, "The specified recipient is invalid." )
return
end
-- item string with message: Dear sorcerykid: "Happy holidays!" (placed by sorcerykid)
-- item string without message: Gift Box for maikerumine (placed by sorcerykid)
if fields.owner == default.OWNER_NOBODY then
-- public gift box
infotext = fields.message == "" and "Gift Box" or "\"" .. fields.message .. "\""
else
-- private gift box
infotext = fields.message == "" and "Gift Box for " .. fields.owner or "Dear " .. fields.owner .. ": \"" .. fields.message .. "\""
end
if meta:get_string( "is_anonymous" ) == "false" then
infotext = infotext .. " (from " .. placer .. ")"
end
minetest.log( "action", string.format( default.STATUS_SIGNATURE_SET, player:get_player_name( ), fields.message, "giftbox", minetest.pos_to_string( pos ) ) )
meta:set_string( "owner", fields.owner )
meta:set_string( "message", fields.message )
meta:set_string( "infotext", infotext )
end
end,
} )
minetest.register_craft( {
output = "giftbox:giftbox_" .. color,
recipe = {
{ "wool:" .. color, "farming:cotton", "wool:" .. color },
{ "default:paper", "default:mese_crystal", "default:paper" },
{ "wool:" .. color, "default:paper", "wool:" .. color },
}
} )
end
minetest.register_alias( "mt_seasons:gift_box_brown", "giftbox:giftbox_yellow" )
minetest.register_alias( "mt_seasons:gift_box_dark_green", "giftbox:giftbox_green" )
minetest.register_alias( "mt_seasons:gift_box_dark_grey", "giftbox:giftbox_cyan" )
minetest.register_alias( "mt_seasons:gift_box_grey", "giftbox:giftbox_white" )
minetest.register_alias( "mt_seasons:gift_box_orange", "giftbox:giftbox_red" )
minetest.register_alias( "mt_seasons:gift_box_pink", "giftbox:giftbox_magenta" )
minetest.register_alias( "mt_seasons:gift_box_violet", "giftbox:giftbox_blue" )
minetest.register_alias( "mt_seasons:gift_box_red", "giftbox:giftbox_red" )
minetest.register_alias( "mt_seasons:gift_box_green", "giftbox:giftbox_green" )
minetest.register_alias( "mt_seasons:gift_box_blue", "giftbox:giftbox_blue" )
minetest.register_alias( "mt_seasons:gift_box_cyan", "giftbox:giftbox_cyan" )
minetest.register_alias( "mt_seasons:gift_box_magenta", "giftbox:giftbox_magenta" )
minetest.register_alias( "mt_seasons:gift_box_yellow", "giftbox:giftbox_yellow" )
minetest.register_alias( "mt_seasons:gift_box_white", "giftbox:giftbox_white" )
minetest.register_alias( "mt_seasons:gift_box_black", "giftbox:giftbox_black" )
--------------------------------------------------------
-- Minetest :: Giftbox Mod v2.0 (giftbox)
--
-- See README.txt for licensing and other information.
-- Copyright (c) 2016-2017, Leslie Ellen Krause
--
-- ./games/just_test_tribute/mods/giftbox/init.lua
--------------------------------------------------------
giftbox = { }
dofile( minetest.get_modpath( "giftbox" ) .. "/config.lua" )
local box_colors = { "black", "blue", "cyan", "green", "magenta", "red", "white", "yellow" }
-- black = black + grey
-- blue = blue + magenta
-- brown => yellow
-- cyan = cyan + yellow
-- dark_green => green
-- dark_grey => cyan
-- green = green + red
-- grey => white
-- magenta = magenta + cyan
-- orange => red
-- pink => magenta
-- red = red + green
-- violet => blue
-- white = white + grey
-- yellow = yellow + green
minetest.register_node( "giftbox:present", {
description = "Gift Box",
tiles = { "present_top.png", "present_bottom.png", "present_side.png",
"present_side.png", "present_side.png", "present_side.png" },
is_ground_content = false,
groups = { choppy = 2, oddly_breakable_by_hand = 2 },
sounds = default.node_sound_wood_defaults( ),
drop = { },
after_place_node = function( pos, player )
minetest.get_meta( pos ):set_string( "infotext", giftbox.present_infotext .. " (placed by " .. player:get_player_name( ) .. ")" )
end,
on_construct = function ( pos )
local meta = minetest.get_meta( pos )
meta:get_inventory( ):set_size( "main", 1 )
meta:set_string( "oldtime", os.time( ) )
meta:set_string( "newtime", os.time( ) )
end,
can_dig = function ( pos, player )
return not minetest.is_protected( pos, player:get_player_name( ) ) and default.is_empty( pos )
end,
allow_metadata_inventory_take = function( pos, listname, index, stack, player )
-- only allow receiver to take item and remove node
-- of course, placer can already bypass protection
if minetest.is_protected( pos, player:get_player_name( ) ) then
return 0
end
return stack:get_count( )
end,
allow_metadata_inventory_put = function( pos, listname, index, stack, player )
return 0
end,
on_metadata_inventory_take = function( pos, listname, index, stack, player )
if default.is_empty( pos ) then
minetest.remove_node( pos )
end
minetest.log( "action", string.format( default.STATUS_CONTAINER_GET, player:get_player_name( ), "giftbox", minetest.pos_to_string( pos ) ) )
end,
on_open = function( pos, clicker )
local pname = clicker:get_player_name( )
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
if minetest.check_player_privs( pname, { give = true } ) then
local slot, name
local formspec =
"size[8,6]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"label[1,0.8;Select an item to place in the gift box.]" ..
"list[nodemeta:%s;main;6,0.5;1,1;]"
slot = 0
for _, name in ipairs( giftbox.present_items ) do
formspec = formspec .. "item_image_button[ " .. ( slot % 8 ) .. "," .. ( math.floor ( slot / 8 ) + 2 ) .. ";1,1;" .. name .. ";add " .. name .. ";]"
slot = slot + 1
end
return string.format( formspec, spos )
elseif not minetest.is_protected( pos, pname ) and not default.is_empty( pos ) then
-- only show formspec if placer remembered to select item
-- otherwise, allow node be dug normally (but no drops)
local formspec =
"size[10,6.5]" ..
"image[0,0;12,6;" .. giftbox.present_greeting .. "]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"list[nodemeta:%s;main;7,4;1,1;]" ..
"list[current_player;main;1,5.5;8,1;]" ..
default.get_hotbar_bg(1,5.5)
return string.format( formspec, spos )
end
end,
on_close = function( pos, player, fields )
local fname, item
fname = next( fields, nil ) -- use next since we only care about the name of a single button
if minetest.check_player_privs( player:get_player_name( ), { give = true } ) and fname then
item = string.match( fname, "add (.+)" )
if item then
minetest.get_meta( pos ):get_inventory( ):set_stack( "main", 1, item )
minetest.log( "action", string.format( default.STATUS_CONTAINER_PUT, player:get_player_name( ), "present", minetest.pos_to_string( pos ) ) )
end
end
end,
})
for i, color in ipairs( box_colors ) do
minetest.register_node( "giftbox:giftbox_" .. color, {
description = ( color:gsub( "^%l", string.upper ) ) .. " Gift Box",
drawtype = "mesh",
mesh = "giftbox.obj",
tiles = { "giftbox_" .. color .. ".png" },
paramtype = "light",
visual_scale = 0.45,
wield_scale = { x = 1, y = 1, z = 1 }, -- apparently no way to set wield scale of mesh?
sunlight_propagates = true,
is_ground_content = false,
groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 1 },
sounds = default.node_sound_dirt_defaults(),
paramtype2 = "facedir",
selection_box = {
type = "fixed",
fixed = {
{ -0.45, -0.5, -0.45, 0.45, 0.45, 0.45 },
}
},
drop = { max_items = 1, items = giftbox.giftbox_drops },
on_dig = function( pos, node, player )
local digger = player:get_player_name( )
local receiver = minetest.get_meta( pos ):get_string( "receiver" )
if default.is_owner( pos, player ) then
-- always allow owner to dig node, but still obey protection
minetest.handle_node_drops( pos, { node.name }, player )
minetest.remove_node( pos )
elseif receiver == digger or receiver == default.OWNER_NOBODY then
-- otherwise drop random items directly for receiver (if any)
-- this is necessary to bypass protection checks
local drops = minetest.get_node_drops( node.name, player:get_wielded_item( ):get_name( ) )
minetest.handle_node_drops( pos, drops, player )
minetest.remove_node( pos )
end
end,
after_place_node = function( pos, player )
local placer = player:get_player_name( ) or "singleplayer"
local meta = minetest.get_meta( pos )
default.set_owner( pos, placer )
meta:set_string( "receiver", "" )
meta:set_string( "is_anonymous", "false" )
-- initial item string: Gift Box (placed by sorcerykid)
meta:set_string( "infotext", giftbox.giftbox_public_infotext1 .. " (from " .. placer .. ")" )
end,
on_open = function( pos, player, fields )
local meta = minetest.get_meta( pos )
local formspec =
"size[8,3]" ..
default.gui_bg ..
default.gui_bg_img ..
"button_exit[6,2.5;2,0.3;save;Save]" ..
"checkbox[4.5,1.3;is_anonymous;Anonymous Gift;" .. meta:get_string( "is_anonymous" ) .. "]" ..
"label[0.1,0;Personalize your holiday greeting (or leave blank for the default):]" ..
"field[0.4,1;7.8,0.25;message;;" .. meta:get_string( "message" ) .. "]" ..
"label[0.1,1.5;Recipient:]" ..
"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
return formspec
end
end,
on_close = function( pos, player, fields )
local owner = player:get_player_name( )
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 fields.is_anonymous then
-- in next version of active formspecs, we should save checkbox state
-- in form meta first rather than directly to node meta
meta:set_string( "is_anonymous", fields.is_anonymous )
elseif fields.save and fields.message and fields.receiver then
local infotext
if string.len( fields.message ) > 50 then
minetest.chat_send_player( owner, "The specified message is too long." )
return
elseif fields.receiver == owner then
minetest.chat_send_player( owner, "You cannot give a gift to yourself." )
return
elseif fields.receiver ~= "" and not string.find( fields.receiver, "^[_A-Za-z0-9]+$" ) then
minetest.chat_send_player( owner, "The specified recipient is invalid." )
return
end
-- item string with message: Dear sorcerykid: "Happy holidays!" (placed by sorcerykid)
-- item string without message: Gift Box for maikerumine (placed by sorcerykid)
if fields.receiver == default.OWNER_NOBODY then
-- public gift box
infotext = fields.message == "" and
giftbox.giftbox_public_infotext1 or
string.format( giftbox.giftbox_public_infotext2, fields.message )
else
-- private gift box
infotext = fields.message == "" and
string.format( giftbox.giftbox_private_infotext1, fields.receiver ) or
string.format( giftbox.giftbox_private_infotext2, fields.receiver, fields.message )
end
if meta:get_string( "is_anonymous" ) == "false" then
infotext = infotext .. " (from " .. owner .. ")"
end
minetest.log( "action", string.format( default.STATUS_SIGNATURE_SET, player:get_player_name( ), fields.message, "giftbox", minetest.pos_to_string( pos ) ) )
meta:set_string( "receiver", fields.receiver )
meta:set_string( "message", fields.message )
meta:set_string( "infotext", infotext )
end
end,
} )
minetest.register_craft( {
output = "giftbox:giftbox_" .. color,
recipe = {
{ "wool:" .. color, "farming:cotton", "wool:" .. color },
{ "default:paper", "default:mese_crystal", "default:paper" },
{ "wool:" .. color, "default:paper", "wool:" .. color },
}
} )
end
minetest.register_alias( "mt_seasons:gift_box_brown", "giftbox:giftbox_yellow" )
minetest.register_alias( "mt_seasons:gift_box_dark_green", "giftbox:giftbox_green" )
minetest.register_alias( "mt_seasons:gift_box_dark_grey", "giftbox:giftbox_cyan" )
minetest.register_alias( "mt_seasons:gift_box_grey", "giftbox:giftbox_white" )
minetest.register_alias( "mt_seasons:gift_box_orange", "giftbox:giftbox_red" )
minetest.register_alias( "mt_seasons:gift_box_pink", "giftbox:giftbox_magenta" )
minetest.register_alias( "mt_seasons:gift_box_violet", "giftbox:giftbox_blue" )
minetest.register_alias( "mt_seasons:gift_box_red", "giftbox:giftbox_red" )
minetest.register_alias( "mt_seasons:gift_box_green", "giftbox:giftbox_green" )
minetest.register_alias( "mt_seasons:gift_box_blue", "giftbox:giftbox_blue" )
minetest.register_alias( "mt_seasons:gift_box_cyan", "giftbox:giftbox_cyan" )
minetest.register_alias( "mt_seasons:gift_box_magenta", "giftbox:giftbox_magenta" )
minetest.register_alias( "mt_seasons:gift_box_yellow", "giftbox:giftbox_yellow" )
minetest.register_alias( "mt_seasons:gift_box_white", "giftbox:giftbox_white" )
minetest.register_alias( "mt_seasons:gift_box_black", "giftbox:giftbox_black" )
minetest.register_alias( "giftbox:giftbox", "giftbox:present" )

View File

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 97 B

After

Width:  |  Height:  |  Size: 97 B

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B