Add Toolbox models

This commit is contained in:
k 2020-05-03 16:07:16 +02:00
parent 075d16d8fb
commit 03aee4584f
16 changed files with 35 additions and 0 deletions

View File

@ -3,6 +3,7 @@ dofile(minetest.get_modpath("more_chests").."/models/dropbox.lua")
dofile(minetest.get_modpath("more_chests").."/models/fridge.lua")
dofile(minetest.get_modpath("more_chests").."/models/secret.lua")
dofile(minetest.get_modpath("more_chests").."/models/shared.lua")
dofile(minetest.get_modpath("more_chests").."/models/toolbox.lua")
dofile(minetest.get_modpath("more_chests").."/models/wifi.lua")
dofile(minetest.get_modpath("more_chests").."/utils/aliases.lua")

34
models/toolbox.lua Normal file
View File

@ -0,0 +1,34 @@
local gen_def = dofile(minetest.get_modpath("more_chests") .. "/utils/base.lua")
local S = minetest.get_translator("more_chests")
local function register_toolbox(description, type, side_tile, recipe)
local def = gen_def({
description = description,
type = "toolbox",
size = "big",
-- node_box = {-0.5, -0.5, -0.5, 1.5, 0.5, 0.5}, -- makes it two blocks wide
tiles = {
side = side_tile,
front = "toolbox_" .. type .. "_front.png",
top = "toolbox_" .. type .. "_top.png",
},
recipe = recipe,
})
minetest.register_node("more_chests:toolbox_" .. type, def)
end
local function gen_recipe(craft_item)
return {
{craft_item, craft_item, craft_item},
{craft_item, "group:pickaxe", craft_item},
{craft_item, craft_item, craft_item}
}
end
register_toolbox(S("Wooden Toolbox"), "wood", "default_wood.png", gen_recipe("default:wood"))
register_toolbox(S("Aspen Wood Toolbox"), "aspen", "default_aspen_wood.png", gen_recipe("default:aspen_wood"))
register_toolbox(S("Acacia Wood Toolbox"), "acacia", "default_acacia_wood.png", gen_recipe("default:acacia_wood"))
register_toolbox(S("Junglewood Toolbox"), "jungle", "default_junglewood.png", gen_recipe("default:junglewood"))
register_toolbox(S("Pine Wood Toolbox"), "pine", "default_pine_wood.png", gen_recipe("default:pine_wood"))
register_toolbox(S("Steel Toolbox"), "steel", "default_steel_block.png", gen_recipe("default:steel_ingot"))

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
textures/toolbox_front.xcf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
textures/toolbox_top.xcf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB