diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2018-09-12 20:26:23 -0400 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2018-09-12 20:34:28 -0400 |
commit | 078a998d2969fbdcd4fd3657ee286b7922b0e160 (patch) | |
tree | 139b6aacfe330a77d25fd6ff245cce6dbcf1a378 /init.lua | |
parent | 4b8899736084cee9bb3ac1090ea9f3f7275d573a (diff) | |
download | unifieddyes-078a998d2969fbdcd4fd3657ee286b7922b0e160.tar unifieddyes-078a998d2969fbdcd4fd3657ee286b7922b0e160.tar.gz unifieddyes-078a998d2969fbdcd4fd3657ee286b7922b0e160.tar.bz2 unifieddyes-078a998d2969fbdcd4fd3657ee286b7922b0e160.tar.xz unifieddyes-078a998d2969fbdcd4fd3657ee286b7922b0e160.zip |
append `output` given to color craft helper if prefix/suffix are used
(if any; allows specifying an item count/yield for the recipe)
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -265,18 +265,19 @@ local function register_c(craft, hue, sat, val) recipe = string.gsub(recipe, "NEUTRAL_NODE", craft.neutral_node) local newrecipe = minetest.deserialize(recipe) - local output = craft.output + local coutput = craft.output or "" + local output = coutput if craft.output_prefix then if craft.palette ~= "split" then - output = craft.output_prefix..color..craft.output_suffix + output = craft.output_prefix..color..craft.output_suffix..coutput else if hue == "white" or hue == "black" or string.find(hue, "grey") then - output = craft.output_prefix.."grey"..craft.output_suffix + output = craft.output_prefix.."grey"..craft.output_suffix..coutput elseif hue == "pink" then dye = "dye:light_red" - output = craft.output_prefix.."red"..craft.output_suffix + output = craft.output_prefix.."red"..craft.output_suffix..coutput else - output = craft.output_prefix..hue..craft.output_suffix + output = craft.output_prefix..hue..craft.output_suffix..coutput end end end |