FINALLLL
This commit is contained in:
parent
34d92ffc2a
commit
4be1ca2850
@ -172,7 +172,7 @@ minetest.register_on_joinplayer(function(player)
|
||||
hud_elem_type = "image",
|
||||
position = {x = 1, y = .5},
|
||||
offset = {x = -510, y = 23},
|
||||
text = "destruction_counter_meter_full.png",
|
||||
text = "P.png",
|
||||
scale = {x = 0, y = 4},
|
||||
alignment = {x = 1, y = 0},
|
||||
})
|
||||
@ -184,9 +184,9 @@ function destruction_counter.updateCounter(player)
|
||||
end
|
||||
|
||||
local totalDestruction = destruction_counter.nodesDestroyed + math.floor(nodesDestroyedByHand / 10)
|
||||
local percentage = (totalDestruction / 100 * 4)
|
||||
if percentage > 100 then
|
||||
percentage = 100
|
||||
local percentage = (totalDestruction / 200 * 4)
|
||||
if percentage > 200 then
|
||||
percentage = 200
|
||||
end
|
||||
player:hud_change(idText, "text", "Shitting & Packing Meter: " .. totalDestruction)
|
||||
player:hud_change(idMeter, "scale", {x = percentage, y = 4})
|
||||
@ -380,7 +380,7 @@ minetest.register_node("poop:flux_capacitor", {
|
||||
minetest.register_alias("mapgen_stone", "poop:floor")
|
||||
|
||||
local pooped_things = 0
|
||||
|
||||
local b = false
|
||||
minetest.register_craftitem("poop:plumba", {
|
||||
description = "Plumba",
|
||||
inventory_image = "plumba.png",
|
||||
@ -403,7 +403,8 @@ minetest.register_craftitem("poop:plumba", {
|
||||
minetest.chat_send_player(user:get_player_name(), "You packed "..pooped_things.." shits!")
|
||||
pooped_things = pooped_things + 1
|
||||
|
||||
if pooped_things == 100 then
|
||||
if pooped_things >= 100 then
|
||||
if(b == false)then
|
||||
-- stop first music loop
|
||||
minetest.sound_stop(first_music)
|
||||
-- play second music loop
|
||||
@ -412,7 +413,8 @@ minetest.register_craftitem("poop:plumba", {
|
||||
pitch = 1,
|
||||
loop = true,
|
||||
})
|
||||
|
||||
b= true
|
||||
end
|
||||
end
|
||||
|
||||
destruction_counter.nodesDestroyed = pooped_things
|
||||
|
Loading…
Reference in New Issue
Block a user