Add Toolbox models
1
init.lua
|
@ -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
|
@ -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"))
|
BIN
textures/toolbox_acacia_front.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
textures/toolbox_acacia_top.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
textures/toolbox_aspen_front.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
textures/toolbox_aspen_top.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
textures/toolbox_front.xcf
Normal file
BIN
textures/toolbox_jungle_front.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
textures/toolbox_jungle_top.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
textures/toolbox_pine_front.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/toolbox_pine_top.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
textures/toolbox_steel_front.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
textures/toolbox_steel_top.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
textures/toolbox_top.xcf
Normal file
BIN
textures/toolbox_wood_front.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/toolbox_wood_top.png
Normal file
After Width: | Height: | Size: 3.0 KiB |