Finalize for release 0.5
This commit is contained in:
@@ -50,14 +50,17 @@ end)
|
||||
|
||||
function destruction_counter.updateCounter(player)
|
||||
if not player then
|
||||
return
|
||||
player = minetest.get_player_by_name("singleplayer")
|
||||
end
|
||||
|
||||
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
|
||||
local percentage = (totalDestruction / 2000 * 4)
|
||||
if percentage > 4 then
|
||||
percentage = 4
|
||||
end
|
||||
|
||||
|
||||
|
||||
player:hud_change(idText, "text", "Destruction meter: " .. totalDestruction)
|
||||
player:hud_change(idMeter, "scale", {x = percentage, y = 4})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user