1
0
Fork 0

Rename mod: bucket to mcl_buckets

objects
Wuzzy 2017-08-03 16:36:55 +02:00
parent 1d075f849f
commit ee38a7af9d
18 changed files with 48 additions and 48 deletions

View File

@ -44,7 +44,7 @@ mobs_mc.override.items = {
shears = "mcl_tools:shears", shears = "mcl_tools:shears",
mushroom_red = "mcl_mushrooms:mushroom_red", mushroom_red = "mcl_mushrooms:mushroom_red",
bucket = "bucket:bucket_empty", bucket = "mcl_buckets:bucket_empty",
grass_block = "mcl_core:dirt_with_grass", grass_block = "mcl_core:dirt_with_grass",
string = "mcl_mobitems:string", string = "mcl_mobitems:string",
stick = "mcl_core:stick", stick = "mcl_core:stick",

View File

@ -45,7 +45,7 @@ local group_stereotypes = {
wool = "mcl_wool:white", wool = "mcl_wool:white",
carpet = "mcl_wool:white_carpet", carpet = "mcl_wool:white_carpet",
dye = "mcl_dye:red", dye = "mcl_dye:red",
water_bucket = "bucket:bucket_water", water_bucket = "mcl_buckets:bucket_water",
flower = "mcl_flowers:dandelion", flower = "mcl_flowers:dandelion",
mushroom = "mcl_mushrooms:mushroom_brown", mushroom = "mcl_mushrooms:mushroom_brown",
wood_slab = "mcl_stairs:slab_wood", wood_slab = "mcl_stairs:slab_wood",

View File

@ -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 "item_image_button[3.693,0;1,1;mcl_minecarts:golden_rail;rail;]".. --transportation
tab(name, "rail") .. tab(name, "rail") ..
"tooltip[rail;Transportation]".. "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") .. tab(name, "misc") ..
"tooltip[misc;Miscellaneous]".. "tooltip[misc;Miscellaneous]"..
"item_image_button[9.19,0;1,1;mcl_compass:compass;nix;]".. --search "item_image_button[9.19,0;1,1;mcl_compass:compass;nix;]".. --search

View File

@ -138,16 +138,16 @@ local dispenserdef = {
stack:take_item() stack:take_item()
inv:set_stack("main", stack_id, stack) inv:set_stack("main", stack_id, stack)
end 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 -- Fill empty bucket with liquid or drop bucket if no liquid
local collect_liquid = false local collect_liquid = false
local bucket_id local bucket_id
if dropnode.name == "mcl_core:water_source" then if dropnode.name == "mcl_core:water_source" then
collect_liquid = true collect_liquid = true
bucket_id = "bucket:bucket_water" bucket_id = "mcl_buckets:bucket_water"
elseif dropnode.name == "mcl_core:lava_source" then elseif dropnode.name == "mcl_core:lava_source" then
collect_liquid = true collect_liquid = true
bucket_id = "bucket:bucket_lava" bucket_id = "mcl_buckets:bucket_lava"
end end
if collect_liquid then if collect_liquid then
minetest.set_node(droppos, {name="air"}) minetest.set_node(droppos, {name="air"})
@ -170,20 +170,20 @@ local dispenserdef = {
stack:take_item() stack:take_item()
inv:set_stack("main", stack_id, stack) inv:set_stack("main", stack_id, stack)
end 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 -- Place water/lava source
if dropnodedef.buildable_to then 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"}) 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"}) minetest.set_node(droppos, {name = "mcl_core:lava_source"})
end end
stack:take_item() stack:take_item()
inv:set_stack("main", stack_id, stack) inv:set_stack("main", stack_id, stack)
if inv:room_for_item("main", "bucket:bucket_empty") then if inv:room_for_item("main", "mcl_buckets:bucket_empty") then
inv:add_item("main", "bucket:bucket_empty") inv:add_item("main", "mcl_buckets:bucket_empty")
else else
minetest.add_item(droppos, dropitem) minetest.add_item(droppos, dropitem)
end end

View File

@ -1,5 +1,5 @@
Minetest 0.4 mod: bucket Bucket mod.
========================= Originally taken from Minetest Game, adapted for MineClone 2.
License of source code: License of source code:
----------------------- -----------------------

View File

@ -3,16 +3,16 @@
local LIQUID_MAX = 8 --The number of water levels when liquid_finite is enabled 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:bucket_empty", "mcl_buckets:bucket_empty")
minetest.register_alias("bucket_water", "bucket:bucket_water") minetest.register_alias("bucket:bucket_water", "mcl_buckets:bucket_water")
minetest.register_alias("bucket_lava", "bucket:bucket_lava") minetest.register_alias("bucket:bucket_lava", "mcl_buckets:bucket_lava")
local mod_doc = minetest.get_modpath("doc") local mod_doc = minetest.get_modpath("doc")
local mod_mcl_core = minetest.get_modpath("mcl_core") local mod_mcl_core = minetest.get_modpath("mcl_core")
if mod_mcl_core then if mod_mcl_core then
minetest.register_craft({ minetest.register_craft({
output = 'bucket:bucket_empty 1', output = 'mcl_buckets:bucket_empty 1',
recipe = { recipe = {
{'mcl_core:iron_ingot', '', 'mcl_core:iron_ingot'}, {'mcl_core:iron_ingot', '', 'mcl_core:iron_ingot'},
{'', 'mcl_core:iron_ingot', ''}, {'', 'mcl_core:iron_ingot', ''},
@ -20,8 +20,8 @@ if mod_mcl_core then
}) })
end end
bucket = {} mcl_buckets = {}
bucket.liquids = {} mcl_buckets.liquids = {}
-- Sound helper functions for placing and taking liquids -- Sound helper functions for placing and taking liquids
local sound_place = function(itemname, pos) 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) -- 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) -- inventory_image = texture of the new bucket item (ignored if itemname == nil)
-- This function can be called from any mod (that depends on bucket). -- This function can be called from any mod (that depends on bucket).
function bucket.register_liquid(source, flowing, itemname, inventory_image, name, longdesc, usagehelp) function mcl_buckets.register_liquid(source, flowing, itemname, inventory_image, name, longdesc, usagehelp)
bucket.liquids[source] = { mcl_buckets.liquids[source] = {
source = source, source = source,
flowing = flowing, flowing = flowing,
itemname = itemname, itemname = itemname,
} }
bucket.liquids[flowing] = bucket.liquids[source] mcl_buckets.liquids[flowing] = mcl_buckets.liquids[source]
if itemname ~= nil then if itemname ~= nil then
minetest.register_craftitem(itemname, { 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 if not fullness then fullness = LIQUID_MAX end
local item = itemstack:get_name() 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" or
nn == "mcl_cauldrons:cauldron_1" or nn == "mcl_cauldrons:cauldron_1" or
nn == "mcl_cauldrons:cauldron_2") then 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"}) minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_3"})
sound_place("mcl_core:water_source", pos) 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) sound_place("mcl_core:water_source", pos)
elseif minetest.registered_nodes[nn] and minetest.registered_nodes[nn].buildable_to then elseif minetest.registered_nodes[nn] and minetest.registered_nodes[nn].buildable_to then
-- buildable; replace the node -- 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 if not minetest.setting_getbool("creative_mode") then
-- Add empty bucket and put it into inventory, if possible. -- Add empty bucket and put it into inventory, if possible.
-- Drop empty bucket otherwise. -- 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 if itemstack:get_count() == 1 then
return new_bucket return new_bucket
else else
@ -162,7 +162,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
end end
end end
minetest.register_craftitem("bucket:bucket_empty", { minetest.register_craftitem("mcl_buckets:bucket_empty", {
description = "Empty Bucket", description = "Empty Bucket",
_doc_items_longdesc = "A bucket can be used to collect and release liquids.", _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.", _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 end
-- Check if pointing to a liquid source -- Check if pointing to a liquid source
liquiddef = bucket.liquids[nn] liquiddef = mcl_buckets.liquids[nn]
local new_bucket local new_bucket
if liquiddef ~= nil and liquiddef.itemname ~= nil and (nn == liquiddef.source or if liquiddef ~= nil and liquiddef.itemname ~= nil and (nn == liquiddef.source or
(nn == liquiddef.flowing and minetest.setting_getbool("liquid_finite"))) then (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 -- Take water out of full cauldron
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron"}) minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron"})
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
new_bucket = ItemStack("bucket:bucket_water") new_bucket = ItemStack("mcl_buckets:bucket_water")
end end
sound_take("mcl_core:water_source", pointed_thing.under) sound_take("mcl_core:water_source", pointed_thing.under)
end end
@ -234,20 +234,20 @@ minetest.register_craftitem("bucket:bucket_empty", {
}) })
if mod_mcl_core then if mod_mcl_core then
bucket.register_liquid( mcl_buckets.register_liquid(
"mcl_core:water_source", "mcl_core:water_source",
"mcl_core:water_flowing", "mcl_core:water_flowing",
"bucket:bucket_water", "mcl_buckets:bucket_water",
"bucket_water.png", "bucket_water.png",
"Water Bucket", "Water Bucket",
"A bucket can be used to collect and release liquids. This one is filled with water.", "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." "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_source",
"mcl_core:lava_flowing", "mcl_core:lava_flowing",
"bucket:bucket_lava", "mcl_buckets:bucket_lava",
"bucket_lava.png", "bucket_lava.png",
"Lava Bucket", "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.", "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({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "bucket:bucket_lava", recipe = "mcl_buckets:bucket_lava",
burntime = 1000, burntime = 1000,
replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}}, replacements = {{"mcl_buckets:bucket_lava", "mcl_buckets:bucket_empty"}},
}) })

