1
0
Fork 0

Separate white dye from bone meal.

* Add craftitem for ":mcl_bone_meal:bone_meal" to mcl_dye (temporarily.)
* Add crafting recipe for bone meal.
* Add texture for white dye item.
* Merge craftitem registration for "mcl_dye:white" with generic dyes.
* Add crafting recipe for white dye.
* Add legacy conversion recipe.
* Update dyes table.
* Update translations.
* Update mcl_crimson and sweet berry on_rightclick handlers.
* Update composter output, both as freestanding and to hoppers.
* Update bone block crafting recipes.
* Update tropical fish, cod and salmon mob drops.
water_footstep
kabou 2022-12-22 22:44:21 +01:00 committed by Gitea
parent 7d8fdc6ec3
commit 92ee402971
18 changed files with 51 additions and 46 deletions

View File

@ -64,7 +64,7 @@ local cod = {
chance = 1, chance = 1,
min = 1, min = 1,
max = 1,}, max = 1,},
{name = "mcl_dye:white", {name = "mcl_bone_meal:bone_meal",
chance = 20, chance = 20,
min = 1, min = 1,
max = 1,}, max = 1,},

View File

@ -42,7 +42,7 @@ local salmon = {
chance = 1, chance = 1,
min = 1, min = 1,
max = 1,}, max = 1,},
{name = "mcl_dye:white", {name = "mcl_bone_meal:bone_meal",
chance = 20, chance = 20,
min = 1, min = 1,
max = 1,}, max = 1,},

View File

@ -87,7 +87,7 @@ local tropical_fish = {
chance = 1, chance = 1,
min = 1, min = 1,
max = 1,}, max = 1,},
{name = "mcl_dye:white", {name = "mcl_bone_meal:bone_meal",
chance = 20, chance = 20,
min = 1, min = 1,
max = 1,}, max = 1,},

View File

@ -138,8 +138,8 @@ local function composter_harvest(pos, node, player, itemstack, pointed_thing)
end end
-- reset ready type composter to empty type -- reset ready type composter to empty type
swap_node(pos, {name="mcl_composters:composter"}) swap_node(pos, {name="mcl_composters:composter"})
-- spawn bone meal item (wtf dye?! is this how they make white cocoa) -- spawn bone meal item
add_item(pos, "mcl_dye:white") add_item(pos, "mcl_bone_meal:bone_meal")
-- TODO play some sounds -- TODO play some sounds
return itemstack return itemstack
end end

View File

@ -126,14 +126,14 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "mcl_core:bone_block", output = "mcl_core:bone_block",
recipe = { recipe = {
{ "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" }, { "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" },
{ "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" }, { "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" },
{ "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" }, { "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" },
}, },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_dye:white 9", output = "mcl_bone_meal:bone_meal 9",
recipe = { recipe = {
{ "mcl_core:bone_block" }, { "mcl_core:bone_block" },
}, },

View File

@ -82,7 +82,7 @@ minetest.register_node("mcl_crimson:warped_fungus", {
}, },
node_placement_prediction = "", node_placement_prediction = "",
on_rightclick = function(pos, node, pointed_thing, player, itemstack) on_rightclick = function(pos, node, pointed_thing, player, itemstack)
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then if pointed_thing:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5) local random = math.random(1, 5)
@ -129,7 +129,7 @@ minetest.register_node("mcl_crimson:twisting_vines", {
itemstack:take_item() itemstack:take_item()
end end
grow_vines(pos, 1, "mcl_crimson:twisting_vines") grow_vines(pos, 1, "mcl_crimson:twisting_vines")
elseif clicker:get_wielded_item():get_name() == "mcl_dye:white" then elseif clicker:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then
if not minetest.is_creative_enabled(clicker:get_player_name()) then if not minetest.is_creative_enabled(clicker:get_player_name()) then
itemstack:take_item() itemstack:take_item()
end end
@ -185,7 +185,7 @@ minetest.register_node("mcl_crimson:weeping_vines", {
itemstack:take_item() itemstack:take_item()
end end
grow_vines(pos, 1, "mcl_crimson:weeping_vines", -1) grow_vines(pos, 1, "mcl_crimson:weeping_vines", -1)
elseif clicker:get_wielded_item():get_name() == "mcl_dye:white" then elseif clicker:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then
if not minetest.is_creative_enabled(clicker:get_player_name()) then if not minetest.is_creative_enabled(clicker:get_player_name()) then
itemstack:take_item() itemstack:take_item()
end end
@ -421,7 +421,7 @@ minetest.register_node("mcl_crimson:crimson_fungus", {
}, },
node_placement_prediction = "", node_placement_prediction = "",
on_rightclick = function(pos, node, pointed_thing, player) on_rightclick = function(pos, node, pointed_thing, player)
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then if pointed_thing:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then
local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0)) local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0))
if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5) local random = math.random(1, 5)

