Update `.mrkrthere` on death.
This commit is contained in:
parent
32444fda73
commit
5d576cdbb1
|
@ -16,7 +16,8 @@ create HUDs on their own.
|
|||
- `.mrkr_import`: Imports your markers from an advmarkers string (`.mrkr_import <advmarkers string>`). Any markers with the same name will not be overwritten, and if they do not have the same co-ordinates, `_` will be appended to the imported one.
|
||||
- `.mrkrthere`: Sets a marker at the last `.coords` position.
|
||||
|
||||
If you die, a marker is automatically added at your death position.
|
||||
If you die, a marker is automatically added at your death position, and will
|
||||
update the last `.coords` position.
|
||||
|
||||
## Chat channels integration
|
||||
|
||||
|
|
4
init.lua
4
init.lua
|
@ -245,7 +245,9 @@ end)
|
|||
minetest.register_on_death(function()
|
||||
if minetest.localplayer then
|
||||
local name = os.date('Death on %Y-%m-%d %H:%M:%S')
|
||||
advmarkers.set_marker(minetest.localplayer:get_pos(), name)
|
||||
local pos = minetest.localplayer:get_pos()
|
||||
advmarkers.last_coords = pos
|
||||
advmarkers.set_marker(pos, name)
|
||||
minetest.display_chat_message('Added marker "' .. name .. '".')
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue