mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
.
This commit is contained in:
@@ -43,19 +43,22 @@ Selection.on_selection(SelectionName, function(event)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local item_count_cliff = player.get_item_count("cliff-explosives")
|
local item_count_cliff = player.get_item_count("cliff-explosives")
|
||||||
local item_count_cliff_craft = math.min(math.floor(player.get_item_count("explosives") / 10), player.get_item_count("barrel"), player.get_item_count("grenade"))
|
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_type_bool = true
|
local item_count_type_bool = true
|
||||||
|
local item_count_cliff_ne = false
|
||||||
|
local item_count_craft_ne = false
|
||||||
|
|
||||||
if item_count_cliff > 0 and item_count_cliff < area_size then
|
if item_count_cliff < area_size then
|
||||||
|
item_count_cliff_ne = true
|
||||||
|
elseif item_count_craft < area_size then
|
||||||
|
item_count_craft_ne = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if item_count_cliff_ne and item_count_craft_ne then
|
||||||
player.print({ "exp-commands_waterfill.too-few-explosives", area_size, item_count_cliff }, Commands.print_settings.error)
|
player.print({ "exp-commands_waterfill.too-few-explosives", area_size, item_count_cliff }, Commands.print_settings.error)
|
||||||
return
|
return
|
||||||
elseif item_count_cliff_craft > 0 then
|
elseif item_count_cliff_ne and (not item_count_craft_ne) then
|
||||||
if item_count_cliff_craft < area_size then
|
item_count_type_bool = false
|
||||||
player.print({ "exp-commands_waterfill.too-few-explosives", area_size, item_count_cliff_craft }, Commands.print_settings.error)
|
|
||||||
return
|
|
||||||
else
|
|
||||||
item_count_type_bool = false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local tile_count = 0
|
local tile_count = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user