]> git.lizzy.rs Git - dragonfireclient.git/blob - builtin/client/init.lua
[CSM] implement client side mod loading (#5123)
[dragonfireclient.git] / builtin / client / init.lua
1 -- Minetest: builtin/client/init.lua
2 local scriptpath = core.get_builtin_path()..DIR_DELIM
3 local clientpath = scriptpath.."client"..DIR_DELIM
4 local commonpath = scriptpath.."common"..DIR_DELIM
5
6 dofile(clientpath .. "register.lua")
7 dofile(commonpath .. "after.lua")
8 dofile(commonpath .. "chatcommands.lua")
9 dofile(clientpath .. "chatcommands.lua")
10
11 core.register_on_death(function()
12         core.display_chat_message("You died.")
13         local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
14         "label[4.85,1.35;" .. fgettext("You died.") .. "]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
15         core.show_formspec("bultin:death", formspec)
16 end)
17
18 core.register_on_formspec_input(function(formname, fields)
19         if formname == "bultin:death" then
20                 core.send_respawn()
21         end
22 end)