mirror of
https://github.com/BrownHedgehog78/death_pos.git
synced 2024-11-27 01:13:49 +01:00
Revert "Improve the mod a bit"
This reverts commit cb36097a2fefe2b51ebc2232366351fef1b797d4, reversing changes made to 5af7b5e450c12abedc9f78e622c744a351ee418d.
This commit is contained in:
parent
cb36097a2f
commit
128323a5ee
18
init.lua
18
init.lua
@ -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
|
||||
|
3
mod.conf
3
mod.conf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user