View File

@ -67,7 +67,7 @@ local dyelocal = {}
-- This collection of colors is partly a historic thing, partly something else. -- This collection of colors is partly a historic thing, partly something else.
dyelocal.dyes = { dyelocal.dyes = {
{"white", "mcl_dye_white", S("Bone Meal"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, {"white", "mcl_dye_white", S("White Dye"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}},
{"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, {"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}},
{"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, {"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}},
{"black", "mcl_dye_black", S("Black Dye"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, {"black", "mcl_dye_black", S("Black Dye"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}},
@ -109,22 +109,19 @@ end
-- Define items -- Define items
for _, row in ipairs(dyelocal.dyes) do for _, row in ipairs(dyelocal.dyes) do
local name = row[1] local name = row[1]
-- White dye is defined explicitly below local img = row[2]
if name ~= "white" then local description = row[3]
local img = row[2] local groups = row[4]
local description = row[3] local item_name = "mcl_dye:"..name
local groups = row[4] local item_image = img..".png"
local item_name = "mcl_dye:"..name minetest.register_craftitem(item_name, {
local item_image = img..".png" inventory_image = item_image,
minetest.register_craftitem(item_name, { description = description,
inventory_image = item_image, _doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."),
description = description, _doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."),
_doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."), groups = groups,
_doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."), stack_max = 64,
groups = groups, })
stack_max = 64,
})
end
end end
-- Bone Meal -- Bone Meal
@ -381,14 +378,13 @@ end
mcl_dye.apply_bone_meal = apply_bone_meal mcl_dye.apply_bone_meal = apply_bone_meal
minetest.register_craftitem("mcl_dye:white", { minetest.register_craftitem(":mcl_bone_meal:bone_meal", {
inventory_image = "mcl_dye_white.png", inventory_image = "mcl_bone_meal_bone_meal.png",
description = S("Bone Meal"), description = S("Bone Meal"),
_tt_help = S("Speeds up plant growth"), _tt_help = S("Speeds up plant growth"),
_doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."), _doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."),
_doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."), _doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."),
stack_max = 64, stack_max = 64,
groups = dyelocal.dyes[1][4],
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
-- Use pointed node's on_rightclick function first, if present -- Use pointed node's on_rightclick function first, if present
local node = minetest.get_node(pointed_thing.under) local node = minetest.get_node(pointed_thing.under)
@ -421,6 +417,11 @@ minetest.register_craftitem("mcl_dye:white", {
_dispense_into_walkable = true _dispense_into_walkable = true
}) })
minetest.register_craft({
output = "mcl_bone_meal:bone_meal 3",
recipe = {{"mcl_mobitems:bone"}},
})
-- Dye mixing -- Dye mixing
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
@ -487,6 +488,10 @@ minetest.register_craft({
}) })
-- Dye creation -- Dye creation
minetest.register_craft({
output = "mcl_dye:white",
recipe = {{"mcl_bone_meal:bone_meal"}},
})
minetest.register_craft({ minetest.register_craft({
output = "mcl_dye:black", output = "mcl_dye:black",
recipe = {{"mcl_mobitems:ink_sac"}}, recipe = {{"mcl_mobitems:ink_sac"}},
@ -565,13 +570,13 @@ minetest.register_craft({
recipe = "mcl_core:cactus", recipe = "mcl_core:cactus",
cooktime = 10, cooktime = 10,
}) })
minetest.register_craft({
output = "mcl_dye:white 3",
recipe = {{"mcl_mobitems:bone"}},
})
-- legacy item grace conversion recipes -- legacy item grace conversion recipes
minetest.register_craft({
output = "mcl_bone_meal:bone_meal",
recipe = {{"mcl_dye:white"}},
})
minetest.register_craft({ minetest.register_craft({
output = "mcl_mobitems:ink_sac", output = "mcl_mobitems:ink_sac",
recipe = {{"mcl_dye:black"}}, recipe = {{"mcl_dye:black"}},

View File

@ -1,5 +1,5 @@
# textdomain: mcl_dye # textdomain: mcl_dye
Bone Meal=Knochenmehl White Dye=Weißer Farbstoff
Light Grey Dye=Hellgrauer Farbstoff Light Grey Dye=Hellgrauer Farbstoff
Grey Dye=Grauer Farbstoff Grey Dye=Grauer Farbstoff
Black Dye=Schwarzer Farbstoff Black Dye=Schwarzer Farbstoff

View File

@ -1,5 +1,5 @@
# textdomain: mcl_dye # textdomain: mcl_dye
Bone Meal=Harina de hueso White Dye=Tinte blanca
Light Grey Dye=Tinte gris claro Light Grey Dye=Tinte gris claro
Grey Dye=Tinte gris Grey Dye=Tinte gris
Black Dye=Tinte negro Black Dye=Tinte negro

View File

@ -1,5 +1,5 @@
# textdomain: mcl_dye # textdomain: mcl_dye
Bone Meal=Poudre d'Os White Dye=Teinture Blanche
Light Grey Dye=Teinture Gris Clair Light Grey Dye=Teinture Gris Clair
Grey Dye=Teinture Gris Grey Dye=Teinture Gris
Black Dye=Teinture Noire Black Dye=Teinture Noire

View File

@ -1,5 +1,5 @@
# textdomain: mcl_dye # textdomain: mcl_dye
Bone Meal=Mączka kostna White Dye=Biały farba
Light Grey Dye=Jasnoszara farba Light Grey Dye=Jasnoszara farba
Grey Dye=Szara farba Grey Dye=Szara farba
Black Dye=Czarny farba Black Dye=Czarny farba

View File

@ -1,5 +1,5 @@
# textdomain: mcl_dye # textdomain: mcl_dye
Bone Meal=Костная мука White Dye=Белый краситель
Light Grey Dye=Светло-серый краситель Light Grey Dye=Светло-серый краситель
Grey Dye=Серый краситель Grey Dye=Серый краситель
Black Dye=Чёрный краситель Black Dye=Чёрный краситель

View File

@ -1,5 +1,5 @@
# textdomain: mcl_dye # textdomain: mcl_dye
Bone Meal=骨粉 White Dye=白色染料
Light Grey Dye=淺灰色染料 Light Grey Dye=淺灰色染料
Grey Dye=灰色染料 Grey Dye=灰色染料
Black Dye=黑色染料 Black Dye=黑色染料

View File

@ -1,5 +1,5 @@
# textdomain: mcl_dye # textdomain: mcl_dye
Bone Meal= White Dye=
Light Grey Dye= Light Grey Dye=
Grey Dye= Grey Dye=
Black Dye= Black Dye=

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 201 B

View File

@ -41,7 +41,7 @@ for i=0, 3 do
minetest.record_protection_violation(pos, pn) minetest.record_protection_violation(pos, pn)
return itemstack return itemstack
end end
if mcl_dye and clicker:get_wielded_item():get_name() == "mcl_dye:white" then if mcl_dye and clicker:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then
mcl_dye.apply_bone_meal({under=pos},clicker) mcl_dye.apply_bone_meal({under=pos},clicker)
itemstack:take_item() itemstack:take_item()
return return

View File

@ -612,7 +612,7 @@ if minetest.get_modpath("mcl_composters") then
minetest.swap_node(uppos, {name = "mcl_composters:composter"}) minetest.swap_node(uppos, {name = "mcl_composters:composter"})
inv:add_item("main", "mcl_dye:white") inv:add_item("main", "mcl_bone_meal:bone_meal")
end end
end, end,
}) })