Simplify water mixing rules in cauldron

This commit is contained in:
Wuzzy 2017-11-30 20:35:21 +01:00
parent e2a441fed1
commit 74d5da78a1
3 changed files with 14 additions and 13 deletions

@ -230,8 +230,7 @@ if mcl_weather.allow_abm then
elseif node.name == "mcl_cauldrons:cauldron_2" then
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_3"})
elseif node.name == "mcl_cauldrons:cauldron_1r" then
-- Intentional
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_2"})
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_2r"})
elseif node.name == "mcl_cauldrons:cauldron_2r" then
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_3r"})
end

@ -43,7 +43,7 @@ end
-- Empty cauldron
minetest.register_node("mcl_cauldrons:cauldron", {
description = "Cauldron",
_doc_items_longdesc = "Cauldrons are used to store water and slowly fill up under rain.",
_doc_items_longdesc = "Cauldrons are used to store water and slowly fill up under rain. They can also be used to wash off banners.",
_doc_items_usagehelp = "Place a water pucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water. Use an emblazoned banner on a cauldron with water to wash off its top layer.",
wield_image = "mcl_cauldrons_cauldron.png",
inventory_image = "mcl_cauldrons_cauldron.png",

@ -17,7 +17,7 @@ minetest.register_craft({
minetest.register_craftitem("mcl_potions:glass_bottle", {
description = "Glass Bottle",
_doc_items_longdesc = "A glass bottle is used as a container for potions and can be used to collect water directly.",
_doc_items_longdesc = "A glass bottle is used as a container for liquids and can be used to collect water directly.",
_doc_items_usagehelp = "To collect water, it on a cauldron with water (which removes a level of water) or any water source (which removes no water).",
inventory_image = "mcl_potions_potion_bottle_empty.png",
wield_image = "mcl_potions_potion_bottle_empty.png",
@ -102,7 +102,7 @@ minetest.register_craft( {
}
})
-- Tempalte function for creating images of filled potions
-- Template function for creating images of filled potions
-- - colorstring must be a ColorString of form “#RRGGBB”, e.g. “#0000FF” for blue.
-- - opacity is optional opacity from 0-255 (default: 127)
local potion_image = function(colorstring, opacity)
@ -112,13 +112,15 @@ local potion_image = function(colorstring, opacity)
return "mcl_potions_potion_bottle_drinkable.png^(mcl_potions_potion_overlay.png^[colorize:"..colorstring..":"..tostring(opacity)..")"
end
-- Cauldron fill up rules:
-- Adding any water increases the water level by 1, preserving the current water type
local cauldron_levels = {
-- start = { add water, add river water, take }
{ "", "_1", "_1r", nil },
{ "_1", "_2", "_2", "" },
{ "_2", "_3", "_3", "_1" },
{ "_1r", "_2", "_2r", "" },
{ "_2r", "_3r", "_3r", "_1r" },
-- start = { add water, add river water }
{ "", "_1", "_1r" },
{ "_1", "_2", "_2" },
{ "_2", "_3", "_3" },
{ "_1r", "_2r", "_2r" },
{ "_2r", "_3r", "_3r" },
}
local fill_cauldron = function(cauldron, water_type)
local base = "mcl_cauldrons:cauldron"
@ -138,7 +140,7 @@ end
minetest.register_craftitem("mcl_potions:potion_water", {
description = "Water Bottle",
_doc_items_longdesc = "Water bottles can be used to fill cauldrons. Drinking water has no effect.",
_doc_items_usagehelp = "Wield it and rightclick to drink it. Rightclick a cauldron to put the water into the cauldron.",
_doc_items_usagehelp = "Rightclick to drink. Rightclick a cauldron to pour the water into the cauldron.",
stack_max = 1,
inventory_image = potion_image("#0000FF"),
wield_image = potion_image("#0000FF"),
@ -173,7 +175,7 @@ minetest.register_craftitem("mcl_potions:potion_water", {
minetest.register_craftitem("mcl_potions:potion_river_water", {
description = "River Water Bottle",
_doc_items_longdesc = "River water bottles can be used to fill cauldrons. Drinking it has no effect.",
_doc_items_usagehelp = "Wield it and rightclick to drink it. Rightclick a cauldron to put the river water into the cauldron.",
_doc_items_usagehelp = "Rightclick to drink. Rightclick a cauldron to pour the river water into the cauldron.",
stack_max = 1,
inventory_image = potion_image("#0044FF"),
wield_image = potion_image("#0044FF"),