1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +02:00

Merge pull request #703 from SimonFlapse/Diggy-QoL-Death

Added chat message of deducted experience on death
This commit is contained in:
Simon 2019-01-28 16:15:39 +01:00 committed by GitHub
commit 816313d35b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,7 +301,8 @@ end
local function on_player_respawned(event)
local player = get_player_by_index(event.player_index)
local exp = remove_experience_percentage(player.force, config.XP['death-penalty'], 50)
local text = format('%s resurrected! -%d XP', player.name, exp)
local text = format('-%d XP', exp)
game.print(format('%s drained %d experience.', player.name, exp), lose_xp_color)
for _, p in pairs(game.connected_players) do
print_player_floating_text_position(p.index, text, lose_xp_color, -1, -0.5)
end