From 74d5da78a174361d77a006436c206dea9d5b6d58 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 30 Nov 2017 20:35:21 +0100 Subject: [PATCH] Simplify water mixing rules in cauldron --- mods/ENVIRONMENT/mcl_weather/rain.lua | 3 +-- mods/ITEMS/mcl_cauldrons/init.lua | 2 +- mods/ITEMS/mcl_potions/init.lua | 22 ++++++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/rain.lua b/mods/ENVIRONMENT/mcl_weather/rain.lua index ac046238a..9b41b7b67 100644 --- a/mods/ENVIRONMENT/mcl_weather/rain.lua +++ b/mods/ENVIRONMENT/mcl_weather/rain.lua @@ -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 diff --git a/mods/ITEMS/mcl_cauldrons/init.lua b/mods/ITEMS/mcl_cauldrons/init.lua index 54363e2d4..440ac0317 100644 --- a/mods/ITEMS/mcl_cauldrons/init.lua +++ b/mods/ITEMS/mcl_cauldrons/init.lua @@ -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", diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index 28f824e9c..c8b1f73c5 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -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"),