filter: right interpret armor_use as wear-related %
This commit is contained in:
parent
5b163a6311
commit
0c59c0c36e
@ -18,7 +18,7 @@ return {
|
||||
["group:armor:legs"] = { label = "Beinschutz" },
|
||||
["group:armor:feet"] = { label = "Stiefel" },
|
||||
["group:armor:shield"] = { label = "Schild" },
|
||||
["group:armor:use"] = { label = "Maximaler Status" },
|
||||
["group:armor:use"] = { label = "Abnutzung bei Schaden" },
|
||||
|
||||
-- http://dev.minetest.net/Groups
|
||||
-- http://dev.minetest.net/Groups/Custom_groups
|
||||
|
@ -18,7 +18,7 @@ return {
|
||||
["group:armor:legs"] = { label = "Legs protection" },
|
||||
["group:armor:feet"] = { label = "Feet protection" },
|
||||
["group:armor:shield"] = { label = "Shield" },
|
||||
["group:armor:use"] = { label = "Max armor state" },
|
||||
["group:armor:use"] = { label = "Wear on damage" },
|
||||
|
||||
-- http://dev.minetest.net/Groups
|
||||
-- http://dev.minetest.net/Groups/Custom_groups
|
||||
|
@ -61,9 +61,11 @@ filter.register_filter({
|
||||
else
|
||||
mk = k
|
||||
end
|
||||
|
||||
-- stack wear related value
|
||||
if k == "armor_use" then
|
||||
mv = tostring(math.floor(v / 65535 * 10000 + 0.5)/100).." %"
|
||||
-- value-expandable groups
|
||||
if v ~= 1 or k == "oddly_breakable_by_hand" then
|
||||
elseif v ~= 1 or k == "oddly_breakable_by_hand" then
|
||||
mv = v
|
||||
else
|
||||
mv = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user