diff --git a/goblin.lua b/goblin.lua index 6f62536cb745e58261c47ba567d2f0425ebc8b7f..541328566c6dcbf61926bec47484eb640f87abd4 100644 --- a/goblin.lua +++ b/goblin.lua @@ -297,7 +297,7 @@ mobs:register_egg("loud_walking:goblin_gold", "Goblin Egg (gold)", "default_moss local m = table.copy(minetest.registered_entities["loud_walking:goblin_digger"]) m.name = 'loud_walking:goblin_ice' -m.textures = { {"squaresville_goblin_ice2.png"}, } +m.textures = { {"loud_walking_goblin_ice2.png"}, } m.base_texture = m.textures[1] m.drops = drops['ice'] minetest.registered_entities["loud_walking:goblin_ice"] = m @@ -445,7 +445,7 @@ bucket.register_liquid( "loud_walking:molten_gold_source", "loud_walking:molten_gold_flowing", "loud_walking:bucket_molten_gold", - "squaresville_bucket_molten_gold.png", + "loud_walking_bucket_molten_gold.png", "Bucket of Molten Gold", {} ) @@ -509,7 +509,7 @@ end minetest.register_node("loud_walking:ice_trap", { description = "Ice Trap", - tiles = {"default_ice.png^squaresville_mineral_moonstone.png"}, + tiles = {"default_ice.png^loud_walking_mineral_moonstone.png"}, groups = {cracky = 3, trap = 1}, drop = 'default:ice', is_ground_content = false, diff --git a/nodes.lua b/nodes.lua index c64c4574e63cfd7746689ef34817f685236911d5..3c38fa1cc95346e28fd4fac5c3b25e4f72c24400 100644 --- a/nodes.lua +++ b/nodes.lua @@ -1,3 +1,546 @@ +local get_node_or_nil = minetest.get_node_or_nil +local get_item_group = minetest.get_item_group +local light_max = 12 +local max_depth = 31000 + + +local newnode = loud_walking.clone_node("farming:straw") +newnode.description = 'Bundle of Grass' +newnode.tiles = {'farming_straw.png^[colorize:#00FF00:50'} +minetest.register_node("loud_walking:bundle_of_grass", newnode) + +minetest.register_craft({ + output = 'loud_walking:bundle_of_grass', + recipe = { + {'default:grass_1', 'default:grass_1', 'default:grass_1'}, + {'default:grass_1', 'default:grass_1', 'default:grass_1'}, + {'default:grass_1', 'default:grass_1', 'default:grass_1'}, + } +}) + +minetest.register_craft({ + output = 'loud_walking:bundle_of_grass', + type = 'shapeless', + recipe = { + 'default:junglegrass', 'default:junglegrass', + 'default:junglegrass', 'default:junglegrass', + } +}) + +newnode = loud_walking.clone_node("farming:straw") +newnode.description = "Dry Fiber" +minetest.register_node("loud_walking:dry_fiber", newnode) + +minetest.register_craft({ + type = "cooking", + output = "loud_walking:dry_fiber", + recipe = 'loud_walking:bundle_of_grass', + cooktime = 3, +}) + +local function rope_remove(pos) + if not pos then + return + end + + for i = 1, 100 do + local newpos = table.copy(pos) + newpos.y = newpos.y - i + local node = minetest.get_node_or_nil(newpos) + if node and node.name and node.name == 'loud_walking:rope_ladder_piece' then + minetest.set_node(newpos, {name='air'}) + else + break + end + end +end + +local good_params = {nil, true, true, true, true} +for length = 10, 50, 10 do + minetest.register_node("loud_walking:rope_ladder_"..length, { + description = "Rope Ladder ("..length.." meter)", + drawtype = "signlike", + tiles = {"loud_walking_rope_ladder.png"}, + inventory_image = "loud_walking_rope_ladder.png", + wield_image = "loud_walking_rope_ladder.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + climbable = true, + is_ground_content = false, + selection_box = { + type = "wallmounted", + }, + groups = {snappy = 2, oddly_breakable_by_hand = 3, flammable = 2}, + legacy_wallmounted = true, + sounds = default.node_sound_leaves_defaults(), + after_place_node = function(pos, placer, itemstack, pointed_thing) + if not (pointed_thing and pointed_thing.above) then + return + end + + local pos_old = pointed_thing.above + local orig = minetest.get_node_or_nil(pos_old) + if orig and orig.name and orig.param2 and good_params[orig.param2] then + for i = 1, length do + local newpos = table.copy(pos_old) + newpos.y = newpos.y - i + local node = minetest.get_node_or_nil(newpos) + if node and node.name and node.name == 'air' then + minetest.set_node(newpos, {name='loud_walking:rope_ladder_piece', param2=orig.param2}) + else + break + end + end + end + end, + on_destruct = rope_remove, + }) + + if length > 10 then + rec = {} + for i = 10, length, 10 do + rec[#rec+1] = 'loud_walking:rope_ladder_10' + end + minetest.register_craft({ + output = 'loud_walking:rope_ladder_'..length, + type = 'shapeless', + recipe = rec, + }) + end +end + +minetest.register_node("loud_walking:rope_ladder_piece", { + description = "Rope Ladder", + drawtype = "signlike", + tiles = {"loud_walking_rope_ladder.png"}, + inventory_image = "loud_walking_rope_ladder.png", + wield_image = "loud_walking_rope_ladder.png", + drop = '', + paramtype = "light", + paramtype2 = "wallmounted", + buildable_to = true, + sunlight_propagates = true, + walkable = false, + climbable = true, + is_ground_content = false, + selection_box = { + type = "wallmounted", + }, + groups = {snappy = 2, oddly_breakable_by_hand = 3, flammable = 2}, + legacy_wallmounted = true, + sounds = default.node_sound_leaves_defaults(), + on_destruct = rope_remove, +}) + +minetest.register_craft({ + output = 'loud_walking:rope_ladder_10', + recipe = { + {'loud_walking:dry_fiber', '', 'loud_walking:dry_fiber'}, + {'loud_walking:dry_fiber', 'loud_walking:dry_fiber', 'loud_walking:dry_fiber'}, + {'loud_walking:dry_fiber', '', 'loud_walking:dry_fiber'}, + } +}) + +minetest.register_craftitem("loud_walking:apple_pie_slice", { + description = "Apple Pie Slice", + inventory_image = "loud_walking_apple_pie_slice.png", + on_use = minetest.item_eat(5), +}) + +minetest.register_craft({ + output = 'loud_walking:apple_pie_slice 6', + type = 'shapeless', + recipe = { + 'loud_walking:apple_pie', + } +}) + +minetest.register_node("loud_walking:apple_pie", { + description = "Apple Pie", + drawtype = "raillike", + tiles = {"loud_walking_apple_pie.png"}, + inventory_image = "loud_walking_apple_pie.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.4, -0.5, -0.4, 0.5, -0.4, 0.4} + }, + groups = {dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_craftitem("loud_walking:apple_pie_uncooked", { + description = "Uncooked Apple Pie", + inventory_image = "loud_walking_apple_pie_uncooked.png", +}) + +if minetest.registered_items['mobs:bucket_milk'] then + minetest.register_craft({ + output = 'loud_walking:apple_pie_uncooked', + type = 'shapeless', + recipe = { + 'default:apple', + 'default:apple', + 'farming:flour', + 'mobs:bucket_milk', + }, + replacements = { + {'mobs:bucket_milk', 'loud_walking:bucket_empty'}, + }, + }) +end + +if minetest.registered_items['mobs:honey'] then + minetest.register_craft({ + output = 'loud_walking:apple_pie_uncooked', + type = 'shapeless', + recipe = { + 'default:apple', + 'default:apple', + 'farming:flour', + 'mobs:honey', + }, + }) +end + +if minetest.registered_items['mobs:meat_raw'] then + minetest.register_craft({ + output = 'loud_walking:meat_pie_uncooked', + type = 'shapeless', + recipe = { + 'loud_walking:barely_edible_meat', + 'loud_walking:barely_edible_meat', + 'loud_walking:onion', + 'loud_walking:onion', + 'farming:flour', + }, + }) + + minetest.register_craftitem("loud_walking:meat_pie_uncooked", { + description = "Uncooked Meat Pie", + inventory_image = "loud_walking_meat_pie_uncooked.png", + }) + + minetest.register_craft({ + output = 'loud_walking:meat_pie_uncooked', + type = 'shapeless', + recipe = { + 'mobs:meat_raw', + 'mobs:meat_raw', + 'loud_walking:onion', + 'farming:flour', + }, + }) + + minetest.register_craftitem("loud_walking:barely_edible_meat", { + description = "Barely edible meat", + inventory_image = "mobs_meat.png^[colorize:#000000:150", + on_use = minetest.item_eat(1), + }) + + minetest.register_node("loud_walking:meat_pie", { + description = "Meat Pie", + drawtype = "raillike", + tiles = {"loud_walking_meat_pie.png"}, + inventory_image = "loud_walking_meat_pie.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.4, -0.5, -0.4, 0.5, -0.4, 0.4} + }, + groups = {dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_dirt_defaults(), + }) + + minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "loud_walking:meat_pie", + recipe = "loud_walking:meat_pie_uncooked" + }) + + minetest.register_craftitem("loud_walking:meat_pie_slice", { + description = "Meat Pie Slice", + inventory_image = "loud_walking_meat_pie_slice.png", + on_use = minetest.item_eat(9), + }) + + minetest.register_craft({ + output = 'loud_walking:meat_pie_slice 5', + type = 'shapeless', + recipe = { + 'loud_walking:meat_pie', + } + }) +end + +farming.register_plant("loud_walking:onion", { + description = "Onion", + inventory_image = "loud_walking_onion.png", + steps = 3, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"} +}) + +minetest.registered_items['loud_walking:seed_onion'] = nil +minetest.registered_nodes['loud_walking:seed_onion'] = nil +minetest.registered_craftitems['loud_walking:seed_onion'] = nil +minetest.register_alias('loud_walking:seed_onion', 'loud_walking:onion') +for i = 1, 3 do + local onion = minetest.registered_items['loud_walking:onion_'..i] + if onion then + onion.drop = { + max_items = i, + items = { + { items = {'loud_walking:onion'}, rarity = 4 - i, }, + { items = {'loud_walking:onion'}, rarity = (4 - i) * 2, }, + { items = {'loud_walking:onion'}, rarity = (4 - i) * 4, }, + }, + } + end +end + +minetest.register_node("loud_walking:onion", { + description = "Onion", + drawtype = "plantlike", + visual_scale = 0.75, + tiles = {"loud_walking_onion.png"}, + inventory_image = "loud_walking_onion.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} + }, + fertility = {'grassland'}, + groups = {seed = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + next_plant = 'loud_walking:onion_1', + on_timer = farming.grow_plant, + minlight = 10, + maxlight = 15, + + on_place = function(itemstack, placer, pointed_thing) + local stack = farming.place_seed(itemstack, placer, pointed_thing, 'loud_walking:onion') + if stack then + return stack + end + + return minetest.item_place(itemstack, placer, pointed_thing) + end, +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "loud_walking:apple_pie", + recipe = "loud_walking:apple_pie_uncooked" +}) + + +for i = 3, 5 do + minetest.override_item("default:grass_" .. i, { + drop = { + max_items = 2, + items = { + { items = { "default:grass_1"}, }, + { items = {'farming:seed_wheat'},rarity = 5 }, + { items = {"loud_walking:onion",}, rarity = 5 }, + }, + }, + }) +end + +minetest.register_craftitem("loud_walking:wooden_bowl", { + description = "Wooden Bowl", + drawtype = "plantlike", + paramtype = "light", + tiles = {"loud_walking_wooden_bowl.png"}, + inventory_image = "loud_walking_wooden_bowl.png", + groups = {bowl = 1, dig_immediate = 3}, +}) + +minetest.register_craft({ + output = 'loud_walking:wooden_bowl 20', + recipe = { + {'group:wood', '', 'group:wood'}, + {'group:wood', '', 'group:wood'}, + {'', 'group:wood', ''}, + }, +}) + +minetest.register_craft({ + output = 'default:diamondblock', + recipe = { + {'default:coalblock', 'default:coalblock', 'default:coalblock'}, + {'default:coalblock', 'default:mese_crystal_fragment', 'default:coalblock'}, + {'default:coalblock', 'default:coalblock', 'default:coalblock'}, + } +}) + +minetest.register_craft({ + output = 'default:mese_crystal 2', + recipe = { + {'default:diamond', 'default:diamond', 'default:diamond'}, + {'default:diamond', 'default:mese_crystal', 'default:diamond'}, + {'default:diamond', 'default:diamond', 'default:diamond'}, + } +}) + + +minetest.register_craftitem("loud_walking:charcoal", { + description = "Charcoal Briquette", + inventory_image = "default_coal_lump.png", + groups = {coal = 1} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "loud_walking:charcoal", + burntime = 50, +}) + +minetest.register_craft({ + type = "cooking", + output = "loud_walking:charcoal", + recipe = "group:tree", +}) + +minetest.register_craft({ + output = 'default:torch 4', + recipe = { + {'group:coal'}, + {'group:stick'}, + } +}) + +minetest.register_craft({ + output = 'default:coalblock', + recipe = { + {'group:coal', 'group:coal', 'group:coal'}, + {'group:coal', 'group:coal', 'group:coal'}, + {'group:coal', 'group:coal', 'group:coal'}, + } +}) + +if minetest.get_modpath('tnt') then + minetest.register_craft({ + output = "tnt:gunpowder", + type = "shapeless", + recipe = {"group:coal", "default:gravel"} + }) +end + +minetest.register_craftitem("loud_walking:disgusting_gruel", { + description = "Disgusting Gruel", + drawtype = "plantlike", + paramtype = "light", + tiles = {"loud_walking_disgusting_gruel.png"}, + inventory_image = "loud_walking_disgusting_gruel.png", + on_use = minetest.item_eat(2), + groups = {dig_immediate = 3}, +}) + +minetest.register_craftitem("loud_walking:disgusting_gruel_raw", { + description = "Bowl Of Gluey Paste", + drawtype = "plantlike", + paramtype = "light", + tiles = {"loud_walking_disgusting_gruel_raw.png"}, + inventory_image = "loud_walking_disgusting_gruel_raw.png", + groups = {dig_immediate = 3}, +}) + +minetest.register_craft({ + type = "cooking", + output = "loud_walking:disgusting_gruel", + recipe = 'loud_walking:disgusting_gruel_raw', + cooktime = 2, +}) + +minetest.register_craft({ + output = "loud_walking:disgusting_gruel_raw", + type = 'shapeless', + recipe = { + 'loud_walking:dry_fiber', + 'group:water_bucket', + 'group:bowl', + }, + replacements = { + {'bucket:bucket_water', 'bucket:bucket_water'}, + {'bucket:bucket_river_water', 'bucket:bucket_river_water'}, + {'loud_walking:bucket_wood_water', 'loud_walking:bucket_wood_water'}, + {'loud_walking:bucket_wood_river_water', 'loud_walking:bucket_wood_river_water'}, + }, +}) + +-- Glowing fungal stone provides an eerie light. +minetest.register_node("loud_walking:glowing_fungal_stone", { + description = "Glowing Fungal Stone", + tiles = {"default_stone.png^vmg_glowing_fungal.png",}, + is_ground_content = true, + light_source = light_max - 4, + groups = {cracky=3, stone=1}, + drop = {items={ {items={"default:cobble"},}, {items={"loud_walking:glowing_fungus",},},},}, + sounds = default.node_sound_stone_defaults(), +}) + +-- Glowing fungus grows underground. +minetest.register_craftitem("loud_walking:glowing_fungus", { + description = "Glowing Fungus", + drawtype = "plantlike", + paramtype = "light", + tiles = {"vmg_glowing_fungus.png"}, + inventory_image = "vmg_glowing_fungus.png", + groups = {dig_immediate = 3}, +}) + +-- moon glass (glows) +newnode = loud_walking.clone_node("default:glass") +newnode.description = "Glowing Glass" +newnode.light_source = default.LIGHT_MAX +minetest.register_node("loud_walking:moon_glass", newnode) + +-- Moon juice is extracted from glowing fungus, to make glowing materials. +minetest.register_craftitem("loud_walking:moon_juice", { + description = "Moon Juice", + drawtype = "plantlike", + paramtype = "light", + tiles = {"vmg_moon_juice.png"}, + inventory_image = "vmg_moon_juice.png", + --groups = {dig_immediate = 3, attached_node = 1}, + groups = {dig_immediate = 3, vessel = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +-- moon juice from fungus +minetest.register_craft({ + output = "fun_caves:moon_juice", + recipe = { + {"fun_caves:glowing_fungus", "fun_caves:glowing_fungus", "fun_caves:glowing_fungus"}, + {"fun_caves:glowing_fungus", "fun_caves:glowing_fungus", "fun_caves:glowing_fungus"}, + {"fun_caves:glowing_fungus", "vessels:glass_bottle", "fun_caves:glowing_fungus"}, + }, +}) + +minetest.register_craft({ + output = "fun_caves:moon_glass", + type = "shapeless", + recipe = { + "fun_caves:moon_juice", + "fun_caves:moon_juice", + "default:glass", + }, +}) + + minetest.register_node("loud_walking:plate_glass", { description = "Plate Glass", drawtype = "glasslike", diff --git a/textures/loud_walking_apple_pie.png b/textures/loud_walking_apple_pie.png new file mode 100644 index 0000000000000000000000000000000000000000..cb2eca9318921c201b1f88ee0348d179b7f7571d Binary files /dev/null and b/textures/loud_walking_apple_pie.png differ diff --git a/textures/loud_walking_apple_pie_slice.png b/textures/loud_walking_apple_pie_slice.png new file mode 100644 index 0000000000000000000000000000000000000000..70b1280aac92f31452110f2867177836717443ab Binary files /dev/null and b/textures/loud_walking_apple_pie_slice.png differ diff --git a/textures/loud_walking_apple_pie_uncooked.png b/textures/loud_walking_apple_pie_uncooked.png new file mode 100644 index 0000000000000000000000000000000000000000..3de45dd1859982f6574d21d1b8eab5034f18b593 Binary files /dev/null and b/textures/loud_walking_apple_pie_uncooked.png differ diff --git a/textures/loud_walking_disgusting_gruel.png b/textures/loud_walking_disgusting_gruel.png new file mode 100644 index 0000000000000000000000000000000000000000..4fa0f5db0fb7634fb976ebceebbce3dbc82ad260 Binary files /dev/null and b/textures/loud_walking_disgusting_gruel.png differ diff --git a/textures/loud_walking_disgusting_gruel_raw.png b/textures/loud_walking_disgusting_gruel_raw.png new file mode 100644 index 0000000000000000000000000000000000000000..202f5010965bba68c7e8b99b86add204c83b9ed0 Binary files /dev/null and b/textures/loud_walking_disgusting_gruel_raw.png differ diff --git a/textures/loud_walking_meat_pie.png b/textures/loud_walking_meat_pie.png new file mode 100644 index 0000000000000000000000000000000000000000..beb04520d0659c20d8f349eb7ab77ba487db4fd5 Binary files /dev/null and b/textures/loud_walking_meat_pie.png differ diff --git a/textures/loud_walking_meat_pie_slice.png b/textures/loud_walking_meat_pie_slice.png new file mode 100644 index 0000000000000000000000000000000000000000..4979f4b460a9712342af67eb2721648ab6ed6fcd Binary files /dev/null and b/textures/loud_walking_meat_pie_slice.png differ diff --git a/textures/loud_walking_meat_pie_uncooked.png b/textures/loud_walking_meat_pie_uncooked.png new file mode 100644 index 0000000000000000000000000000000000000000..82355629a276b6361c51bc863008ae6802d7eff5 Binary files /dev/null and b/textures/loud_walking_meat_pie_uncooked.png differ diff --git a/textures/squaresville_mineral_moonstone.png b/textures/loud_walking_mineral_moonstone.png similarity index 100% rename from textures/squaresville_mineral_moonstone.png rename to textures/loud_walking_mineral_moonstone.png diff --git a/textures/loud_walking_onion.png b/textures/loud_walking_onion.png new file mode 100644 index 0000000000000000000000000000000000000000..aa2722daf1b4dfe0c228a76164caf73532cd9d7b Binary files /dev/null and b/textures/loud_walking_onion.png differ diff --git a/textures/loud_walking_onion_1.png b/textures/loud_walking_onion_1.png new file mode 100644 index 0000000000000000000000000000000000000000..101fefaa81e2fa241acca126aa3526da5d615614 Binary files /dev/null and b/textures/loud_walking_onion_1.png differ diff --git a/textures/loud_walking_onion_2.png b/textures/loud_walking_onion_2.png new file mode 100644 index 0000000000000000000000000000000000000000..72c721afb35c7119cd8a758c2c1747d6edb375c8 Binary files /dev/null and b/textures/loud_walking_onion_2.png differ diff --git a/textures/loud_walking_onion_3.png b/textures/loud_walking_onion_3.png new file mode 100644 index 0000000000000000000000000000000000000000..7fd6838805d5e6ef99eec788e061793e3eaa7665 Binary files /dev/null and b/textures/loud_walking_onion_3.png differ diff --git a/textures/loud_walking_rope_ladder.png b/textures/loud_walking_rope_ladder.png new file mode 100644 index 0000000000000000000000000000000000000000..7beec47db5d367944eab6c6f3cabd9787bedcb92 Binary files /dev/null and b/textures/loud_walking_rope_ladder.png differ diff --git a/textures/squaresville_tarantula.png b/textures/loud_walking_tarantula.png similarity index 100% rename from textures/squaresville_tarantula.png rename to textures/loud_walking_tarantula.png diff --git a/textures/loud_walking_wood_bucket.png b/textures/loud_walking_wood_bucket.png new file mode 100644 index 0000000000000000000000000000000000000000..c34ceb7278a1edc3794787442005959a269da41a Binary files /dev/null and b/textures/loud_walking_wood_bucket.png differ diff --git a/textures/loud_walking_wood_bucket_overlay.png b/textures/loud_walking_wood_bucket_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..9c5ea14eb22c581ca71432a31581c4ceceb161d7 Binary files /dev/null and b/textures/loud_walking_wood_bucket_overlay.png differ diff --git a/textures/loud_walking_wooden_bowl.png b/textures/loud_walking_wooden_bowl.png new file mode 100644 index 0000000000000000000000000000000000000000..5169fdff4a0cda3b57a74d47b64067495b3c0c32 Binary files /dev/null and b/textures/loud_walking_wooden_bowl.png differ diff --git a/wooden_buckets.lua b/wooden_buckets.lua index 26d64508fc717fb7fcdcb6606c79cadb6589ec70..dfac1ab91b71b47d56d8a2bb7763a962667b6fbd 100644 --- a/wooden_buckets.lua +++ b/wooden_buckets.lua @@ -3,7 +3,7 @@ local function register_liquid_wood(source, itemname, inventory_image, name, gro return end - inventory_image = inventory_image..'^squaresville_wood_bucket_overlay.png' + inventory_image = inventory_image..'^loud_walking_wood_bucket_overlay.png' minetest.register_craftitem(itemname, { description = name, inventory_image = inventory_image, @@ -86,7 +86,7 @@ minetest.register_craft({ minetest.register_craftitem("loud_walking:bucket_wood_empty", { description = "Empty Wooden Bucket", - inventory_image = "squaresville_wood_bucket.png", + inventory_image = "loud_walking_wood_bucket.png", stack_max = 99, liquids_pointable = true, on_use = function(itemstack, user, pointed_thing)