Merge branch 'aperx' into main

This commit is contained in:
2025-01-30 16:49:14 +09:00
committed by GitHub
44 changed files with 533 additions and 604 deletions

View File

@@ -83,11 +83,16 @@ local tool_gui_waterfill_b = Gui.element("tool_gui_waterfill_b")
if Selection.is_selecting(player, SelectionWaterfillArea) then
Selection.stop(player)
return player.print{ "exp-commands_waterfill.exit" }
elseif player.get_item_count("cliff-explosives") == 0 then
return player.print{ "exp-commands_waterfill.requires-explosives" }
else
Selection.start(player, SelectionWaterfillArea)
return player.print{ "exp-commands_waterfill.enter" }
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)
return player.print{ "exp-commands_waterfill.enter" }
end
end
end)