From 93ea19e2906714aeff755545f4931b754a26295e Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 19 Apr 2025 00:20:48 +0900 Subject: [PATCH] . --- exp_scenario/module/commands/waterfill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exp_scenario/module/commands/waterfill.lua b/exp_scenario/module/commands/waterfill.lua index 633d5188..04f37bfd 100644 --- a/exp_scenario/module/commands/waterfill.lua +++ b/exp_scenario/module/commands/waterfill.lua @@ -95,7 +95,7 @@ Selection.on_selection(SelectionName, function(event) surface.set_tiles(tiles_to_make, true, "abort_on_collision", true, false, player, 0) local remaining_tiles = surface.count_tiles_filtered{ area = area, name = tile_to_apply } - local t_diff = tile_count - remaining_tiles + local t_diff = math.max(tile_count - remaining_tiles, 0) if item_count_cliff >= t_diff then player.remove_item{ name = "cliff-explosives", count = t_diff }