From 4c257d14974cf34ce596cf7e99b1bf2896eb934e Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Wed, 29 Jan 2025 00:35:15 +0900 Subject: [PATCH] . --- exp_legacy/module/modules/gui/tool.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exp_legacy/module/modules/gui/tool.lua b/exp_legacy/module/modules/gui/tool.lua index 82123d1b..eaeede89 100644 --- a/exp_legacy/module/modules/gui/tool.lua +++ b/exp_legacy/module/modules/gui/tool.lua @@ -84,7 +84,10 @@ local tool_gui_waterfill_b = Selection.stop(player) return player.print{ "exp-commands_waterfill.exit" } else - if player.get_item_count("cliff-explosives") == 0 then + local item_count_cliff = player.get_item_count("cliff-explosives") + 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 == 0 then return player.print{ "exp-commands_waterfill.requires-explosives" } else Selection.start(player, SelectionWaterfillArea)