mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2025-06-30 15:30:28 +02:00
Add a moremesecons_utils mod to reduce redundant code
This commit is contained in:
@ -1,10 +1,5 @@
|
||||
local kill_nearest_player = function(pos)
|
||||
local MAX_DISTANCE = tonumber(minetest.setting_get("moremesecons_playerkiller.max_distance")) or 8 -- Use this number to set maximal distance to kill
|
||||
if MAX_DISTANCE <= 0 then
|
||||
MAX_DISTANCE = 8
|
||||
elseif MAX_DISTANCE ~= MAX_DISTANCE then -- NaN
|
||||
MAX_DISTANCE = 8
|
||||
end
|
||||
local MAX_DISTANCE = moremesecons.setting("playerkiller", "max_distance", 8, 1)
|
||||
|
||||
-- Search the nearest player
|
||||
local nearest
|
||||
|
Reference in New Issue
Block a user