]> git.lizzy.rs Git - minetest.git/blob - builtin/client/death_formspec.lua
Translate builtin (#10693)
[minetest.git] / builtin / client / death_formspec.lua
1 -- CSM death formspec. Only used when clientside modding is enabled, otherwise
2 -- handled by the engine.
3
4 core.register_on_death(function()
5         core.display_chat_message(core.gettext("You died."))
6         local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
7                 "label[4.85,1.35;" .. fgettext("You died") ..
8                 "]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
9         core.show_formspec("bultin:death", formspec)
10 end)
11
12 core.register_on_formspec_input(function(formname, fields)
13         if formname == "bultin:death" then
14                 core.send_respawn()
15         end
16 end)