Revert "Improve the mod a bit"

This reverts commit cb36097a2fefe2b51ebc2232366351fef1b797d4, reversing
changes made to 5af7b5e450c12abedc9f78e622c744a351ee418d.
This commit is contained in:
BrownHedgehog78 2021-12-01 13:44:25 +02:00
parent cb36097a2f
commit 128323a5ee
2 changed files with 0 additions and 21 deletions

@ -1,5 +1,4 @@
local death_pos = {}
<<<<<<< HEAD
local was_killed = {}
local tip_sent = {}
@ -21,14 +20,6 @@ minetest.register_on_dieplayer(function(player, reason)
minetest.after(10, function()
tip_sent[name] = nil
end)
=======
minetest.register_on_dieplayer(function(player, reason)
local send_tip = minetest.settings:get("death_pos.send_tip_on_die") or true -- Sends tip to use 'death_pos' command when player dies (if true)
death_pos[player:get_player_name()] = player:get_pos()
if player and send_tip == true then
minetest.chat_send_player(player:get_player_name(), minetest.colorize("#60e645", "You died. You can return back to your last death position by using /death_pos command"))
>>>>>>> a5a15c5b63d94afe0a9a552ec460e26d7112af91
end
end)
@ -37,7 +28,6 @@ minetest.register_chatcommand("death_pos", {
privs = {interact = true},
func = function(name)
local player = minetest.get_player_by_name(name)
<<<<<<< HEAD
local pos = death_pos[name]
local clear_pos = minetest.settings:get("death_pos.clear_pos") or true -- Clears the death position when 'death_pos' command is used (if true)
if was_killed[name] then
@ -47,14 +37,6 @@ minetest.register_chatcommand("death_pos", {
player:set_pos(pos)
if clear_pos == true then
death_pos[name] = nil
=======
local pos = death_pos[player:get_player_name()]
local clear_pos = minetest.settings:get("death_pos.clear_pos") or true -- Clears the death position when 'death_pos' command is used (if true)
if pos then
player:set_pos(pos)
if clear_pos == true then
death_pos[player:get_player_name()] = nil
>>>>>>> a5a15c5b63d94afe0a9a552ec460e26d7112af91
end
return false, minetest.colorize("#60e645", "Teleported you back to your death position!")
else

@ -1,8 +1,5 @@
name = death_pos
description = Adds a command to return back to position where you died
<<<<<<< HEAD
release = 9430
title = Death Position
author = BlueR23
=======
>>>>>>> a5a15c5b63d94afe0a9a552ec460e26d7112af91