1
0
mirror of git://repo.or.cz/minetest_schemedit.git synced 2024-11-14 19:40:17 +01:00

Display probability in tool wear bar

This commit is contained in:
Wuzzy 2019-03-22 17:37:56 +01:00
parent 6dbca794c9
commit c740737a58

View File

@ -552,6 +552,9 @@ schemedit.add_form("probtool", {
set_item_metadata(probtool, prob, force_place)
-- Repurpose the tool's wear bar to display the set probability
probtool:set_wear(math.floor(((255-prob)/255)*65535))
player:set_wielded_item(probtool)
end
end