This commit is contained in:
2025-01-29 00:32:54 +09:00
parent 9e1f7530e2
commit fc7c9d41ad

View File

@@ -41,12 +41,10 @@ Selection.on_selection(SelectionName, function(event)
return return
end end
local item_count_cliff = player.get_item_count("cliff-explosives") local item_count_total = player.get_item_count("cliff-explosives") + math.min(math.floor(player.get_item_count("explosives") / 10), player.get_item_count("barrel"), player.get_item_count("grenade"))
local item_count_craft = math.min(math.floor(player.get_item_count("explosives") / 10), player.get_item_count("barrel"), player.get_item_count("grenade"))
local item_count_total = item_count_cliff + item_count_craft
if item_count_total < area_size then if item_count_total < area_size then
player.print({ "exp-commands_waterfill.too-few-explosives", area_size, item_count_cliff }, Commands.print_settings.error) player.print({ "exp-commands_waterfill.too-few-explosives", area_size, item_count_total }, Commands.print_settings.error)
return return
end end