Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
death_messages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
death_messages
Compare revisions
23c57bf000ce48a00c3991d8ef8f011e8c6cf75b to b84a287dddf3ee57fa8178cf8504a4180b60f28a
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
Illuna-Minetest/death_messages
Select target project
No results found
b84a287dddf3ee57fa8178cf8504a4180b60f28a
Select Git revision
Swap
Target
Illuna-Minetest/death_messages
Select target project
Illuna-Minetest/death_messages
1 result
23c57bf000ce48a00c3991d8ef8f011e8c6cf75b
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
styleupdates
· 198f644b
Milan
authored
7 years ago
198f644b
upsi (mergeconflicts)
· b84a287d
Milan
authored
7 years ago
b84a287d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
init.lua
+41
-37
41 additions, 37 deletions
init.lua
with
41 additions
and
37 deletions
init.lua
View file @
b84a287d
...
...
@@ -4,51 +4,55 @@ local messages = {}
-- Lava death messages
messages
.
lava
=
{
'
# Illuna:
%s thought lava was cool.'
,
'
# Illuna:
%s melted into a ball of fire.'
,
'
# Illuna:
%s couldn\'
t
resist
that
warm
glow
of
lava
.
',
'
#
Illuna
:
%
s
dug
straight
down
.
',
'
#
Illuna
:
%
s
didn
\
't know lava was hot.'
'%s thought lava was cool.'
,
'%s melted into a ball of fire.'
,
'%s couldn\'
t
resist
that
warm
glow
of
lava
.
',
'
%
s
dug
straight
down
.
',
'
%
s
didn
\
't know lava was hot.'
}
-- Drowning death messages
messages
.
water
=
{
'
# Illuna:
%s ran out of air.'
,
'
# Illuna:
%s failed at swimming lessons.'
,
'
# Illuna:
%s tried to impersonate an anchor.'
,
'
# Illuna:
%s forgot he wasn\'
t
a
fish
.
',
'
#
Illuna
:
%
s
blew
one
too
many
bubbles
.
'
'%s ran out of air.'
,
'%s failed at swimming lessons.'
,
'%s tried to impersonate an anchor.'
,
'%s forgot he wasn\'
t
a
fish
.
',
'
%
s
blew
one
too
many
bubbles
.
'
}
-- Burning death messages
messages.fire = {
'
#
Illuna
:
%
s
burned
to
a
crisp
.
',
'
#
Illuna
:
%
s
got
a
little
too
warm
.
',
'
#
Illuna
:
%
s
got
too
close
to
the
camp
fire
.
',
'
#
Illuna
:
%
s
just
got
roasted
,
hotdog
style
.
',
'
#
Illuna
:
%
s
was
set
aflame
.
More
light
that
way
.
'
'
%
s
burned
to
a
crisp
.
',
'
%
s
got
a
little
too
warm
.
',
'
%
s
got
too
close
to
the
camp
fire
.
',
'
%
s
just
got
roasted
,
hotdog
style
.
',
'
%
s
was
set
aflame
.
More
light
that
way
.
'
}
-- Other death messages
messages.other = {
'
#
Illuna
:
%
s
did
something
fatal
.
',
'
#
Illuna
:
%
s
died
.
',
'
#
Illuna
:
%
s
gave
up
on
life
.
',
'
#
Illuna
:
%
s
is
somewhat
dead
now
.
',
'
#
Illuna
:
%
s
is
very
dead
now
.
',
'
#
Illuna
:
Oh
snap
!
%
s
died
too
young
.
:
-
(
',
'
#
Illuna
:
Oh
no
,
%
s
has
gone
from
us
.
:
-
(
'
'
%
s
did
something
fatal
.
',
'
%
s
died
.
',
'
%
s
gave
up
on
life
.
',
'
%
s
is
somewhat
dead
now
.
',
'
%
s
is
very
dead
now
.
',
'
Oh
snap
!
%
s
died
too
young
.
:
-
(
',
'
Oh
no
,
%
s
has
gone
from
us
.
:
-
(
'
}
-- Respawn messages
messages.respawn = {
'
#
Illuna
:
%
s
comes
back
alive
.
How
is
that
possible
?
',
'
#
Illuna
:
%
s
comes
back
alive
...
maybe
as
a
zombie
?
Other
players
should
be
careful
now
.
',
'
#
Illuna
:
Like
a
Phoenix
%
s
rises
from
the
ashes
!
',
'
#
Illuna
:
My
goodness
,
%
s
is
back
!
',
'
#
Illuna
:
%
s
died
of
something
fatal
'
'
%
s
comes
back
alive
.
How
is
that
possible
?
',
'
%
s
comes
back
alive
...
maybe
as
a
zombie
?
Other
players
should
be
careful
now
.
',
'
Like
a
Phoenix
%
s
rises
from
the
ashes
!
',
'
My
goodness
,
%
s
is
back
!
',
'
%
s
died
of
something
fatal
'
}
local base = minetest.setting_get("color_boring")
local success = minetest.setting_get("color_success")
local failure = minetest.setting_get("color_failure")
core.register_on_dieplayer(function(player)
local player_name = player:get_player_name()
local node = core.registered_nodes[core.get_node(player:getpos()).name]
...
...
@@ -57,35 +61,35 @@ core.register_on_dieplayer(function(player)
end
-- Death by lava
if node.groups.lava ~= nil then
core.chat_send_all(string.format(core.colorize(
"#F6A10A"
, messages.lava[math.random(1,#messages.lava)]),
player:get_
player_name
()
))
core.chat_send_all(
core.colorize(failure, "- ") ..
string.format(core.colorize(
base
, messages.lava[math.random(1,#messages.lava)]), player_name))
if minetest.get_modpath("irc") then
irc:say(string.format('
***
%
s
died
.
',
player:get_
player_name
()
))
irc:say(string.format('
***
%
s
died
.
', player_name))
end
-- Death by drowning
elseif player:get_breath() == 0 then
core.chat_send_all(string.format(core.colorize(
"#F6A10A"
, messages.water[math.random(1,#messages.water)]),
player:get_
player_name
()
))
core.chat_send_all(
core.colorize(failure, "- ") ..
string.format(core.colorize(
base
, messages.water[math.random(1,#messages.water)]), player_name))
if minetest.get_modpath("irc") then
irc:say(string.format('
***
%
s
died
.
',
player:get_
player_name
()
))
irc:say(string.format('
***
%
s
died
.
', player_name))
end
-- Death by fire
elseif node.name == '
fire
:
basic_flame
' then
core.chat_send_all(string.format(core.colorize(
"#F6A10A"
, messages.fire[math.random(1,#messages.fire)]),
player:get_
player_name
()
))
core.chat_send_all(
core.colorize(failure, "* ") ..
string.format(core.colorize(
base
, messages.fire[math.random(1,#messages.fire)]), player_name))
if minetest.get_modpath("irc") then
irc:say(string.format('
***
%
s
died
.
',
player:get_
player_name
()
))
irc:say(string.format('
***
%
s
died
.
', player_name))
end
-- Death by something else
else
core.chat_send_all(string.format(core.colorize(
"#F6A10A"
, messages.other[math.random(1,#messages.other)]),
player:get_
player_name
()
))
core.chat_send_all(
core.colorize(failure, "- ") ..
string.format(core.colorize(
base
, messages.other[math.random(1,#messages.other)]), player_name))
if minetest.get_modpath("irc") then
irc:say(string.format('
***
%
s
died
.
',
player:get_
player_name
()
))
irc:say(string.format('
***
%
s
died
.
', player_name))
end
end
end)
minetest.register_on_respawnplayer( function(player)
local player_name = player:get_player_name()
core.chat_send_all(string.format(core.colorize(
"#F6A10A"
, messages.respawn[math.random(1,#messages.respawn)]),
player:get_
player_name
()
))
core.chat_send_all(
core.colorize(success, "* ") ..
string.format(core.colorize(
base
, messages.respawn[math.random(1,#messages.respawn)]), player_name))
if minetest.get_modpath("irc") then
irc:say(string.format('
***
%
s
returns
.
',
player:get_
player_name
()
))
irc:say(string.format('
***
%
s
returns
.
', player_name))
end
end)
This diff is collapsed.
Click to expand it.