View File

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 211 B

View File

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 250 B

View File

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

View File

@ -1,7 +1,7 @@
mcl_core mcl_core
mcl_sounds mcl_sounds
mcl_hunger mcl_hunger
bucket mcl_buckets
mcl_farming mcl_farming
mcl_mobitems mcl_mobitems
doc? doc?

View File

@ -21,9 +21,9 @@ minetest.register_craft({
{'mcl_farming:wheat_item', 'mcl_farming:wheat_item', 'mcl_farming:wheat_item'}, {'mcl_farming:wheat_item', 'mcl_farming:wheat_item', 'mcl_farming:wheat_item'},
}, },
replacements = { replacements = {
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"}, {"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"}, {"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"}, {"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
}, },
}) })

View File

@ -1,6 +1,5 @@
mcl_core mcl_core
mcl_sounds mcl_sounds
bucket
mcl_wool mcl_wool
mcl_torches mcl_torches
weather_pack weather_pack

View File

@ -69,7 +69,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
local inv = meta:get_inventory() local inv = meta:get_inventory()
if listname == "fuel" then if listname == "fuel" then
-- Special case: empty bucket (not a fuel, but used for sponge drying) -- 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 if inv:get_stack(listname, index):get_count() == 0 then
return 1 return 1
else else
@ -195,8 +195,8 @@ local function furnace_node_timer(pos, elapsed)
-- Unique recipe: Put water into empty bucket after cooking wet sponge -- Unique recipe: Put water into empty bucket after cooking wet sponge
if srclist[1]:get_name() == "mcl_sponges:sponge_wet" then if srclist[1]:get_name() == "mcl_sponges:sponge_wet" then
if inv:get_stack("fuel", 1):get_name() == "bucket:bucket_empty" then if inv:get_stack("fuel", 1):get_name() == "mcl_buckets:bucket_empty" then
inv:set_stack("fuel", 1, "bucket:bucket_water") inv:set_stack("fuel", 1, "mcl_buckets:bucket_water")
end end
end end
end end

