mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
.
This commit is contained in:
@@ -83,11 +83,13 @@ local tool_gui_waterfill_b =
|
|||||||
if Selection.is_selecting(player, SelectionWaterfillArea) then
|
if Selection.is_selecting(player, SelectionWaterfillArea) then
|
||||||
Selection.stop(player)
|
Selection.stop(player)
|
||||||
return player.print{ "exp-commands_waterfill.exit" }
|
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
|
else
|
||||||
Selection.start(player, SelectionWaterfillArea)
|
if player.get_item_count("cliff-explosives") == 0 then
|
||||||
return player.print{ "exp-commands_waterfill.enter" }
|
return player.print{ "exp-commands_waterfill.requires-explosives" }
|
||||||
|
else
|
||||||
|
Selection.start(player, SelectionWaterfillArea)
|
||||||
|
return player.print{ "exp-commands_waterfill.enter" }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ Selection.on_selection(SelectionName, function(event)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
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_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 < area_size then
|
if item_count_total < area_size then
|
||||||
player.print({ "exp-commands_waterfill.too-few-explosives", area_size, item_count_total }, Commands.print_settings.error)
|
player.print({ "exp-commands_waterfill.too-few-explosives", area_size, item_count_total }, Commands.print_settings.error)
|
||||||
|
|||||||
Reference in New Issue
Block a user