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