Move small mushrooms to mcl_mushrooms

This commit is contained in:
Wuzzy 2017-03-01 01:16:52 +01:00
parent 54a011b521
commit 15b5d8917a
12 changed files with 94 additions and 89 deletions

View file

@ -0,0 +1,75 @@
local template = {
groups = {handy=1,axey=1, huge_mushroom = 1, building_block = 1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = true,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.2,
}
local red = table.copy(template)
red.drop = {
items = {
{ items = {'mcl_mushrooms:mushroom_red 1'}, rarity = 2 },
{ items = {'mcl_mushrooms:mushroom_red 1'}, rarity = 2 },
}
}
local brown= table.copy(template)
brown.drop = {
items = {
{ items = {'mcl_mushrooms:mushroom_brown 1'}, rarity = 2 },
{ items = {'mcl_mushrooms:mushroom_brown 1'}, rarity = 2 },
}
}
local register_mushroom = function(color, template, d_cap_top, d_cap_side, d_cap_corner, d_stem, d_pores, d_cap_all, d_stem_all)
-- DV (Minecraft dava value) 14: Cap texture on all sides
local full = table.copy(template)
full.description = d_cap_all
full.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_full", full)
-- DV 0: Pores on all sides
local pores_full = table.copy(template)
pores_full.description = d_pores
pores_full.tiles = { "mcl_mushrooms_mushroom_block_inside.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_pores_full", pores_full)
-- DV 15: Stem texture on all sides
local stem_full = table.copy(template)
stem_full.description = d_stem_all
stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full)
-- DV 10: Stem
local stem = table.copy(template)
stem.description = d_stem
stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem)
-- DV 1, DV 3, DV 7, DV 9: Cap corner. Cap texture on top and two sides in a corner formation
local cap_corner = table.copy(template)
cap_corner.description = d_cap_corner
cap_corner.paramtype2 = "facedir"
cap_corner.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_corner", cap_corner)
-- DV 5: Cap texture on top
local cap_top = table.copy(template)
cap_top.description = d_cap_top
cap_top.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_top", cap_top)
-- DV 2, DV 4, DV 6, DV 8: Cap texture on top and one side
local cap_side = table.copy(template)
cap_side.description = d_cap_side
cap_side.paramtype2 = "facedir"
cap_side.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_side", cap_side)
end
register_mushroom("red", red, "Huge Red Mushroom Cap Top", "Huge Red Mushroom Cap Side", "Huge Red Mushroom Cap Corner", "Huge Red Mushroom Stem", "Huge Red Mushroom Pores", "Huge Red Mushroom All-Faces Cap", "Huge Red Mushroom All-Faces Stem")
register_mushroom("brown", brown, "Huge Brown Mushroom Cap Top", "Huge Brown Mushroom Cap Side", "Huge Brown Mushroom Cap Corner", "Huge Brown Mushroom Stem", "Huge Brown Mushroom Pores", "Huge Brown Mushroom All-Faces Cap", "Huge Brown Mushroom All-Faces Stem")

View file

@ -1,75 +1,6 @@
local template = {
groups = {handy=1,axey=1, huge_mushroom = 1, building_block = 1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = true,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.2,
}
dofile(minetest.get_modpath("mcl_mushrooms").."/small.lua")
dofile(minetest.get_modpath("mcl_mushrooms").."/huge.lua")
local red = table.copy(template)
red.drop = {
items = {
{ items = {'mcl_farming:mushroom_red 1'}, rarity = 2 },
{ items = {'mcl_farming:mushroom_red 1'}, rarity = 2 },
}
}
local brown= table.copy(template)
brown.drop = {
items = {
{ items = {'mcl_farming:mushroom_brown 1'}, rarity = 2 },
{ items = {'mcl_farming:mushroom_brown 1'}, rarity = 2 },
}
}
local register_mushroom = function(color, template, d_cap_top, d_cap_side, d_cap_corner, d_stem, d_pores, d_cap_all, d_stem_all)
-- DV (Minecraft dava value) 14: Cap texture on all sides
local full = table.copy(template)
full.description = d_cap_all
full.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_full", full)
-- DV 0: Pores on all sides
local pores_full = table.copy(template)
pores_full.description = d_pores
pores_full.tiles = { "mcl_mushrooms_mushroom_block_inside.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_pores_full", pores_full)
-- DV 15: Stem texture on all sides
local stem_full = table.copy(template)
stem_full.description = d_stem_all
stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full)
-- DV 10: Stem
local stem = table.copy(template)
stem.description = d_stem
stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem)
-- DV 1, DV 3, DV 7, DV 9: Cap corner. Cap texture on top and two sides in a corner formation
local cap_corner = table.copy(template)
cap_corner.description = d_cap_corner
cap_corner.paramtype2 = "facedir"
cap_corner.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_corner", cap_corner)
-- DV 5: Cap texture on top
local cap_top = table.copy(template)
cap_top.description = d_cap_top
cap_top.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_top", cap_top)
-- DV 2, DV 4, DV 6, DV 8: Cap texture on top and one side
local cap_side = table.copy(template)
cap_side.description = d_cap_side
cap_side.paramtype2 = "facedir"
cap_side.tiles = { "mcl_mushrooms_mushroom_block_skin_"..color..".png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_"..color..".png" }
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_cap_side", cap_side)
end
register_mushroom("red", red, "Huge Red Mushroom Cap Top", "Huge Red Mushroom Cap Side", "Huge Red Mushroom Cap Corner", "Huge Red Mushroom Stem", "Huge Red Mushroom Pores", "Huge Red Mushroom All-Faces Cap", "Huge Red Mushroom All-Faces Stem")
register_mushroom("brown", brown, "Huge Brown Mushroom Cap Top", "Huge Brown Mushroom Cap Side", "Huge Brown Mushroom Cap Corner", "Huge Brown Mushroom Stem", "Huge Brown Mushroom Pores", "Huge Brown Mushroom All-Faces Cap", "Huge Brown Mushroom All-Faces Stem")
-- Aliases for old MCL2 versions
minetest.register_alias("mcl_farming:mushroom_red", "mcl_mushrooms:mushroom_red")
minetest.register_alias("mcl_farming:mushroom_brown", "mcl_mushrooms:mushroom_brown")

View file

@ -0,0 +1,53 @@
minetest.register_node("mcl_mushrooms:mushroom_brown", {
description = "Brown Mushroom",
drawtype = "plantlike",
tiles = { "farming_mushroom_brown.png" },
inventory_image = "farming_mushroom_brown.png",
wield_image = "farming_mushroom_brown.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
light_source = 1,
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.015, 0.15 },
},
_mcl_blast_resistance = 0,
})
minetest.register_node("mcl_mushrooms:mushroom_red", {
description = "Red Mushroom",
drawtype = "plantlike",
tiles = { "farming_mushroom_red.png" },
inventory_image = "farming_mushroom_red.png",
wield_image = "farming_mushroom_red.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.015, 0.15 },
},
_mcl_blast_resistance = 0,
})
minetest.register_craftitem("mcl_mushrooms:mushroom_stew", {
description = "Mushroom Stew",
inventory_image = "farming_mushroom_stew.png",
on_place = minetest.item_eat(6, "mcl_core:bowl"),
on_secondary_use = minetest.item_eat(6, "mcl_core:bowl"),
groups = { food = 3, eatable = 6 },
stack_max = 1,
})
minetest.register_craft({
type = "shapeless",
output = "mcl_mushrooms:mushroom_stew",
recipe = {'mcl_core:bowl', 'mcl_mushrooms:mushroom_brown', 'mcl_mushrooms:mushroom_red'}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B