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:
commit
816313d35b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user