diff options
author | ubq323 <ubq323@ubq323.website> | 2024-04-03 23:31:08 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-04-03 23:31:08 +0100 |
commit | cad7554b1e466c59cb5b1c90311dd285f9a4aef7 (patch) | |
tree | e792d4014a4a93cc315626b16d23829be1e79036 | |
parent | 71421a2f3ee77dfee38f2f9cf79da75b644dbd40 (diff) |
launch cactus
-rw-r--r-- | cactus.lua | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,7 +1,7 @@ -local function ensure_equipped(item) +local function ensure_equipped(ptype, item) local cur = peripheral.getType"left" print(cur) - if cur == item then return true end + if cur == ptype then return true end for i = 1,16 do local det = turtle.getItemDetail(i) if det and det.name == item then @@ -12,7 +12,10 @@ local function ensure_equipped(item) return false, "couldn't find "..item end -assert(ensure_equipped "computercraft:wireless_modem_normal") +local function ensure_modem() ensure_equipped("modem","computercraft:wireless_modem_normal") end +local function ensure_scanner() error("aaa") end + +assert(ensure_modem()) local loc = vector.new(gps.locate) print(loc) |