From 40bf727e49e9f2163234420a4ab305661965d3b9 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Wed, 29 Jan 2025 00:45:39 +0900 Subject: [PATCH] . --- exp_scenario/module/commands/waterfill.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exp_scenario/module/commands/waterfill.lua b/exp_scenario/module/commands/waterfill.lua index 9bb7e8d0..d59d912d 100644 --- a/exp_scenario/module/commands/waterfill.lua +++ b/exp_scenario/module/commands/waterfill.lua @@ -74,7 +74,9 @@ Selection.on_selection(SelectionName, function(event) if item_count_cliff >= t_diff then player.remove_item{ name = "cliff-explosives", count = t_diff } else - player.remove_item{ name = "cliff-explosives", count = item_count_cliff } + if item_count_cliff > 0 then + player.remove_item{ name = "cliff-explosives", count = item_count_cliff } + end local item_count_needed = t_diff - item_count_cliff if item_count_needed > 0 then player.remove_item{ name = "explosives", count = 10 * item_count_needed }