Improvements
This commit is contained in:
@@ -2,6 +2,8 @@ local modpath = minetest.get_modpath("ip_destruction_counter")
|
||||
|
||||
destruction_counter = {}
|
||||
destruction_counter.nodesDestroyed = 0
|
||||
destruction_counter.pigsKilled = 0
|
||||
destruction_counter.peopleKilled = 0
|
||||
local nodesDestroyedByHand = 0
|
||||
|
||||
local idText
|
||||
@@ -51,7 +53,7 @@ function destruction_counter.updateCounter(player)
|
||||
return
|
||||
end
|
||||
|
||||
local totalDestruction = destruction_counter.nodesDestroyed + math.floor(nodesDestroyedByHand / 10)
|
||||
local totalDestruction = destruction_counter.nodesDestroyed + destruction_counter.pigsKilled * 20 + destruction_counter.peopleKilled * 10 + math.floor(nodesDestroyedByHand / 10)
|
||||
local percentage = (totalDestruction / 1000 * 4)
|
||||
if percentage > 100 then
|
||||
percentage = 100
|
||||
|
||||
Reference in New Issue
Block a user