diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..4de6466 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,19 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", + "mobkit" +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/api/api.lua b/api/api.lua index e3caa73..2f13a4d 100644 --- a/api/api.lua +++ b/api/api.lua @@ -2,5 +2,10 @@ local modpath, modname, S = ... local creative_mode = minetest.settings:get_bool("creative_mode") -assert(loadfile(modpath .. "/api/api_on_die.lua"))(S) +function sama:get_pointed_thing() + +end + +assert(loadfile(modpath .. "/api/api_on_die.lua"))(S) +assert(loadfile(modpath .. "/api/api_container.lua"))(S) diff --git a/api/api_container.lua b/api/api_container.lua new file mode 100644 index 0000000..462b02b --- /dev/null +++ b/api/api_container.lua @@ -0,0 +1,159 @@ +local modpath, S = ... + +sama.container = {} +sama.container.open_containers = {} + +function sama.container.get_container_formspec(pos) + local spos = pos.x .. "," .. pos.y .. "," .. pos.z + local formspec = + "size[8,7]" .. + "list[nodemeta:" .. spos .. ";main;2,1.3;4,1;]" .. + "list[current_player;main;0,2.85;8,1;]" .. + "list[current_player;main;0,4.08;8,3;8]" .. + "listring[nodemeta:" .. spos .. ";main]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,2.85) + return formspec +end + +function sama.container.container_lid_close(pn) + local container_open_info = sama.container.open_containers[pn] + local pos = container_open_info.pos + local sound = container_open_info.sound + local swap = container_open_info.swap + + sama.container.open_containers[pn] = nil + for k, v in pairs(sama.container.open_containers) do + if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then + return true + end + end + + local node = minetest.get_node(pos) + minetest.after(0.2, minetest.swap_node, pos, { name = "sama:" .. swap, + param2 = node.param2 }) + minetest.sound_play(sound, {gain = 0.3, pos = pos, max_hear_distance = 10}) +end + +minetest.register_on_leaveplayer(function(player) + local pn = player:get_player_name() + if sama.container.open_containers[pn] then + sama.container.container_lid_close(pn) + end +end) + +function sama.container.container_lid_obstructed(pos, direction) + if direction == "above" then + pos = {x = pos.x, y = pos.y + 1, z = pos.z} + end + local def = minetest.registered_nodes[minetest.get_node(pos).name] + -- allow ladders, signs, wallmounted things and torches to not obstruct + if def and + (def.drawtype == "airlike" or + def.drawtype == "signlike" or + def.drawtype == "torchlike" or + (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then + return false + end + return true +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "sama:container" then + return + end + if not player or not fields.quit then + return + end + local pn = player:get_player_name() + + if not sama.container.open_containers[pn] then + return + end + + sama.container.container_lid_close(pn) + return true +end) + +function sama.register_container(name, d) + local def = table.copy(d) + def.drawtype = 'mesh' + def.paramtype = "light" + def.paramtype2 = "facedir" + def.legacy_facedir_simple = true + def.is_ground_content = false + + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", d.description) + local inv = meta:get_inventory() + inv:set_size("main", 4*1) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end + def.on_rightclick = function(pos, node, clicker) + minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos, + max_hear_distance = 10}) + if not sama.container.container_lid_obstructed(pos, "above") then + minetest.swap_node(pos, { + name = "sama:" .. name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "sama:container", sama.container.get_container_formspec(pos)) + sama.container.open_containers[clicker:get_player_name()] = { pos = pos, sound = def.sound_close, swap = name } + end + def.on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "main", drops) + drops[#drops+1] = "sama:" .. name + minetest.remove_node(pos) + return drops + end + + def.on_metadata_inventory_move = function(pos, from_list, from_index, + to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in container at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves " .. stack:get_name() .. + " to container at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes " .. stack:get_name() .. + " from container at " .. minetest.pos_to_string(pos)) + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_opened.nodebox = d.node_box_opened + for i = 1, #def_opened.tiles do + if type(def_opened.tiles[i]) == "string" then + def_opened.tiles[i] = {name = def_opened.tiles[i], backface_culling = true} + elseif def_opened.tiles[i].backface_culling == nil then + def_opened.tiles[i].backface_culling = true + end + end + def_opened.drop = "sama:" .. name + def_opened.groups.not_in_creative_inventory = 1 + def_opened.selection_box = { + type = "fixed", + fixed = { -1/2, -1/2, -1/2, 1/2, 3/16, 1/2 }, + } + def_opened.can_dig = function() + return false + end + def_opened.on_blast = function() end + + minetest.register_node("sama:" .. name, def_closed) + minetest.register_node("sama:" .. name .. "_open", def_opened) + +end diff --git a/armor.lua b/armor.lua new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/armor.lua @@ -0,0 +1 @@ + diff --git a/container.lua b/container.lua new file mode 100644 index 0000000..51bec96 --- /dev/null +++ b/container.lua @@ -0,0 +1,173 @@ +local modpath, S = ... + +sama.container = {} +sama.container.open_containers = {} + +function sama.container.get_container_formspec(pos) + local spos = pos.x .. "," .. pos.y .. "," .. pos.z + local meta = minetest.get_meta(pos) + local christmas_msg = meta:get_string("christmas_msg") + if not(christmas_msg) or christmas_msg == "" then + christmas_msg = S("Merry Christmas") + end + local formspec = + "size[8,7]" .. + "image[0,0;1,1;sama_christmas_container_inv.png]".. + "label[1,0;"..christmas_msg.."]".. + "list[nodemeta:" .. spos .. ";main;2,1.3;4,1;]" .. + "list[current_player;main;0,2.85;8,1;]" .. + "list[current_player;main;0,4.08;8,3;8]" .. + "listring[nodemeta:" .. spos .. ";main]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,2.85) + return formspec +end + +function sama.container.container_lid_close(pn) + local container_open_info = sama.container.open_containers[pn] + local pos = container_open_info.pos + local sound = container_open_info.sound + local swap = container_open_info.swap + + sama.container.open_containers[pn] = nil + for k, v in pairs(sama.container.open_containers) do + if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then + return true + end + end + + local node = minetest.get_node(pos) + minetest.after(0.2, minetest.swap_node, pos, { name = "sama:" .. swap, + param2 = node.param2 }) + minetest.sound_play(sound, {gain = 0.3, pos = pos, max_hear_distance = 10}) +end + +minetest.register_on_leaveplayer(function(player) + local pn = player:get_player_name() + if sama.container.open_containers[pn] then + sama.container.container_lid_close(pn) + end +end) + +function sama.container.container_lid_obstructed(pos, direction) + if direction = "above" then + pos = {x = pos.x, y = pos.y + 1, z = pos.z} + end + local def = minetest.registered_nodes[minetest.get_node(pos).name] + -- allow ladders, signs, wallmounted things and torches to not obstruct + if def and + (def.drawtype == "airlike" or + def.drawtype == "signlike" or + def.drawtype == "torchlike" or + (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then + return false + end + return true +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "sama:container" then + return + end + if not player or not fields.quit then + return + end + local pn = player:get_player_name() + + if not sama.container.open_containers[pn] then + return + end + + sama.container.container_lid_close(pn) + return true +end) + +function sama.register_container(name, d) + local def = table.copy(d) + def.drawtype = "mesh" + def.visual = "mesh" + def.paramtype = "light" + def.paramtype2 = "facedir" + def.legacy_facedir_simple = true + def.is_ground_content = false + + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", d.description) + local inv = meta:get_inventory() + inv:set_size("main", 4*1) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end + def.on_rightclick = function(pos, node, clicker) + minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos, + max_hear_distance = 10}) + if not sama.container.container_lid_obstructed(pos, "above") then + minetest.swap_node(pos, { + name = "sama:" .. name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "sama:container", sama.container.get_container_formspec(pos)) + sama.container.open_containers[clicker:get_player_name()] = { pos = pos, sound = def.sound_close, swap = name } + end + def.on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "main", drops) + drops[#drops+1] = "sama:" .. name + minetest.remove_node(pos) + return drops + end + + def.on_metadata_inventory_move = function(pos, from_list, from_index, + to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in container at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves " .. stack:get_name() .. + " to container at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes " .. stack:get_name() .. + " from container at " .. minetest.pos_to_string(pos)) + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_opened.mesh = "container_open.obj" + for i = 1, #def_opened.tiles do + if type(def_opened.tiles[i]) == "string" then + def_opened.tiles[i] = {name = def_opened.tiles[i], backface_culling = true} + elseif def_opened.tiles[i].backface_culling == nil then + def_opened.tiles[i].backface_culling = true + end + end + def_opened.drop = "sama:" .. name + def_opened.groups.not_in_creative_inventory = 1 + def_opened.selection_box = { + type = "fixed", + fixed = { -1/2, -1/2, -1/2, 1/2, 3/16, 1/2 }, + } + def_opened.can_dig = function() + return false + end + def_opened.on_blast = function() end + + def_closed.mesh = nil + def_closed.drawtype = nil + def_closed.tiles[6] = def.tiles[5] -- swap textures around for "normal" + def_closed.tiles[5] = def.tiles[3] -- drawtype to make them match the mesh + def_closed.tiles[3] = def.tiles[3].."^[transformFX" + + minetest.register_node("sama:" .. name, def_closed) + minetest.register_node("sama:" .. name .. "_open", def_opened) + +end diff --git a/formspec.lua b/formspec.lua new file mode 100644 index 0000000..d028a64 --- /dev/null +++ b/formspec.lua @@ -0,0 +1,7 @@ +local formspec = { + "formspec_version[3]", + "real_coordinates[true]", + "position[1,1]", + "size[1,1]", + "image_button[0,0;1,1;sama_lips.png;btn_lips;;true;false;" + } diff --git a/furniture.lua b/furniture.lua new file mode 100644 index 0000000..fd9dfc0 --- /dev/null +++ b/furniture.lua @@ -0,0 +1,26 @@ +sama.register_container("wardrove", { + description = S("Wardrove"), + tiles = { + "sama_christmas_container_top.png", + "sama_christmas_container_top.png", + "sama_christmas_container_side.png", + "sama_christmas_container_side.png", + "sama_christmas_container_front.png", + "sama_christmas_container_inside.png" + }, + stack_max = 1, + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, +}) + +minetest.register_craft({ + type = "shaped", + output = "sama:christmas_present", + recipe = { + {"default:paper", "default:paper", "default:paper"}, + {"dye:red", "default:container", "dye:yellow"}, + {"default:paper", "default:paper", "default:paper"}, + } +}) diff --git a/hud.lua b/hud.lua new file mode 100644 index 0000000..ccbc1ee --- /dev/null +++ b/hud.lua @@ -0,0 +1,10 @@ +minetest.register_on_joinplayer(function(player) + local menu = player:hud_add({ + hud_elem_type = "image", + position = {x = 0, y = 1}, + text = "sama_hud_main.png", + scale = { x = 3, y = 3}, + alignment = { x = 1, y = -1}, + offset = {x = 0, y = -5}, + }) +end) diff --git a/init.lua b/init.lua index c148cd7..6c78cce 100644 --- a/init.lua +++ b/init.lua @@ -5,8 +5,6 @@ local modname = "sama" local modpath = minetest.get_modpath(modname) -local mg_name = minetest.get_mapgen_setting("mg_name") - -- internationalization boilerplate local S = minetest.get_translator(minetest.get_current_modname()) @@ -17,7 +15,11 @@ local S = minetest.get_translator(minetest.get_current_modname()) sama = {} -- Load the files -assert(loadfile(modpath .. "/samantha.lua")) -assert(loadfile(modpath .. "/behaviour.lua")) -assert(loadfile(modpath .. "/brain.lua")) -assert(loadfile(modpath .. "/api/api.lua"))(modpath, modname, S ) +assert(loadfile(modpath .. "/api/api.lua"))(modpath, modname, S) +assert(loadfile(modpath .. "/samantha.lua"))() +assert(loadfile(modpath .. "/behaviour.lua"))() +assert(loadfile(modpath .. "/brain.lua"))() +assert(loadfile(modpath .. "/hud.lua"))() +assert(loadfile(modpath .. "/formspec.lua"))() +assert(loadfile(modpath .. "/on_rightclick.lua"))() +--assert(loadfile(modpath .. "/wardrove.lua"))(S) diff --git a/mod.conf b/mod.conf index 5bc29a5..7de5290 100644 --- a/mod.conf +++ b/mod.conf @@ -1,5 +1,5 @@ name = sama description = A Female Character for Minetest -depends = mobkit +depends = mobkit, default optional_depends = version = diff --git a/models/female.b3d b/models/female.b3d new file mode 100644 index 0000000..a07e633 Binary files /dev/null and b/models/female.b3d differ diff --git a/models/samantha_character.blend b/models/female.blend similarity index 55% rename from models/samantha_character.blend rename to models/female.blend index 63573d3..9d6094e 100644 Binary files a/models/samantha_character.blend and b/models/female.blend differ diff --git a/models/samantha_character.blend1 b/models/female.blend1 similarity index 50% rename from models/samantha_character.blend1 rename to models/female.blend1 index eacdc49..c2e0645 100644 Binary files a/models/samantha_character.blend1 and b/models/female.blend1 differ diff --git a/models/female.png b/models/female.png new file mode 100644 index 0000000..aecb821 Binary files /dev/null and b/models/female.png differ diff --git a/models/samantha.png b/models/samantha.png deleted file mode 100644 index 325cf36..0000000 Binary files a/models/samantha.png and /dev/null differ diff --git a/models/samantha.xcf b/models/samantha.xcf new file mode 100644 index 0000000..5ed98ed Binary files /dev/null and b/models/samantha.xcf differ diff --git a/models/wardrove.mtl b/models/wardrove.mtl new file mode 100644 index 0000000..619b612 --- /dev/null +++ b/models/wardrove.mtl @@ -0,0 +1,13 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl none +Ns 94.117647 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd /opt/minetest/games/juanchi/mods/sama/textures/sama_wardrove.png diff --git a/models/wardrove.obj b/models/wardrove.obj new file mode 100644 index 0000000..9f3d46c --- /dev/null +++ b/models/wardrove.obj @@ -0,0 +1,47 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +mtllib wardrove.mtl +o wardrove_nodebox1 +v 0.500000 -0.500000 0.062500 +v 0.500000 -0.500000 0.500000 +v 0.500000 1.000000 0.500000 +v 0.500000 1.000000 0.062500 +v -0.500000 -0.500000 0.062500 +v -0.500000 -0.500000 0.500000 +v -0.500000 1.000000 0.500000 +v -0.500000 1.000000 0.062500 +vt 0.625000 1.000000 +vt 0.500000 1.000000 +vt 0.500000 0.250000 +vt 0.625000 0.250000 +vt 0.640625 1.000000 +vt 0.500000 1.000000 +vt 0.500000 0.250000 +vt 0.640625 0.250000 +vt 0.500000 0.250000 +vt 0.500000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.250000 +vt 1.000000 0.250000 +vt 1.000000 1.000000 +vt 0.500000 1.000000 +vt 0.500000 0.250000 +vt 0.000000 0.250000 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt 0.500000 0.250000 +vt 0.000000 0.250000 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt 0.500000 0.250000 +vn -1.0000 -0.0000 0.0000 +vn 0.0000 -0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +usemtl none +s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/1 6/6/1 7/7/1 8/8/1 +f 1/9/2 4/10/2 8/11/2 5/12/2 +f 2/13/2 3/14/2 7/15/2 6/16/2 +f 1/17/3 2/18/3 6/19/3 5/20/3 +f 4/21/3 3/22/3 7/23/3 8/24/3 diff --git a/nodeboxes/wardrove.nbe b/nodeboxes/wardrove.nbe new file mode 100644 index 0000000..b9f2ff3 Binary files /dev/null and b/nodeboxes/wardrove.nbe differ diff --git a/nodeboxes/wardrove_opened.nbe b/nodeboxes/wardrove_opened.nbe new file mode 100644 index 0000000..39ea668 Binary files /dev/null and b/nodeboxes/wardrove_opened.nbe differ diff --git a/on_rightclick.lua b/on_rightclick.lua new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/on_rightclick.lua @@ -0,0 +1 @@ + diff --git a/samantha.lua b/samantha.lua index 15508c5..4d94b95 100644 --- a/samantha.lua +++ b/samantha.lua @@ -1,66 +1,8 @@ - -- Samantha Definitions -local samantha = {} +-- Default player appearance -minetest.register_entity("sama:samantha" ,{ - name = "Samantha", - drops = { - }, - rotate = petz.settings.rotate, - physical = true, - stepheight = 0.1, --EVIL! - collide_with_objects = true, - collisionbox = collisionbox, - visual = petz.settings.visual, - mesh = mesh, - textures = textures, - visual_size = visual_size, - static_save = true, - get_staticdata = mobkit.statfunc, - -- api props - springiness= 0, - buoyancy = 0.5, -- portion of hitbox submerged - max_speed = 2, - jump_height = 1.5, - view_range = 10, - lung_capacity = 10, -- seconds - max_hp = 8, +-- Update appearance when the player joins +minetest.register_on_joinplayer(function(player) - attack={range=0.5, damage_groups={fleshy=3}}, - - animation = { - walk={range={x=1, y=12}, speed=25, loop=true}, - run={range={x=13, y=25}, speed=25, loop=true}, - stand={ - {range={x=26, y=46}, speed=5, loop=true}, - {range={x=47, y=59}, speed=5, loop=true}, - {range={x=82, y=94}, speed=5, loop=true}, - }, - }, - - sounds = { - }, - - logic = sama.brain, - - on_activate = function(self, staticdata, dtime_s) --on_activate, required - mobkit.actfunc(self, staticdata, dtime_s) - end, - - on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir) - end, - - on_rightclick = function(self, clicker) - - end, - - on_step = function(self, dtime) - mobkit.stepfunc(self, dtime) -- required - --petz.on_step(self, dtime) - end, - - on_die = sama.on_die(self, pos) -}) - ---petz:register_egg("petz:lamb", S("Lamb"), "petz_spawnegg_lamb.png", true) +end) diff --git a/textures/furniture.png b/textures/furniture.png new file mode 100644 index 0000000..cad4f0e Binary files /dev/null and b/textures/furniture.png differ diff --git a/textures/sama_hud_main.png b/textures/sama_hud_main.png new file mode 100644 index 0000000..0f3a9b3 Binary files /dev/null and b/textures/sama_hud_main.png differ diff --git a/textures/sama_lips.png b/textures/sama_lips.png new file mode 100644 index 0000000..c40708c Binary files /dev/null and b/textures/sama_lips.png differ diff --git a/textures/sama_wardrove.png b/textures/sama_wardrove.png new file mode 100644 index 0000000..605d4ba Binary files /dev/null and b/textures/sama_wardrove.png differ diff --git a/textures/sama_wardrove_back.png b/textures/sama_wardrove_back.png new file mode 100644 index 0000000..64ddb67 Binary files /dev/null and b/textures/sama_wardrove_back.png differ diff --git a/textures/sama_wardrove_front.png b/textures/sama_wardrove_front.png new file mode 100644 index 0000000..b4a02b8 Binary files /dev/null and b/textures/sama_wardrove_front.png differ diff --git a/textures/sama_wardrove_front_closed.png b/textures/sama_wardrove_front_closed.png new file mode 100644 index 0000000..1fc2d16 Binary files /dev/null and b/textures/sama_wardrove_front_closed.png differ diff --git a/textures/sama_wardrove_front_closed.xcf b/textures/sama_wardrove_front_closed.xcf new file mode 100644 index 0000000..7b7ce8d Binary files /dev/null and b/textures/sama_wardrove_front_closed.xcf differ diff --git a/textures/sama_wardrove_front_opened.png b/textures/sama_wardrove_front_opened.png new file mode 100644 index 0000000..b4261a7 Binary files /dev/null and b/textures/sama_wardrove_front_opened.png differ diff --git a/textures/sama_wardrove_front_opened.xcf b/textures/sama_wardrove_front_opened.xcf new file mode 100644 index 0000000..5e7e948 Binary files /dev/null and b/textures/sama_wardrove_front_opened.xcf differ diff --git a/textures/sama_wardrove_right_left.png b/textures/sama_wardrove_right_left.png new file mode 100644 index 0000000..4460cc3 Binary files /dev/null and b/textures/sama_wardrove_right_left.png differ diff --git a/textures/sama_wardrove_top_bottom.png b/textures/sama_wardrove_top_bottom.png new file mode 100644 index 0000000..a60ed1c Binary files /dev/null and b/textures/sama_wardrove_top_bottom.png differ diff --git a/wardrove.lua b/wardrove.lua new file mode 100644 index 0000000..73d2f4d --- /dev/null +++ b/wardrove.lua @@ -0,0 +1,13 @@ +local S = ... + +sama.register_container("wardrove", { + description = S("Wardrove"), + mesh = "wardrove.obj", + tiles = { + "sama_wardrove.png", + }, + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, +})