Finalize for release 0.5

This commit is contained in:
2022-11-27 14:08:38 -05:00
parent ac9ea6c4e0
commit 971dc82648
34 changed files with 379 additions and 49 deletions

View File

@@ -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