mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-05 01:50:25 +01:00
Sent death messages through IRC
- Added @paly2 's concept of using the IRC bot in order to send death message in IRC - Chmod-ed files - Added a fake init.lua to make 'sounds' look like a mod
This commit is contained in:
parent
af4ff618bb
commit
037ed16c87
3
mods/3d_armor_classes/sounds/init.lua
Executable file
3
mods/3d_armor_classes/sounds/init.lua
Executable file
|
@ -0,0 +1,3 @@
|
|||
-- I'm adding this file, just to pretend to do something in order to make
|
||||
-- Minetest think this is a mod and make my local server start..
|
||||
-- Sincerly, Mg
|
|
@ -94,25 +94,33 @@ if RANDOM_MESSAGES == true then
|
|||
if minetest.is_singleplayer() then
|
||||
player_name = "You"
|
||||
end
|
||||
|
||||
local death_message = ""
|
||||
|
||||
-- Death by lava
|
||||
if node.groups.lava ~= nil then
|
||||
minetest.chat_send_all(player_name .. messages.lava[math.random(1,#messages.lava)] )
|
||||
death_message = player_name .. messages.lava[math.random(1,#messages.lava)]
|
||||
-- Death by acid
|
||||
elseif node.groups.acid ~= nil then
|
||||
minetest.chat_send_all(player_name .. messages.acid[math.random(1,#messages.acid)] )
|
||||
death_message = player_name .. messages.acid[math.random(1,#messages.acid)]
|
||||
-- Death by drowning
|
||||
elseif player:get_breath() == 0 and node.groups.water then
|
||||
minetest.chat_send_all(player_name .. messages.water[math.random(1,#messages.water)] )
|
||||
death_message = player_name .. messages.water[math.random(1,#messages.water)]
|
||||
-- Death by fire
|
||||
elseif node.name == "fire:basic_flame" then
|
||||
minetest.chat_send_all(player_name .. messages.fire[math.random(1,#messages.fire)] )
|
||||
death_message = player_name .. messages.fire[math.random(1,#messages.fire)]
|
||||
-- Death in quicksand
|
||||
elseif player:get_breath() == 0 and node.name == "default:sand_source" or node.name == "default:sand_flowing" then
|
||||
minetest.chat_send_all(player_name .. messages.sand[math.random(1,#messages.sand)] )
|
||||
death_message = player_name .. messages.sand[math.random(1,#messages.sand)]
|
||||
-- Death by something else
|
||||
else
|
||||
minetest.chat_send_all(player_name .. messages.other[math.random(1,#messages.other)] )
|
||||
death_message = player_name .. messages.other[math.random(1,#messages.other)]
|
||||
end
|
||||
|
||||
-- Actually tell something
|
||||
minetest.chat_send_all(death_message)
|
||||
irc:say(death_message)
|
||||
|
||||
minetest.sound_play(sounds[math.random(1,#sounds)],{to_player=player:get_player_name(),gain=0.5*soundset.get_gain(player:get_player_name(),"other")})
|
||||
sound_play_all(player:get_player_name())
|
||||
end)
|
||||
|
|
|
@ -37,7 +37,7 @@ end
|
|||
function hb.register_hudbar(identifier, text_color, label, textures, default_start_value, default_start_max, default_start_hidden, format_string)
|
||||
local hudtable = {}
|
||||
local pos, offset
|
||||
|
||||
|
||||
--MFF (crabman|19/06/15)|DEBUT add custom pos
|
||||
if hb.settings.custom.custom and hb.settings.custom[identifier] ~= nil then
|
||||
if hb.settings.custom[identifier].x == 0 then
|
||||
|
@ -51,7 +51,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
|
|||
offset = {
|
||||
x = hb.settings.start_offset_right.x,
|
||||
y = hb.settings.start_offset_right.y - hb.settings.vmargin * math.floor(hb.settings.custom[identifier].y)
|
||||
}
|
||||
}
|
||||
end
|
||||
--MFF (crabman|19/06/15) /FIN
|
||||
elseif hb.hudbars_count % 2 == 0 then
|
||||
|
|
0
mods/mobs/dog.lua
Normal file → Executable file
0
mods/mobs/dog.lua
Normal file → Executable file
Loading…
Reference in New Issue
Block a user