Compare commits

...

33 Commits

Author SHA1 Message Date
Michieal f81d530912 Update init.lua to register dropper callback. 2023-02-08 21:09:16 -05:00
Michieal 14383d6c6f update mod.conf to use optional depends mesecons_mvps 2023-02-08 21:03:32 -05:00
Michieal a5bdc8a166 fix bamboo mosaic recipe. 2023-02-08 21:02:23 -05:00
Michieal ae62f567e6 Merge branch 'master' into Bamboo-Piston-Dig 2023-02-08 20:14:31 -05:00
ancientmarinerdev 51a1dfee56 Fix game crashes 2023-02-08 20:05:23 -05:00
ancientmarinerdev c3e6bbd871 Reorder on_step calls 2023-02-08 20:05:23 -05:00
ancientmarinerdev da3a576637 Mobs should not drop XP when dying by fire from sunlight 2023-02-08 20:05:23 -05:00
ancientmarinerdev 01a4eea631 Updated credits and contributing 2023-02-08 20:05:23 -05:00
anarquimico afe111de5b 5th ITEMS batch 2023-02-08 20:05:23 -05:00
anarquimico 1dc6b03b01 4th batch of ITEMs translation 2023-02-08 20:05:23 -05:00
anarquimico f4ca472b42 Third batch of ITEMS translation 2023-02-08 20:05:23 -05:00
anarquimico fd23bbe553 Second batch of ITEMS translated 2023-02-08 20:05:23 -05:00
anarquimico dedbc64c59 First batch of ITEMS translation 2023-02-08 20:05:23 -05:00
Michieal 35ff3e9f48 further optimize and reformat mcl_honey's init.lua 2023-02-08 20:05:23 -05:00
Michieal 05f86a5f89 Move Waxing function to MCL_Honey. Remove commented code. 2023-02-08 20:05:23 -05:00
Michieal e285079507 Made Requested changes from Pull Request. 2023-02-08 20:05:23 -05:00
Michieal 2ca0e286fe Removed old commented code to prevent accidental re-enabling, and put the todo into the correct spot. 2023-02-08 20:05:22 -05:00
Michieal cb5acc782a Fixed the unwax copper blocks variants to be able to properly remove oxidization levels properly.
MCL_COPPER Blocks off all types (not stairs and slabs) now function properly.
2023-02-08 20:05:22 -05:00
Michieal 973300357d Removed "scraping_copper_block" function.
Fixed the wax copper blocks variants to have the wax removed.
2023-02-08 20:05:22 -05:00
Michieal 91b4f7a2de added in TODO 2023-02-08 20:05:22 -05:00
Michieal bceacd59b1 Everything *BUT* scraping works properly. 2023-02-08 20:05:22 -05:00
Michieal 03379ba0d7 fix minor bug. 2023-02-08 20:05:22 -05:00
Michieal b4eaf1c7ce Initialize Global variable. 2023-02-08 20:05:22 -05:00
Michieal 4593f84145 Make copper block nodes use on_place. 2023-02-08 20:05:22 -05:00
Michieal 7039bf9e7d Refactored out "varient" in foavor of "variant".
Set up a basic "on_place" function.

Made _mcl_copper_waxed_variant and _mcl_copper_unwaxed_variant node parameters so that the waxing_copper_block and scraping_copper_block functions can be made generic.

Adjusted said functions to look first for the variants, and added in protection checks for the blocks
2023-02-08 20:05:22 -05:00
Michieal 865d260f83 Add mcl_util to mcl_copper's mod.conf file. 2023-02-08 20:05:22 -05:00
Michieal dfa849e19a Merge branch 'master' into Bamboo-Piston-Dig 2023-02-06 16:56:20 -05:00
Michieal 76507025d9 Cleaned up the global function to match the current ABM. 2023-02-06 16:51:48 -05:00
Michieal acf2fbdaed commented out global function, preferring code in the abm. 2023-02-05 21:00:18 -05:00
Michieal 5dff9e1994 Fixed the ABM situation so that now bamboo "breaks" when pushed by pistons.
Probably not the most elegant, but hey. It works.
2023-02-05 18:47:45 -05:00
Michieal a44566f863 hijack the ABM to check for orphaned bamboo nodes. 2023-02-05 00:59:21 -05:00
Michieal 449cbdb330 Make Bamboo & Bamboo items not sticky for pistons. 2023-02-05 00:02:44 -05:00
Michieal 83bc60722d Begin: make bamboo dig-able by Pistons for Farm Creation. 2023-02-05 00:02:01 -05:00
7 changed files with 113 additions and 38 deletions

View File

