Add ID to Endemic Life Name Label

This commit is contained in:
GreenComfyTea
2023-10-09 15:19:54 +03:00
parent 39dbd23791
commit 2c7c229ec9
3 changed files with 19 additions and 6 deletions

View File

@@ -156,7 +156,18 @@ function this.draw(creature, position_on_screen, opacity_scale)
position_on_screen.x = position_on_screen.x - text_width / 2;
end
drawing.draw_label(creature.name_label, position_on_screen, opacity_scale, creature.name .. " " .. creature.id);
local cached_config = config.current_config.endemic_life_UI.creature_name_label.include;
local name_text = "";
if cached_config.name then
name_text = string.format("%s ", creature.name);
end
if cached_config.id then
name_text = string.format("%s%s ", name_text, tostring(creature.id));
end
drawing.draw_label(creature.name_label, position_on_screen, opacity_scale, name_text);
end
function this.init_list()