From 3be9e853286ae737f2fdca2b5285c877f88c052e Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Mon, 29 Jul 2024 12:11:22 +0200 Subject: [PATCH] Mtn v3 - fix bug upon season reset --- maps/mountain_fortress_v3/stateful/table.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/maps/mountain_fortress_v3/stateful/table.lua b/maps/mountain_fortress_v3/stateful/table.lua index 6d0a3b03..96d280a0 100644 --- a/maps/mountain_fortress_v3/stateful/table.lua +++ b/maps/mountain_fortress_v3/stateful/table.lua @@ -87,9 +87,17 @@ local function notify_season_over_to_discord() for name, buff_data in pairs(stateful.buffs_collected) do if type(buff_data.amount) ~= 'table' and name ~= 'starting_items' then if name == 'xp_level' or name == 'xp_bonus' or name == 'character_health_bonus' then - buffs = buffs .. buff_to_string[name] .. ': ' .. buff_data.count + if buff_data.count and buff_to_string[name] then + buffs = buffs .. buff_to_string[name] .. ': ' .. buff_data.count + else + buffs = buffs .. name .. ': Active' + end else - buffs = buffs .. buff_to_string[name] .. ': ' .. (buff_data.count * 100) .. '%' + if buff_data.count and buff_to_string[name] then + buffs = buffs .. buff_to_string[name] .. ': ' .. (buff_data.count * 100) .. '%' + else + buffs = buffs .. name .. ': Active' + end end buffs = buffs .. '\n' end