Update 'mods/poop/init.lua'

This commit is contained in:
Functioning Member of Society 2022-11-22 00:32:12 +00:00
parent 4be1ca2850
commit 40b29be85f

View File

@ -59,17 +59,16 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
player:setpos({x=15,y=21,z=15})
return
end
currentPage = currentPage + 1 -- Fuck Lua and its lack of arithmetic assignment operators
currentPage = currentPage + 1
minetest.show_formspec(player:get_player_name(), "story:story_formspec", table.concat(getStoryFormspec(currentPage), "\n"))
elseif fields.back and currentPage >= 0 then
currentPage = currentPage - 1 -- Fuck Lua and its lack of arithmetic assignment operators
currentPage = currentPage - 1
minetest.show_formspec(player:get_player_name(), "story:story_formspec", table.concat(getStoryFormspec(currentPage), "\n"))
elseif fields.exit then
--minetest.kick_player(player:get_player_name(), "Fuck you in particular")
minetest.request_shutdown("The game has crashed due to the citizen's neglience.\n This incident will be reported.")
minetest.kick_player(player:get_player_name(), "")
elseif fields.quit then
minetest.after(0.2, function() minetest.show_formspec(player:get_player_name(), "story:story_formspec", table.concat(getStoryFormspec(currentPage), "\n")) end)
end
@ -104,7 +103,8 @@ is_game_finished = false
minetest.register_on_newplayer(function(ObjectRef)
minetest.place_schematic({x = 0, y = 0, z = 0}, minetest.get_modpath("poop") .. "/map.mts", "0", nil, true)
ObjectRef:set_pos({x = 15, y = 21, z = 15})
ObjectRef:set_pos({x = 15, y = 31, z = 15})
minetest.fix_light({x = 0, y = 0, z = 0}, {x = 100, y = 100, z = 100})
end)