more_chests/models/wifi.lua

36 lines
1012 B
Lua
Raw Normal View History

local gen_def = dofile(minetest.get_modpath("more_chests") .. "/utils/base.lua")
local S = minetest.get_translator("more_chests")
local wifi = gen_def({
description = S("Wifi Chest"),
type = "wifi chest",
size = "small",
tiles = {
top = "wifi_top.png",
side = "wifi_side.png",
2021-02-25 16:48:58 +01:00
front = {name="wifi_front_animated.png", animation={type="vertical_frames",
aspect_w=16, aspect_h=16, length=2.0}}
},
recipe = {
{"group:wood", "default:mese", "group:wood"},
{"group:wood", "default:steel_ingot", "group:wood"},
{"group:wood", "group:wood", "group:wood"}
},
allow_metadata_inventory_move = false,
allow_metadata_inventory_put = false,
allow_metadata_inventory_take = false,
})
wifi.can_dig = function(pos, player) return true end
minetest.register_node("more_chests:wifi", wifi)
minetest.register_craft({
output = "more_chests:wifi",
recipe = wifi.recipe,
})
minetest.register_on_joinplayer(function(player)
local inv = player:get_inventory()
inv:set_size("more_chests:wifi", 8*4)
end)