diff options
author | Wuzzy <almikes@aol.com> | 2016-08-05 04:47:38 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-05 04:47:38 +0200 |
commit | 7f25441dd618fb80a203291d9647f4b8bc46226d (patch) | |
tree | 5aa120a71e976d6c2d4745a58e3db1139898f624 | |
parent | b534fc83e77466afed8e36c9c1682fc8c328895f (diff) |
Improve liquids display
-rw-r--r-- | init.lua | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -217,24 +217,28 @@ doc.new_category("nodes", { formstring = formstring .. toolcaps_to_text(data.def.tool_capabilities) .. "\n" formstring = formstring .. "Collidable: "..yesno(data.def.walkable).. "\n" + if data.def.pointable == true then + formstring = formstring .. "Pointable: Yes\n" + elseif liquid then + formstring = formstring .. "Pointable: Only by special items\n" + else + formstring = formstring .. "Pointable: No\n" + end local liquid if data.def.liquidtype ~= "none" then liquid = true else liquid = false end - formstring = formstring .. "Liquid: "..yesno(liquid).. "\n" if liquid then + formstring = formstring .. "This block is a liquid with these properties:\n" local range, renew, viscos if data.def.liquid_range then range = data.def.liquid_range else range = 8 end if data.def.liquid_renewable ~= nil then renew = data.def.liquid_renewable else renew = true end if data.def.liquid_viscosity then viscos = data.def.liquid_viscosity else viscos = 0 end - formstring = formstring .. "Liquid range: "..range.. "\n" - formstring = formstring .. "Liquid viscosity: "..viscos.. "\n" - formstring = formstring .. "Renewable liquid: "..yesno(renew).. "\n" - end - if data.def.pointable == true then - formstring = formstring .. "Pointable: Yes\n" - elseif liquid then - formstring = formstring .. "Pointable: Only by special items\n" - else - formstring = formstring .. "Pointable: No\n" + if range == 0 then + formstring = formstring .. "- Flowing range: 0 (no flowing)\n" + else + formstring = formstring .. "- Flowing range: "..range.. "\n" + end + formstring = formstring .. "- Viscosity: "..viscos.. "\n" + formstring = formstring .. "- Renewable: "..yesno(renew).. "\n" end formstring = formstring .. "\n" |