Skip to content

Commit

Permalink
add herbs total in bag
Browse files Browse the repository at this point in the history
  • Loading branch information
tjurczyk committed Mar 14, 2024
1 parent d86fbb7 commit cff0200
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skrypty/herbs/core_v2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ function herbs:v2_print_single(herbs_arr)
cecho("\n ------+-------------------------+-----------------------------------------------")
echo("\n")

local total_herbs_in_this_bag = 0
for herb_id, herb_value in pairs(herbs_arr) do
local amount = 0
amount = herb_value["amount"]
total_herbs_in_this_bag = total_herbs_in_this_bag + amount
local amount_tmp = " " .. tostring(amount)
local name_str = string.sub(herb_id .. " ", 0, 23)

Expand All @@ -226,6 +228,8 @@ function herbs:v2_print_single(herbs_arr)
cecho("\n")
end
cecho("--------------------------------------------------------------------------------\n")
cecho(" Ilosc ziol w woreczku to <green>"..total_herbs_in_this_bag.."<grey>, a wolne miejsce <green>"..(herbs["full_bag_amount"]-total_herbs_in_this_bag).."\n")
cecho("--------------------------------------------------------------------------------")
end

function herbs:get_clickable_teammate_data(teammate_name)
Expand Down

0 comments on commit cff0200

Please sign in to comment.