@ -477,6 +477,19 @@ mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_black")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink")
-- Bamboo
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_endcap")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_1")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_2")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_3")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_door")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_trapdoor")
mesecon.register_mvps_unsticky("mcl_signs:wall_sign_bamboo")
mesecon.register_mvps_unsticky("mcl_bamboo:scaffolding")
-- Beds -- Beds
mesecon.register_mvps_unsticky("mcl_beds:bed_black_top") mesecon.register_mvps_unsticky("mcl_beds:bed_black_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_black_bottom") mesecon.register_mvps_unsticky("mcl_beds:bed_black_bottom")

View File

@ -29,7 +29,7 @@ local bamboo_def = {
tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"}, tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"},
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
groups = {handy = 1, axey = 1, choppy = 1, flammable = 3}, groups = {handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3},
sounds = node_sound, sounds = node_sound,
drop = { drop = {
@ -293,7 +293,6 @@ local bamboo_block_def = {
return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under)))
end, end,
} }
minetest.register_node("mcl_bamboo:bamboo_block", bamboo_block_def) minetest.register_node("mcl_bamboo:bamboo_block", bamboo_block_def)

View File

@ -279,7 +279,7 @@ minetest.register_node(SCAFFOLDING_NAME, {
climbable = true, climbable = true,
physical = true, physical = true,
node_placement_prediction = "", node_placement_prediction = "",
groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, falling_node = 1, stack_falling = 1}, groups = { handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, dig_by_piston = 1, falling_node = 1, stack_falling = 1 },
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
_mcl_hardness = 0, _mcl_hardness = 0,

View File

@ -67,6 +67,31 @@ end
local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap" local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap"
-- For when I learn more about the pistons...
function mcl_bamboo.break_orphaned(pos)
local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0))
local node_name = node_below.name
-- short circuit checks.
if mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then
return
end
-- dig the node.
minetest.remove_node(pos) -- if that fails, remove the node
local istack = ItemStack("mcl_bamboo:bamboo")
local sound_params = {
pos = pos,
gain = 1.0, -- default
max_hear_distance = 10, -- default, uses a Euclidean metric
}
minetest.remove_node(pos)
minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true)
minetest.add_item(pos, istack)
end
--]]
function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) function mcl_bamboo.grow_bamboo(pos, bonemeal_applied)
local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0)) local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0))
mcl_bamboo.mcl_log("Grow bamboo called; bonemeal: " .. tostring(bonemeal_applied)) mcl_bamboo.mcl_log("Grow bamboo called; bonemeal: " .. tostring(bonemeal_applied))

View File

@ -26,6 +26,7 @@ dofile(minetest.get_modpath(modname) .. "/recipes.lua")
--ABMs --ABMs
minetest.register_abm({ minetest.register_abm({
label = "Bamboo Grow",
nodenames = mcl_bamboo.bamboo_index, nodenames = mcl_bamboo.bamboo_index,
interval = 10, interval = 10,
chance = 20, chance = 20,
@ -34,6 +35,43 @@ minetest.register_abm({
end, end,
}) })
if minetest.get_modpath("mesecons_mvps") then
if mesecons_mvps then
for x = 1, #mcl_bamboo.bamboo_index do
mesecon.register_mvps_dropper(mcl_bamboo.bamboo_index[x], mcl_bamboo.break_orphaned)
end
end
else
minetest.register_abm({
label = "Break Orphaned Bamboo",
nodenames = mcl_bamboo.bamboo_index,
interval = 1.5,
chance = 1,
action = function(pos, _)
local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0))
local node_name = node_below.name
-- short circuit checks.
if mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then
return
end
-- dig the node.
minetest.remove_node(pos) -- if that fails, remove the node
local istack = ItemStack("mcl_bamboo:bamboo")
local sound_params = {
pos = pos,
gain = 1.0, -- default
max_hear_distance = 10, -- default, uses a Euclidean metric
}
minetest.remove_node(pos)
minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true)
minetest.add_item(pos, istack)
end,
})
end
-- Base Aliases. -- Base Aliases.
local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding" local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding"
minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block") minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block")

View File

@ -1,4 +1,4 @@
name = mcl_bamboo name = mcl_bamboo
depends = mcl_core, mcl_sounds, mcl_tools depends = mcl_core, mcl_sounds, mcl_tools
optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mesecons_mvps
author = Michieal author = Michieal

View File

@ -45,8 +45,8 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = BAMBOO .. "_mosaic", output = BAMBOO .. "_mosaic",
recipe = { recipe = {
{"mcl_stair:slab_bamboo_plank"}, {"mcl_stairs:slab_bamboo_plank"},
{"mcl_stair:slab_bamboo_plank"}, {"mcl_stairs:slab_bamboo_plank"},
} }
}) })