forked from mtcontrib/death_messages
Compare commits
No commits in common. "master" and "master" have entirely different histories.
0
LICENSE.txt
Normal file → Executable file
0
LICENSE.txt
Normal file → Executable file
10
README.txt
10
README.txt
@ -1,13 +1,3 @@
|
|||||||
As of 2024-08-17, this mod will probably not be updated by me as I lost interest
|
|
||||||
in Minetest a long time ago and probably will not be coming back.
|
|
||||||
|
|
||||||
If you do want to make any changes, here was my list of TODO items that I never got around to:
|
|
||||||
- Update meta stuff (readme, version, mod.conf, etc.)
|
|
||||||
- Change settings file to not use do_file and add options for custom messages (with placement of player name(s) anywhere in the message)
|
|
||||||
- Add some kind of translation support (may be covered by custom messages)
|
|
||||||
- Use the new API features to poperly detect types of death that weren't feasible before
|
|
||||||
- Make a small API for registering custom messages for other mods (see dying by corium in technic)
|
|
||||||
|
|
||||||
____ _ _ __ __
|
____ _ _ __ __
|
||||||
| _ \ ___ __ _| |_| |__ | \/ | ___ ___ ___ __ _ __ _ ___ ___
|
| _ \ ___ __ _| |_| |__ | \/ | ___ ___ ___ __ _ __ _ ___ ___
|
||||||
| | | |/ _ \/ _` | __| '_ \ | |\/| |/ _ \/ __/ __|/ _` |/ _` |/ _ \/ __|
|
| | | |/ _ \/ _` | __| '_ \ | |\/| |/ _ \/ __/ __|/ _` |/ _` |/ _ \/ __|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
A Minetest mod which sends a chat message when a player dies.
|
|
10
init.lua
10
init.lua
@ -42,9 +42,6 @@ local sounds = {
|
|||||||
-- Translation wrapper
|
-- Translation wrapper
|
||||||
local S = minetest.get_translator(mname)
|
local S = minetest.get_translator(mname)
|
||||||
|
|
||||||
-- To translate server-side in server language for irc
|
|
||||||
local lang = minetest.settings:get("language") or "fr"
|
|
||||||
|
|
||||||
-- Lava death messages
|
-- Lava death messages
|
||||||
messages.lava = {
|
messages.lava = {
|
||||||
"@1 thought lava was cool.",
|
"@1 thought lava was cool.",
|
||||||
@ -113,7 +110,7 @@ messages.other = {
|
|||||||
"@1 died.",
|
"@1 died.",
|
||||||
"@1 left this world.",
|
"@1 left this world.",
|
||||||
"@1 reached miner's heaven.",
|
"@1 reached miner's heaven.",
|
||||||
"@1 lost his/her life.",
|
"@1 lost him/her life.",
|
||||||
"@1 saw the light.",
|
"@1 saw the light.",
|
||||||
"@1 fell from a bit too high.",
|
"@1 fell from a bit too high.",
|
||||||
"@1 slipped on a banana skin.",
|
"@1 slipped on a banana skin.",
|
||||||
@ -144,7 +141,7 @@ messages.whacking = {
|
|||||||
|
|
||||||
messages.monsters_whacking = {
|
messages.monsters_whacking = {
|
||||||
"@1 got whacked by a @2.",
|
"@1 got whacked by a @2.",
|
||||||
"Darwin said: @1 was less adapted than a @2.",
|
"Darwin said : @1 was less adapted than a @2.",
|
||||||
"@1 was transformed into a doormat by a @2.",
|
"@1 was transformed into a doormat by a @2.",
|
||||||
"@1 thought (s)he was stronger than a @2.",
|
"@1 thought (s)he was stronger than a @2.",
|
||||||
"@1 got kicked up by a @2. Next up...",
|
"@1 got kicked up by a @2. Next up...",
|
||||||
@ -211,8 +208,7 @@ local function broadcast_death(msg)
|
|||||||
logfilep:write(os.date("[%Y-%m-%d %H:%M:%S] ") .. msg .. "\n")
|
logfilep:write(os.date("[%Y-%m-%d %H:%M:%S] ") .. msg .. "\n")
|
||||||
logfilep:close()
|
logfilep:close()
|
||||||
if irc then
|
if irc then
|
||||||
local tr_msg = minetest.get_translated_string(lang, msg)
|
irc.say(msg)
|
||||||
irc.say(tr_msg)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user