1
0
Fork 0

Clean up buckets and cauldrons a little bit

This commit is contained in:
cora 2022-06-21 13:51:06 +02:00
parent 685cba6821
commit 3a7022ab66
3 changed files with 15 additions and 35 deletions

View File

@ -29,7 +29,7 @@ local is_creative_enabled = minetest.is_creative_enabled
local is_protected = minetest.is_protected
local record_protection_violation = minetest.record_protection_violation
if mod_mcl_core then
minetest.register_craft({
output = "mcl_buckets:bucket_empty 1",
recipe = {
@ -37,7 +37,7 @@ if mod_mcl_core then
{"", "mcl_core:iron_ingot", ""},
},
})
end
mcl_buckets = {
liquids = {},
@ -88,9 +88,7 @@ end
local pointable_sources = {}
local function bucket_raycast(user)
--local pos = user:get_pos()
local pos = user:get_pos()
--local pos = vector.add(user:get_pos(), user:get_bone_position("Head_Control"))
pos.y = pos.y + user:get_properties().eye_height
local look_dir = user:get_look_dir()
look_dir = vector.multiply(look_dir, 5)
@ -100,7 +98,6 @@ local function bucket_raycast(user)
if ray then
for pointed_thing in ray do
if pointed_thing and pointable_sources[get_node(pointed_thing.above).name] then
--minetest.chat_send_all("found!")
return {under=pointed_thing.under,above=pointed_thing.above}
end
end
@ -242,7 +239,6 @@ local function on_place_bucket_empty(itemstack, user, pointed_thing)
if liquid_name then
local liquid_def = mcl_buckets.liquids[liquid_name]
if liquid_def then
--minetest.chat_send_all("test")
-- Fill bucket, but not in Creative Mode
-- FIXME: remove this line
--if not is_creative_enabled(user:get_player_name()) then
@ -372,7 +368,6 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", {
_doc_items_longdesc = S("A bucket can be used to collect and release liquids."),
_doc_items_usagehelp = S("Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else."),
_tt_help = S("Collects liquids"),
--liquids_pointable = true,
inventory_image = "bucket.png",
stack_max = 16,
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)

View File

@ -10,13 +10,6 @@ local function sound_place(itemname, pos)
end
end
--[[local sound_take = function(itemname, pos)
local def = minetest.registered_nodes[itemname]
if def and def.sounds and def.sounds.dug then
minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}, true)
end
end]]
if mod_mcl_core then
-- Lava bucket
mcl_buckets.register_liquid({

View File

@ -36,8 +36,6 @@ local function create_cauldron_nodebox(water_level)
}
end
-- Empty cauldron
minetest.register_node("mcl_cauldrons:cauldron", {
description = S("Cauldron"),
@ -105,18 +103,12 @@ local function register_filled_cauldron(water_level, description, liquid)
end
-- Filled cauldrons (3 levels)
register_filled_cauldron(1, S("Cauldron (1/3 Water)"))
register_filled_cauldron(2, S("Cauldron (2/3 Water)"))
register_filled_cauldron(3, S("Cauldron (3/3 Water)"))
register_filled_cauldron(1, S("Cauldron (1/3 Lava)"),"lava")
register_filled_cauldron(2, S("Cauldron (2/3 Lava)"),"lava")
register_filled_cauldron(3, S("Cauldron (3/3 Lava)"),"lava")
for i=1,3 do
register_filled_cauldron(i, S("Cauldron (" ..i .. "/3 Water)"))
register_filled_cauldron(i, S("Cauldron (" ..i .. "/3 Water)"),"lava")
if minetest.get_modpath("mclx_core") then
register_filled_cauldron(1, S("Cauldron (1/3 River Water)"),"river_water")
register_filled_cauldron(2, S("Cauldron (2/3 River Water)"),"river_water")
register_filled_cauldron(3, S("Cauldron (3/3 River Water)"),"river_water")
register_filled_cauldron(i, S("Cauldron (" ..i .. "/3 Water)"),"river_water")
end
end
minetest.register_craft({