Merge branch 'master' of https://github.com/MT-CTF/capturetheflag
This commit is contained in:
commit
b76b3cdf65
4 changed files with 16 additions and 2 deletions
|
@ -150,6 +150,7 @@ local function isdiggable(name)
|
||||||
name:find("glass" ) or name:find("ice" ) or
|
name:find("glass" ) or name:find("ice" ) or
|
||||||
name:find("snow" )
|
name:find("snow" )
|
||||||
)
|
)
|
||||||
|
or name:find("stairs:")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function paxel_stop(pname, reason)
|
local function paxel_stop(pname, reason)
|
||||||
|
@ -165,7 +166,7 @@ end
|
||||||
local function remove_pillar(pos, pname)
|
local function remove_pillar(pos, pname)
|
||||||
local name = minetest.get_node(pos).name
|
local name = minetest.get_node(pos).name
|
||||||
|
|
||||||
if name:find("default") and isdiggable(name) then
|
if name:find("default") or name:find("stairs") and isdiggable(name) then
|
||||||
local player = minetest.get_player_by_name(pname)
|
local player = minetest.get_player_by_name(pname)
|
||||||
|
|
||||||
minetest.dig_node(pos)
|
minetest.dig_node(pos)
|
||||||
|
|
10
mods/ctf/ctf_leave_message/init.lua
Normal file
10
mods/ctf/ctf_leave_message/init.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
function minetest.send_leave_message(player_name, timed_out)
|
||||||
|
local player = ctf.player(player_name)
|
||||||
|
local tcolor = ctf_colors.get_color(player).css
|
||||||
|
|
||||||
|
local announcement = "*** " .. minetest.colorize(tcolor, player_name) .. " left the game."
|
||||||
|
if timed_out then
|
||||||
|
announcement = announcement .. " (timed out)"
|
||||||
|
end
|
||||||
|
minetest.chat_send_all(announcement)
|
||||||
|
end
|
3
mods/ctf/ctf_leave_message/mod.conf
Normal file
3
mods/ctf/ctf_leave_message/mod.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
name = ctf_leave_message
|
||||||
|
depends = ctf, ctf_colors
|
||||||
|
description = Colorizes leaving messages
|
|
@ -1 +1 @@
|
||||||
Subproject commit fa7fa3e8f80dd82d6e98766581269817325e546b
|
Subproject commit 6afcf12e1ca22873fc4066b242f57b8398131745
|
Loading…
Reference in a new issue