View File

@ -258,7 +258,7 @@ end
-- Returns true if itemstack is fuel, but not for lava bucket if destination already has one -- 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) local is_transferrable_fuel = function(itemstack, src_inventory, src_list, dst_inventory, dst_list)
if mcl_util.is_fuel(itemstack) then 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) return dst_inventory:is_empty(dst_list)
else else
return true return true

View File

@ -133,7 +133,7 @@ minetest.register_craftitem("mcl_mobitems:cooked_rabbit", {
}) })
local drink_milk = function(itemstack, player, pointed_thing) 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) -- Check if we were allowed to drink this (eat delay check)
if bucket:get_name() ~= "mcl_mobitems:milk_bucket" then if bucket:get_name() ~= "mcl_mobitems:milk_bucket" then
mcl_hunger.stop_poison(player) mcl_hunger.stop_poison(player)

View File

@ -22,9 +22,10 @@ wieldview.transform = {
["mcl_flowers:oxeye_daisy"]="R270", ["mcl_flowers:oxeye_daisy"]="R270",
["mcl_flowers:fern"]="R270", ["mcl_flowers:fern"]="R270",
["mcl_flowers:tallgrass"]="R270", ["mcl_flowers:tallgrass"]="R270",
["bucket:bucket_empty"]="R270", ["mcl_buckets:bucket_empty"]="R270",
["bucket:bucket_water"]="R270", ["mcl_buckets:bucket_water"]="R270",
["bucket:bucket_lava"]="R270", ["mcl_buckets:bucket_lava"]="R270",
["mcl_mobitems:milk_bucket"]="R270",
["mcl_potions:glass_bottle"]="R270", ["mcl_potions:glass_bottle"]="R270",
["mcl_potions:potion_water"]="R270", ["mcl_potions:potion_water"]="R270",
["mcl_potions:potion_awkward"]="R270", ["mcl_potions:potion_awkward"]="R270",

View File

@ -37,7 +37,7 @@ local get_loot = function()
{ itemstring = "mcl_farming:melon_seeds", weight = 10, amount_min = 2, amount_max = 4 }, { 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_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 = "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 }, { itemstring = "mcl_core:gold_ingot", weight = 5, amount_min = 1, amount_max = 4 },
}, },
}, },