From ee38a7af9d862f8bded4b10108f239ef025a02de Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 3 Aug 2017 16:36:55 +0200 Subject: [PATCH] Rename mod: bucket to mcl_buckets --- mods/ENTITIES/mobs_mc_gameconfig/init.lua | 2 +- mods/HELP/mcl_craftguide/init.lua | 2 +- mods/HUD/mcl_inventory/creative.lua | 2 +- mods/ITEMS/REDSTONE/mcl_dispensers/init.lua | 16 +++---- mods/ITEMS/{bucket => mcl_buckets}/README.txt | 4 +- .../ITEMS/{bucket => mcl_buckets}/depends.txt | 0 mods/ITEMS/{bucket => mcl_buckets}/init.lua | 42 +++++++++--------- .../textures/bucket.png | Bin .../textures/bucket_lava.png | Bin .../textures/bucket_water.png | Bin mods/ITEMS/mcl_cake/depends.txt | 2 +- mods/ITEMS/mcl_cake/init.lua | 6 +-- mods/ITEMS/mcl_farming/depends.txt | 1 - mods/ITEMS/mcl_furnaces/init.lua | 6 +-- mods/ITEMS/mcl_hoppers/init.lua | 2 +- mods/ITEMS/mcl_mobitems/init.lua | 2 +- .../minetest-3d_armor/wieldview/transform.lua | 7 +-- mods/MAPGEN/mcl_dungeons/init.lua | 2 +- 18 files changed, 48 insertions(+), 48 deletions(-) rename mods/ITEMS/{bucket => mcl_buckets}/README.txt (86%) rename mods/ITEMS/{bucket => mcl_buckets}/depends.txt (100%) rename mods/ITEMS/{bucket => mcl_buckets}/init.lua (88%) rename mods/ITEMS/{bucket => mcl_buckets}/textures/bucket.png (100%) rename mods/ITEMS/{bucket => mcl_buckets}/textures/bucket_lava.png (100%) rename mods/ITEMS/{bucket => mcl_buckets}/textures/bucket_water.png (100%) diff --git a/mods/ENTITIES/mobs_mc_gameconfig/init.lua b/mods/ENTITIES/mobs_mc_gameconfig/init.lua index 7165844893..dbbb4523f1 100644 --- a/mods/ENTITIES/mobs_mc_gameconfig/init.lua +++ b/mods/ENTITIES/mobs_mc_gameconfig/init.lua @@ -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", diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 10680426e3..924ee608bd 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -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", diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index a52885fe1d..536d44ccbb 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -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 diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index 480641a864..b6287b985a 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -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 diff --git a/mods/ITEMS/bucket/README.txt b/mods/ITEMS/mcl_buckets/README.txt similarity index 86% rename from mods/ITEMS/bucket/README.txt rename to mods/ITEMS/mcl_buckets/README.txt index 0d63b4cf55..06862d5894 100644 --- a/mods/ITEMS/bucket/README.txt +++ b/mods/ITEMS/mcl_buckets/README.txt @@ -1,5 +1,5 @@ -Minetest 0.4 mod: bucket -========================= +Bucket mod. +Originally taken from Minetest Game, adapted for MineClone 2. License of source code: ----------------------- diff --git a/mods/ITEMS/bucket/depends.txt b/mods/ITEMS/mcl_buckets/depends.txt similarity index 100% rename from mods/ITEMS/bucket/depends.txt rename to mods/ITEMS/mcl_buckets/depends.txt diff --git a/mods/ITEMS/bucket/init.lua b/mods/ITEMS/mcl_buckets/init.lua similarity index 88% rename from mods/ITEMS/bucket/init.lua rename to mods/ITEMS/mcl_buckets/init.lua index ab2e58deb8..4f7e6a82be 100644 --- a/mods/ITEMS/bucket/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -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"}}, }) diff --git a/mods/ITEMS/bucket/textures/bucket.png b/mods/ITEMS/mcl_buckets/textures/bucket.png similarity index 100% rename from mods/ITEMS/bucket/textures/bucket.png rename to mods/ITEMS/mcl_buckets/textures/bucket.png diff --git a/mods/ITEMS/bucket/textures/bucket_lava.png b/mods/ITEMS/mcl_buckets/textures/bucket_lava.png similarity index 100% rename from mods/ITEMS/bucket/textures/bucket_lava.png rename to mods/ITEMS/mcl_buckets/textures/bucket_lava.png diff --git a/mods/ITEMS/bucket/textures/bucket_water.png b/mods/ITEMS/mcl_buckets/textures/bucket_water.png similarity index 100% rename from mods/ITEMS/bucket/textures/bucket_water.png rename to mods/ITEMS/mcl_buckets/textures/bucket_water.png diff --git a/mods/ITEMS/mcl_cake/depends.txt b/mods/ITEMS/mcl_cake/depends.txt index e09b019949..1ed0ada156 100644 --- a/mods/ITEMS/mcl_cake/depends.txt +++ b/mods/ITEMS/mcl_cake/depends.txt @@ -1,7 +1,7 @@ mcl_core mcl_sounds mcl_hunger -bucket +mcl_buckets mcl_farming mcl_mobitems doc? diff --git a/mods/ITEMS/mcl_cake/init.lua b/mods/ITEMS/mcl_cake/init.lua index 76693f1018..4683ce7571 100644 --- a/mods/ITEMS/mcl_cake/init.lua +++ b/mods/ITEMS/mcl_cake/init.lua @@ -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"}, }, }) diff --git a/mods/ITEMS/mcl_farming/depends.txt b/mods/ITEMS/mcl_farming/depends.txt index 9c412baf22..7cdd8c91de 100644 --- a/mods/ITEMS/mcl_farming/depends.txt +++ b/mods/ITEMS/mcl_farming/depends.txt @@ -1,6 +1,5 @@ mcl_core mcl_sounds -bucket mcl_wool mcl_torches weather_pack diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index 66c8a0b048..3001972aba 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -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 diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index 7f88b578ce..ea2aacde71 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -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 diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua index 5b07112ff6..b127be4b8a 100644 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ b/mods/ITEMS/mcl_mobitems/init.lua @@ -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) diff --git a/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua b/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua index 36815fdd17..26cfd62816 100644 --- a/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua +++ b/mods/ITEMS/minetest-3d_armor/wieldview/transform.lua @@ -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", diff --git a/mods/MAPGEN/mcl_dungeons/init.lua b/mods/MAPGEN/mcl_dungeons/init.lua index 760c10836d..205e81fe48 100644 --- a/mods/MAPGEN/mcl_dungeons/init.lua +++ b/mods/MAPGEN/mcl_dungeons/init.lua @@ -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 }, }, },