Merge branch 'master' of https://github.com/MT-CTF/capturetheflag
Conflicts: mods/other/random_messages/init.lua
This commit is contained in:
commit
ed65ddb6d0
5 changed files with 23 additions and 7 deletions
|
@ -272,6 +272,8 @@ minetest.register_chatcommand("t", {
|
|||
end
|
||||
})
|
||||
|
||||
local function me_func() end
|
||||
|
||||
if minetest.global_exists("irc") then
|
||||
function irc.playerMessage(name, message)
|
||||
local color = ctf_colors.get_irc_color(ctf.player(name))
|
||||
|
@ -286,6 +288,14 @@ if minetest.global_exists("irc") then
|
|||
local bbrace = color .. ">" .. clear
|
||||
return ("%s%s%s %s"):format(abrace, name, bbrace, message)
|
||||
end
|
||||
|
||||
me_func = function(...)
|
||||
local message = irc.playerMessage(...)
|
||||
|
||||
message = "*" .. message:sub(message:find(" "))
|
||||
|
||||
irc.say(message)
|
||||
end
|
||||
end
|
||||
|
||||
local handler
|
||||
|
@ -313,6 +323,8 @@ end
|
|||
table.insert(minetest.registered_on_chat_messages, 1, handler)
|
||||
|
||||
minetest.registered_chatcommands["me"].func = function(name, param)
|
||||
me_func(name, param)
|
||||
|
||||
if ctf.player(name).team then
|
||||
local tcolor = ctf_colors.get_color(ctf.player(name))
|
||||
name = minetest.colorize(tcolor.css, "* " .. name)
|
||||
|
@ -320,5 +332,7 @@ minetest.registered_chatcommands["me"].func = function(name, param)
|
|||
name = "* ".. name
|
||||
end
|
||||
|
||||
minetest.log("action", "[CHAT] "..name.." "..param)
|
||||
|
||||
minetest.chat_send_all(name .. " " .. param)
|
||||
end
|
||||
|
|
|
@ -133,7 +133,7 @@ minetest.override_item("ctf_bandages:bandage", {
|
|||
})
|
||||
|
||||
local diggers = {}
|
||||
local DIG_COOLDOWN = 45
|
||||
local DIG_COOLDOWN = 30
|
||||
local DIG_DIST_LIMIT = 30
|
||||
local DIG_SPEED = 0.1
|
||||
|
||||
|
|
|
@ -74,8 +74,9 @@ check_grapple("shooter_hook:grapple_hook")
|
|||
local old_grapple_step = minetest.registered_entities["shooter_hook:hook"].on_step
|
||||
minetest.registered_entities["shooter_hook:hook"].on_step = function(self, dtime, ...)
|
||||
-- User left the game. Life is no longer worth living for this poor hook
|
||||
if not self.user then
|
||||
if not self.user or not minetest.get_player_by_name(self.user) then
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
||||
-- Remove entity if player has flag
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit eb881181cc54c3dac444cfa91fa63baf1557d02f
|
||||
Subproject commit bbf60077855ee90b95ca68f1b9bc853f7d53ecf2
|
Loading…
Add table
Add a link
Reference in a new issue