Add more items.

master
Duane Robertson 2016-10-05 21:44:40 -05:00
parent a217111668
commit 89a34d0b0d
21 changed files with 548 additions and 5 deletions

View File

@ -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,

543
nodes.lua
View File

@ -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",

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -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)