This commit is contained in:
Looki2000 2022-11-22 00:45:43 +01:00
commit 303b434362

View File

@ -1,5 +1,26 @@
currentPage = 1 currentPage = 1
function game_over()
minetest.show_formspec("poop:game_over", "size[8,8]label[0,0;Game Over!]")
end
function you_win(player)
-- teleport player to 0,0,0
player:setpos({x=0, y=0, z=0})
thanks = "Thanks for playing Shitting Simulator! We had a lot of fun making this game, and we hope you enjoyed it too! Thanks again!"
storyFormspec =
{
"formspec_version[4]",
"size[18, 16]",
"bgcolor[brown]",
"position[0.5, 0.5]",
"style_type[button;bgcolor=yellow;textcolor=green]",
"hypertext[1, 12.5; 12, 5;;<global halign=center color=black size=20 font=Regular>" .. thanks .. "]\n",
"button[13, 14.9; 4, 1;exit;Quit]"
}
minetest.show_formspec(player:get_player_name(), "poop:story", table.concat(storyFormspec, ""))
end
minetest.register_item(":", { -- Hand minetest.register_item(":", { -- Hand
type = "none", type = "none",
wield_image = "Poop.png", wield_image = "Poop.png",
@ -358,7 +379,7 @@ minetest.register_craftitem("poop:plumba", {
end end
if pooped_things >= 100 then if pooped_things >= 100 then
is_game_finished = true is_game_finished = true
you_win(user)
return return
end end
-- get node at pointed thing position -- get node at pointed thing position