mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-27 05:13:48 +01:00
Fix infinite hardness display
parent
9a96b525ae
commit
6eca367d0e
@ -83,7 +83,11 @@ doc.sub.items.register_factoid("nodes", "mining", function(itemstring, def)
|
|||||||
if not hardness then
|
if not hardness then
|
||||||
hardness = 0
|
hardness = 0
|
||||||
end
|
end
|
||||||
|
if hardness == -1 then
|
||||||
|
return "Hardness: ∞"
|
||||||
|
else
|
||||||
return string.format("Hardness: %.2f", hardness)
|
return string.format("Hardness: %.2f", hardness)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- TODO: Blast resistance (omitted for now because explosions ignore hardness)
|
-- TODO: Blast resistance (omitted for now because explosions ignore hardness)
|
||||||
|
Loading…
Reference in New Issue
Block a user