forked from Mineclonia/Mineclonia
Rename mod: bucket to mcl_buckets
This commit is contained in:
parent
1d075f849f
commit
ee38a7af9d
|
@ -44,7 +44,7 @@ mobs_mc.override.items = {
|
|||
shears = "mcl_tools:shears",
|
||||
|
||||
mushroom_red = "mcl_mushrooms:mushroom_red",
|
||||
bucket = "bucket:bucket_empty",
|
||||
bucket = "mcl_buckets:bucket_empty",
|
||||
grass_block = "mcl_core:dirt_with_grass",
|
||||
string = "mcl_mobitems:string",
|
||||
stick = "mcl_core:stick",
|
||||
|
|
|
@ -45,7 +45,7 @@ local group_stereotypes = {
|
|||
wool = "mcl_wool:white",
|
||||
carpet = "mcl_wool:white_carpet",
|
||||
dye = "mcl_dye:red",
|
||||
water_bucket = "bucket:bucket_water",
|
||||
water_bucket = "mcl_buckets:bucket_water",
|
||||
flower = "mcl_flowers:dandelion",
|
||||
mushroom = "mcl_mushrooms:mushroom_brown",
|
||||
wood_slab = "mcl_stairs:slab_wood",
|
||||
|
|
|
@ -317,7 +317,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
|||
"item_image_button[3.693,0;1,1;mcl_minecarts:golden_rail;rail;]".. --transportation
|
||||
tab(name, "rail") ..
|
||||
"tooltip[rail;Transportation]"..
|
||||
"item_image_button[4.93,0;1,1;bucket:bucket_lava;misc;]".. --miscellaneous
|
||||
"item_image_button[4.93,0;1,1;mcl_buckets:bucket_lava;misc;]".. --miscellaneous
|
||||
tab(name, "misc") ..
|
||||
"tooltip[misc;Miscellaneous]"..
|
||||
"item_image_button[9.19,0;1,1;mcl_compass:compass;nix;]".. --search
|
||||
|
|
|
@ -138,16 +138,16 @@ local dispenserdef = {
|
|||
stack:take_item()
|
||||
inv:set_stack("main", stack_id, stack)
|
||||
end
|
||||
elseif iname == "bucket:bucket_empty" then
|
||||
elseif iname == "mcl_buckets:bucket_empty" then
|
||||
-- Fill empty bucket with liquid or drop bucket if no liquid
|
||||
local collect_liquid = false
|
||||
local bucket_id
|
||||
if dropnode.name == "mcl_core:water_source" then
|
||||
collect_liquid = true
|
||||
bucket_id = "bucket:bucket_water"
|
||||
bucket_id = "mcl_buckets:bucket_water"
|
||||
elseif dropnode.name == "mcl_core:lava_source" then
|
||||
collect_liquid = true
|
||||
bucket_id = "bucket:bucket_lava"
|
||||
bucket_id = "mcl_buckets:bucket_lava"
|
||||
end
|
||||
if collect_liquid then
|
||||
minetest.set_node(droppos, {name="air"})
|
||||
|
@ -170,20 +170,20 @@ local dispenserdef = {
|
|||
stack:take_item()
|
||||
inv:set_stack("main", stack_id, stack)
|
||||
end
|
||||
elseif iname == "bucket:bucket_water" or iname == "bucket:bucket_lava" then
|
||||
elseif iname == "mcl_buckets:bucket_water" or iname == "mcl_buckets:bucket_lava" then
|
||||
-- Place water/lava source
|
||||
if dropnodedef.buildable_to then
|
||||
if iname == "bucket:bucket_water" then
|
||||
if iname == "mcl_buckets:bucket_water" then
|
||||
minetest.set_node(droppos, {name = "mcl_core:water_source"})
|
||||
elseif iname == "bucket:bucket_lava" then
|
||||
elseif iname == "mcl_buckets:bucket_lava" then
|
||||
minetest.set_node(droppos, {name = "mcl_core:lava_source"})
|
||||
end
|
||||
|
||||
stack:take_item()
|
||||
inv:set_stack("main", stack_id, stack)
|
||||
|
||||
if inv:room_for_item("main", "bucket:bucket_empty") then
|
||||
inv:add_item("main", "bucket:bucket_empty")
|
||||
if inv:room_for_item("main", "mcl_buckets:bucket_empty") then
|
||||
inv:add_item("main", "mcl_buckets:bucket_empty")
|
||||
else
|
||||
minetest.add_item(droppos, dropitem)
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Minetest 0.4 mod: bucket
|
||||
=========================
|
||||
Bucket mod.
|
||||
Originally taken from Minetest Game, adapted for MineClone 2.
|
||||
|
||||
License of source code:
|
||||
-----------------------
|
|
@ -3,16 +3,16 @@
|
|||
|
||||
local LIQUID_MAX = 8 --The number of water levels when liquid_finite is enabled
|
||||
|
||||
minetest.register_alias("bucket", "bucket:bucket_empty")
|
||||
minetest.register_alias("bucket_water", "bucket:bucket_water")
|
||||
minetest.register_alias("bucket_lava", "bucket:bucket_lava")
|
||||
minetest.register_alias("bucket:bucket_empty", "mcl_buckets:bucket_empty")
|
||||
minetest.register_alias("bucket:bucket_water", "mcl_buckets:bucket_water")
|
||||
minetest.register_alias("bucket:bucket_lava", "mcl_buckets:bucket_lava")
|
||||
|
||||
local mod_doc = minetest.get_modpath("doc")
|
||||
local mod_mcl_core = minetest.get_modpath("mcl_core")
|
||||
|
||||
if mod_mcl_core then
|
||||
minetest.register_craft({
|
||||
output = 'bucket:bucket_empty 1',
|
||||
output = 'mcl_buckets:bucket_empty 1',
|
||||
recipe = {
|
||||
{'mcl_core:iron_ingot', '', 'mcl_core:iron_ingot'},
|
||||
{'', 'mcl_core:iron_ingot', ''},
|
||||
|
@ -20,8 +20,8 @@ if mod_mcl_core then
|
|||
})
|
||||
end
|
||||
|
||||
bucket = {}
|
||||
bucket.liquids = {}
|
||||
mcl_buckets = {}
|
||||
mcl_buckets.liquids = {}
|
||||
|
||||
-- Sound helper functions for placing and taking liquids
|
||||
local sound_place = function(itemname, pos)
|
||||
|
@ -44,13 +44,13 @@ end
|
|||
-- itemname = name of the new bucket item (or nil if liquid is not takeable)
|
||||
-- inventory_image = texture of the new bucket item (ignored if itemname == nil)
|
||||
-- This function can be called from any mod (that depends on bucket).
|
||||
function bucket.register_liquid(source, flowing, itemname, inventory_image, name, longdesc, usagehelp)
|
||||
bucket.liquids[source] = {
|
||||
function mcl_buckets.register_liquid(source, flowing, itemname, inventory_image, name, longdesc, usagehelp)
|
||||
mcl_buckets.liquids[source] = {
|
||||
source = source,
|
||||
flowing = flowing,
|
||||
itemname = itemname,
|
||||
}
|
||||
bucket.liquids[flowing] = bucket.liquids[source]
|
||||
mcl_buckets.liquids[flowing] = mcl_buckets.liquids[source]
|
||||
|
||||
if itemname ~= nil then
|
||||
minetest.register_craftitem(itemname, {
|
||||
|
@ -98,7 +98,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
if not fullness then fullness = LIQUID_MAX end
|
||||
local item = itemstack:get_name()
|
||||
|
||||
if item == "bucket:bucket_water" and
|
||||
if item == "mcl_buckets:bucket_water" and
|
||||
(nn == "mcl_cauldrons:cauldron" or
|
||||
nn == "mcl_cauldrons:cauldron_1" or
|
||||
nn == "mcl_cauldrons:cauldron_2") then
|
||||
|
@ -106,7 +106,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_3"})
|
||||
|
||||
sound_place("mcl_core:water_source", pos)
|
||||
elseif item == "bucket:bucket_water" and nn == "mcl_cauldrons:cauldron_3" then
|
||||
elseif item == "mcl_buckets:bucket_water" and nn == "mcl_cauldrons:cauldron_3" then
|
||||
sound_place("mcl_core:water_source", pos)
|
||||
elseif minetest.registered_nodes[nn] and minetest.registered_nodes[nn].buildable_to then
|
||||
-- buildable; replace the node
|
||||
|
@ -141,7 +141,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
if not minetest.setting_getbool("creative_mode") then
|
||||
-- Add empty bucket and put it into inventory, if possible.
|
||||
-- Drop empty bucket otherwise.
|
||||
local new_bucket = ItemStack("bucket:bucket_empty")
|
||||
local new_bucket = ItemStack("mcl_buckets:bucket_empty")
|
||||
if itemstack:get_count() == 1 then
|
||||
return new_bucket
|
||||
else
|
||||
|
@ -162,7 +162,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
end
|
||||
end
|
||||
|
||||
minetest.register_craftitem("bucket:bucket_empty", {
|
||||
minetest.register_craftitem("mcl_buckets:bucket_empty", {
|
||||
description = "Empty Bucket",
|
||||
_doc_items_longdesc = "A bucket can be used to collect and release liquids.",
|
||||
_doc_items_usagehelp = "Punch a liquid source to collect the liquid. With the filled bucket, you can right-click somewhere to empty the bucket which will create a liquid source at the position you've clicked at.",
|
||||
|
@ -186,7 +186,7 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
|||
end
|
||||
|
||||
-- Check if pointing to a liquid source
|
||||
liquiddef = bucket.liquids[nn]
|
||||
liquiddef = mcl_buckets.liquids[nn]
|
||||
local new_bucket
|
||||
if liquiddef ~= nil and liquiddef.itemname ~= nil and (nn == liquiddef.source or
|
||||
(nn == liquiddef.flowing and minetest.setting_getbool("liquid_finite"))) then
|
||||
|
@ -207,7 +207,7 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
|||
-- Take water out of full cauldron
|
||||
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron"})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
new_bucket = ItemStack("bucket:bucket_water")
|
||||
new_bucket = ItemStack("mcl_buckets:bucket_water")
|
||||
end
|
||||
sound_take("mcl_core:water_source", pointed_thing.under)
|
||||
end
|
||||
|
@ -234,20 +234,20 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
|||
})
|
||||
|
||||
if mod_mcl_core then
|
||||
bucket.register_liquid(
|
||||
mcl_buckets.register_liquid(
|
||||
"mcl_core:water_source",
|
||||
"mcl_core:water_flowing",
|
||||
"bucket:bucket_water",
|
||||
"mcl_buckets:bucket_water",
|
||||
"bucket_water.png",
|
||||
"Water Bucket",
|
||||
"A bucket can be used to collect and release liquids. This one is filled with water.",
|
||||
"Right-click on any block to empty the bucket and put a water source on this spot."
|
||||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
mcl_buckets.register_liquid(
|
||||
"mcl_core:lava_source",
|
||||
"mcl_core:lava_flowing",
|
||||
"bucket:bucket_lava",
|
||||
"mcl_buckets:bucket_lava",
|
||||
"bucket_lava.png",
|
||||
"Lava Bucket",
|
||||
"A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.",
|
||||
|
@ -257,7 +257,7 @@ end
|
|||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "bucket:bucket_lava",
|
||||
recipe = "mcl_buckets:bucket_lava",
|
||||
burntime = 1000,
|
||||
replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}},
|
||||
replacements = {{"mcl_buckets:bucket_lava", "mcl_buckets:bucket_empty"}},
|
||||
})
|
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
|
@ -1,7 +1,7 @@
|
|||
mcl_core
|
||||
mcl_sounds
|
||||
mcl_hunger
|
||||
bucket
|
||||
mcl_buckets
|
||||
mcl_farming
|
||||
mcl_mobitems
|
||||
doc?
|
||||
|
|
|
@ -21,9 +21,9 @@ minetest.register_craft({
|
|||
{'mcl_farming:wheat_item', 'mcl_farming:wheat_item', 'mcl_farming:wheat_item'},
|
||||
},
|
||||
replacements = {
|
||||
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
|
||||
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
|
||||
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
|
||||
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
|
||||
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
|
||||
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
mcl_core
|
||||
mcl_sounds
|
||||
bucket
|
||||
mcl_wool
|
||||
mcl_torches
|
||||
weather_pack
|
||||
|
|
|
@ -69,7 +69,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
|||
local inv = meta:get_inventory()
|
||||
if listname == "fuel" then
|
||||
-- Special case: empty bucket (not a fuel, but used for sponge drying)
|
||||
if stack:get_name() == "bucket:bucket_empty" then
|
||||
if stack:get_name() == "mcl_buckets:bucket_empty" then
|
||||
if inv:get_stack(listname, index):get_count() == 0 then
|
||||
return 1
|
||||
else
|
||||
|
@ -195,8 +195,8 @@ local function furnace_node_timer(pos, elapsed)
|
|||
|
||||
-- Unique recipe: Put water into empty bucket after cooking wet sponge
|
||||
if srclist[1]:get_name() == "mcl_sponges:sponge_wet" then
|
||||
if inv:get_stack("fuel", 1):get_name() == "bucket:bucket_empty" then
|
||||
inv:set_stack("fuel", 1, "bucket:bucket_water")
|
||||
if inv:get_stack("fuel", 1):get_name() == "mcl_buckets:bucket_empty" then
|
||||
inv:set_stack("fuel", 1, "mcl_buckets:bucket_water")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -258,7 +258,7 @@ end
|
|||
-- Returns true if itemstack is fuel, but not for lava bucket if destination already has one
|
||||
local is_transferrable_fuel = function(itemstack, src_inventory, src_list, dst_inventory, dst_list)
|
||||
if mcl_util.is_fuel(itemstack) then
|
||||
if itemstack:get_name() == "bucket:bucket_lava" then
|
||||
if itemstack:get_name() == "mcl_buckets:bucket_lava" then
|
||||
return dst_inventory:is_empty(dst_list)
|
||||
else
|
||||
return true
|
||||
|
|
|
@ -133,7 +133,7 @@ minetest.register_craftitem("mcl_mobitems:cooked_rabbit", {
|
|||
})
|
||||
|
||||
local drink_milk = function(itemstack, player, pointed_thing)
|
||||
local bucket = minetest.do_item_eat(0, "bucket:bucket_empty", itemstack, player, pointed_thing)
|
||||
local bucket = minetest.do_item_eat(0, "mcl_buckets:bucket_empty", itemstack, player, pointed_thing)
|
||||
-- Check if we were allowed to drink this (eat delay check)
|
||||
if bucket:get_name() ~= "mcl_mobitems:milk_bucket" then
|
||||
mcl_hunger.stop_poison(player)
|
||||
|
|
|
@ -22,9 +22,10 @@ wieldview.transform = {
|
|||
["mcl_flowers:oxeye_daisy"]="R270",
|
||||
["mcl_flowers:fern"]="R270",
|
||||
["mcl_flowers:tallgrass"]="R270",
|
||||
["bucket:bucket_empty"]="R270",
|
||||
["bucket:bucket_water"]="R270",
|
||||
["bucket:bucket_lava"]="R270",
|
||||
["mcl_buckets:bucket_empty"]="R270",
|
||||
["mcl_buckets:bucket_water"]="R270",
|
||||
["mcl_buckets:bucket_lava"]="R270",
|
||||
["mcl_mobitems:milk_bucket"]="R270",
|
||||
["mcl_potions:glass_bottle"]="R270",
|
||||
["mcl_potions:potion_water"]="R270",
|
||||
["mcl_potions:potion_awkward"]="R270",
|
||||
|
|
|
@ -37,7 +37,7 @@ local get_loot = function()
|
|||
{ itemstring = "mcl_farming:melon_seeds", weight = 10, amount_min = 2, amount_max = 4 },
|
||||
{ itemstring = "mcl_farming:pumpkin_seeds", weight = 10, amount_min = 2, amount_max = 4 },
|
||||
{ itemstring = "mcl_core:iron_ingot", weight = 10, amount_min = 1, amount_max = 4 },
|
||||
{ itemstring = "bucket:bucket_empty", weight = 10 },
|
||||
{ itemstring = "mcl_buckets:bucket_empty", weight = 10 },
|
||||
{ itemstring = "mcl_core:gold_ingot", weight = 5, amount_min = 1, amount_max = 4 },
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue