mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-05-13 21:56:29 +02:00
set last_user on corpse
This commit is contained in:
parent
6d03a7dcd8
commit
2729efa99e
@ -1,5 +1,8 @@
|
|||||||
local function draw_map_tag(surface, force, position)
|
local function draw_map_tag(surface, force, position, name)
|
||||||
force.add_chart_tag(surface, {icon = {type = 'item', name = 'heavy-armor'}, position = position, text = ' '})
|
local t = force.add_chart_tag(surface, {icon = {type = 'item', name = 'heavy-armor'}, position = position, text = ' '})
|
||||||
|
if name then
|
||||||
|
t.last_user = name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function is_tag_valid(tag)
|
local function is_tag_valid(tag)
|
||||||
@ -60,7 +63,7 @@ end
|
|||||||
|
|
||||||
local function on_player_died(event)
|
local function on_player_died(event)
|
||||||
local player = game.players[event.player_index]
|
local player = game.players[event.player_index]
|
||||||
draw_map_tag(player.surface, player.force, player.position)
|
draw_map_tag(player.surface, player.force, player.position, player.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_character_corpse_expired(event)
|
local function on_character_corpse_expired(event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user