From 25a61256f09bebbe3cc26ae668890d8207f5b4c0 Mon Sep 17 00:00:00 2001 From: plague006 Date: Sat, 23 Feb 2019 10:54:36 -0500 Subject: [PATCH] Move generic death message into print after timeout --- features/donator.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/features/donator.lua b/features/donator.lua index 0d08d510..ed6524c7 100644 --- a/features/donator.lua +++ b/features/donator.lua @@ -37,6 +37,11 @@ local print_after_timeout = if not player.valid then return end + + if data.death then + game.print({'donator.death_message'}, Color.white) + end + game.print(data.message, player.chat_color) end ) @@ -80,9 +85,8 @@ local function player_died(event) end local message = messages[random(#messages)] - game.print({'donator.death_message'}, Color.white) message = concat({'*** ', message, ' ***'}) - Task.set_timeout_in_ticks(30, print_after_timeout, {player = player, message = message}) + Task.set_timeout_in_ticks(30, print_after_timeout, {player = player, message = message, death = true}) end --- Returns the table of donators