diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index dc209a5..b5fed2d 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -63,19 +63,3 @@ minetest.register_craftitem("default:twig", { description = "Twig", inventory_image = "default_twig.png", }) - -minetest.register_craftitem("default:coin", { - description = "Coin", - inventory_image = "default_coin.png", -}) - -minetest.register_craftitem("default:silver_coin", { - description = "Silver Coin", - inventory_image = "default_silver_coin.png", -}) - -minetest.register_craftitem("default:xp", { - description = "XP", - inventory_image = "default_xp.png", - stack_max = 99*99, -}) diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 4a23ff9..ccf40f5 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -170,7 +170,7 @@ minetest.register_node("default:box", { after_dig_node = default.drop_items, }) -default.treasure_chest_items = {"default:dirt", "default:sand", "default:stone_item", "default:coin", "default:coal_lump", "default:wood"} +default.treasure_chest_items = {"money:coin", "money:silver_coin", "default:ruby"} minetest.register_node("default:treasure_chest", { description = "Treasure Chest", tiles = {"default_treasure_chest.png"}, diff --git a/mods/money/init.lua b/mods/money/init.lua new file mode 100644 index 0000000..27518ee --- /dev/null +++ b/mods/money/init.lua @@ -0,0 +1,10 @@ +minetest.register_craftitem("money:coin", { + description = "Coin", + inventory_image = "money_coin.png", +}) + +minetest.register_craftitem("money:silver_coin", { + description = "Silver Coin", + inventory_image = "money_silver_coin.png", +}) + diff --git a/mods/default/textures/default_coin.png b/mods/money/textures/money_coin.png similarity index 100% rename from mods/default/textures/default_coin.png rename to mods/money/textures/money_coin.png diff --git a/mods/default/textures/default_silver_coin.png b/mods/money/textures/money_silver_coin.png similarity index 100% rename from mods/default/textures/default_silver_coin.png rename to mods/money/textures/money_silver_coin.png diff --git a/mods/torch/init.lua b/mods/torch/init.lua index d4b7768..9d73268 100644 --- a/mods/torch/init.lua +++ b/mods/torch/init.lua @@ -1,58 +1,21 @@ minetest.register_node("torch:torch", { description = "Torch", - tiles = {"torch_wood.png"}, - drawtype = "mesh", - mesh = "torch_torch.obj", + tiles = {"torch_torch_floor.png", "torch_torch_ceiling.png", "torch_torch_wall.png"}, + drawtype = "torchlike", groups = {crumbly = 3}, paramtype = "light", - paramtype2 = "facedir", + paramtype2 = "wallmounted", light_source = 14, walkable = false, inventory_image = "torch_torch_inv.png", - --wield_image = "torch_torch_inv.png", -}) - -minetest.register_abm({ - nodenames = {"torch:torch"}, - interval = 10.0, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - pos.y = pos.y + 0.2 - minetest.add_particlespawner({ - amount = 10, - time = 10, - minpos = pos, - maxpos = pos, - minvel = {x=0, y=0.1, z=0}, - maxvel = {x=0, y=0, z=0}, - minacc = {x=0, y=0, z=0}, - maxacc = {x=0, y=0, z=0}, - minexptime = 1, - maxexptime = 1, - minsize = 1, - maxsize = 1, - collisiondetection = false, - vertical = false, - texture = "torch_flame.png", - }) - minetest.add_particlespawner({ - amount = 50, - time = 10, - minpos = pos, - maxpos = pos, - minvel = {x=0, y=0.5, z=0}, - maxvel = {x=0, y=0, z=0}, - minacc = {x=0, y=0, z=0}, - maxacc = {x=0, y=0, z=0}, - minexptime = 1, - maxexptime = 1, - minsize = 3, - maxsize = 3, - collisiondetection = false, - vertical = false, - texture = "torch_smoke.png", - }) - end, + legacy_wallmounted = true, + selection_box = { + type = "wallmounted", + wall_top = {-0.1, 0.5 - 0.6, -0.1, 0.1, 0.5, 0.1}, + wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5 + 0.6, 0.1}, + wall_side = {-0.5, -0.3, -0.1, -0.5 + 0.3, 0.3, 0.1}, + }, + wield_image = "torch_torch_inv.png", }) minetest.register_craft({ diff --git a/mods/torch/models/torch_torch.mtl b/mods/torch/models/torch_torch.mtl deleted file mode 100644 index 70d3ba1..0000000 --- a/mods/torch/models/torch_torch.mtl +++ /dev/null @@ -1,10 +0,0 @@ -# Blender MTL File: 'None' -# Material Count: 1 - -newmtl None -Ns 0 -Ka 0.000000 0.000000 0.000000 -Kd 0.8 0.8 0.8 -Ks 0.8 0.8 0.8 -d 1 -illum 2 diff --git a/mods/torch/models/torch_torch.obj b/mods/torch/models/torch_torch.obj deleted file mode 100644 index 0273dd2..0000000 --- a/mods/torch/models/torch_torch.obj +++ /dev/null @@ -1,40 +0,0 @@ -# Blender v2.69 (sub 0) OBJ File: '' -# www.blender.org -mtllib torch_torch.mtl -o Cube.001 -v -0.075000 -0.555968 1.002726 -v -0.075000 -0.619360 0.866779 -v 0.075000 -0.619360 0.866779 -v 0.075000 -0.555968 1.002726 -v -0.075000 0.220916 0.159460 -v -0.075000 0.157523 0.023513 -v 0.075000 0.157523 0.023513 -v 0.075000 0.220916 0.159460 -vt 0.159707 0.720916 -vt 0.295653 0.657523 -vt -0.366779 -0.119360 -vt -0.502726 -0.055968 -vt 0.425000 0.657523 -vt 0.575000 0.657523 -vt 0.575000 -0.119360 -vt 0.425000 -0.119360 -vt 0.575000 0.720916 -vt 0.425000 0.720916 -vt 0.425000 -0.055968 -vt 0.575000 -0.055968 -vt 0.425000 0.497274 -vt 0.425000 0.633221 -vt 0.575000 0.633221 -vt 0.575000 0.497274 -vt 0.575000 0.159707 -vt 0.575000 0.295653 -vt 0.425000 0.295653 -vt 0.425000 0.159707 -usemtl None -s off -f 5/1 6/2 2/3 1/4 -f 6/5 7/6 3/7 2/8 -f 7/2 8/1 4/4 3/3 -f 8/9 5/10 1/11 4/12 -f 1/13 2/14 3/15 4/16 -f 8/17 7/18 6/19 5/20 diff --git a/mods/torch/textures/torch_flame.png b/mods/torch/textures/torch_flame.png deleted file mode 100644 index 60ce377..0000000 Binary files a/mods/torch/textures/torch_flame.png and /dev/null differ diff --git a/mods/torch/textures/torch_smoke.png b/mods/torch/textures/torch_smoke.png deleted file mode 100644 index 0f951cc..0000000 Binary files a/mods/torch/textures/torch_smoke.png and /dev/null differ diff --git a/mods/torch/textures/torch_torch_ceiling.png b/mods/torch/textures/torch_torch_ceiling.png new file mode 100644 index 0000000..92f580b Binary files /dev/null and b/mods/torch/textures/torch_torch_ceiling.png differ diff --git a/mods/torch/textures/torch_torch_floor.png b/mods/torch/textures/torch_torch_floor.png new file mode 100644 index 0000000..20ef747 Binary files /dev/null and b/mods/torch/textures/torch_torch_floor.png differ diff --git a/mods/torch/textures/torch_torch_wall.png b/mods/torch/textures/torch_torch_wall.png new file mode 100644 index 0000000..8faa414 Binary files /dev/null and b/mods/torch/textures/torch_torch_wall.png differ diff --git a/mods/torch/textures/torch_wood.png b/mods/torch/textures/torch_wood.png deleted file mode 100644 index 2980f68..0000000 Binary files a/mods/torch/textures/torch_wood.png and /dev/null differ