Updated to OTCv8 3.0 rev 19

This commit is contained in:
OTCv8
2021-04-09 19:01:18 +00:00
parent a26109ce3f
commit 0298cece93
93 changed files with 13452 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
setDefaultTab("Tools")
local hotkey = "PageUp"
local candidates = {}
local m = macro(20, "Hold Mwall", function()
if #candidates == 0 then return end
for _, tile in pairs(candidates) do
if tile:canShoot() then
useWith(3180, tile:getTopUseThing())
end
end
end)
onRemoveThing(function(tile, thing)
if m.isOff() then return end
if thing:getId() ~= 2129 then return end
if tile:getText():len() > 0 then
table.insert(candidates, tile)
useWith(3180, tile:getTopUseThing())
end
end)
onAddThing(function(tile, thing)
if m.isOff() then return end
if thing:getId() ~= 2129 then return end
if tile:getText():len() > 0 then
table.remove(candidates, table.find(candidates,tile))
end
end)
onKeyPress(function(keys)
if m.isOff() then return end
if keys ~= hotkey then return end
local tile = getTileUnderCursor()
if not tile then return end
if tile:getText():len() > 0 then
tile:setText("")
else
tile:setText("MARKED")
table.insert(candidates, tile)
end
end)