1
0
Fork 0

Misc. Fixes.

Added in burn times for slabs.
And then amend the commit to remove an oops.
bambootoo^2
Michieal 2022-12-18 21:04:43 -05:00
parent 1861d7d30d
commit fe26f117da
1 changed files with 58 additions and 35 deletions

View File

@ -348,7 +348,10 @@ local function create_nodes()
slab = 1,
axey = 1,
handy = 1,
stair = 1
stair = 1,
flammable = 1,
fire_encouragement = 5,
fire_flammability = 20
}
minetest.override_item(bamboo_plank_slab, {groups = node_groups})
@ -551,7 +554,6 @@ local function create_nodes()
-- Node destructor; called before removing node.
local new_pos = vector.offset(pos, 0, 1, 0)
local node_above = minetest.get_node(new_pos)
if node_above and node_above.name == "mcl_bamboo:scaffolding" then
if node_above and node_above.name == "mcl_bamboo:scaffolding" then
local sound_params = {
pos = new_pos,
@ -564,7 +566,6 @@ local function create_nodes()
local istack = ItemStack("mcl_bamboo:scaffolding")
minetest.add_item(new_pos, istack)
end
end
end,
})
@ -645,27 +646,6 @@ local function register_craftings()
}
})
-- Barrel and composter recipes
if minetest.get_modpath("mcl_stairs") and 1 == 2 then
-- currently disabled.
if mcl_stairs ~= nil then
minetest.register_craft({
output = "mcl_barrels:barrel_closed",
recipe = {
{"group:wood", "group:wood_slab", "group:wood"},
{"group:wood", "", "group:wood"},
{"group:wood", "group:wood_slab", "group:wood"},
}
})
minetest.register_craft({
type = "fuel",
recipe = "mcl_barrels:barrel_closed",
burntime = 15,
})
end
end
minetest.register_craft({
output = "mcl_bamboo:scaffolding 6",
recipe = {{bamboo, "mcl_mobitems:string", bamboo},
@ -732,6 +712,23 @@ local function register_craftings()
recipe = "mcl_bamboo:scaffolding",
burntime = 20
})
minetest.register_craft({
type = "fuel",
recipe = "mcl_stairs:slab_bamboo_plank",
burntime = 7.5,
})
minetest.register_craft({
type = "fuel",
recipe = "mcl_stairs:slab_bamboo_block",
burntime = 7.5,
})
minetest.register_craft({
type = "fuel",
recipe = "mcl_stairs:slab_bamboo_stripped",
burntime = 7.5,
})
end
create_nodes()
@ -740,6 +737,8 @@ register_craftings()
-- MAPGEN
dofile(minetest.get_modpath(modname) .. "/mapgen.lua")
local BAMBOO_MAX_HEIGHT_CHECK = -16
--ABMs
minetest.register_abm({
nodenames = {"mcl_bamboo:bamboo"},
@ -751,7 +750,7 @@ minetest.register_abm({
return
end
local found_soil = false
for py = -1, -16, -1 do
for py = -1, BAMBOO_MAX_HEIGHT_CHECK, -1 do
local chk_pos = vector.offset(pos, 0, py, 0)
local name = minetest.get_node(chk_pos).name
if minetest.get_item_group(name, "soil") ~= 0 then
@ -810,4 +809,28 @@ todo: Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo
You can craft Stair and Slab variants of Bamboo Mosaic
Bamboo Mosaic blocks cannot be used as a crafting ingredient where other wooden blocks are used, but they can be
used as fuel.
todo -- add in fuel recipes for:
[-] bamboo slab + stripped bamboo slab
[-] bamboo stair + stripped bamboo stair + bamboo plank stair
[-] bamboo button
--]]
--[[
Useful code snippit for dealing with updating groups on already defined objects, such as api created items.
I think that this will be implemented, as time goes on, to deal with adding groups to slabs and the like.
local function addgroups(name, ...)
local def = minetest.registered_items[name] or error(name .. " not found")
local groups = {}
for k, v in pairs(def.groups) do
groups[k] = v
end
local function addall(x, ...)
if not x then return end
groups[x] = 1
return addall(...)
end
addall(...)
return minetest.override_item(name, {groups = groups})
end
--]]