1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-11 13:39:14 +02:00

set last_user when refreshing corpse

This commit is contained in:
Gerkiz 2021-05-30 21:00:13 +02:00
parent 2729efa99e
commit 3e029f3bac

View File

@ -45,7 +45,12 @@ end
local function redraw_all_tags()
for _, surface in pairs(game.surfaces) do
for _, corpse in pairs(surface.find_entities_filtered({name = 'character-corpse'})) do
draw_map_tag(corpse.surface, get_corpse_force(corpse), corpse.position)
if corpse.character_corpse_player_index then
local player = game.get_player(corpse.character_corpse_player_index)
draw_map_tag(corpse.surface, get_corpse_force(corpse), corpse.position, player.name)
else
draw_map_tag(corpse.surface, get_corpse_force(corpse), corpse.position)
end
end
end
end