diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/pocket/equip.lua b/src/main/resources/assets/computercraft/lua/rom/programs/pocket/equip.lua index 44599a1c8..62aa7c98d 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/pocket/equip.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/pocket/equip.lua @@ -1,3 +1,8 @@ +if not pocket then + printError( "Requires a Pocket Computer" ) + return +end + local ok, err = pocket.equipBack() if not ok then printError( err ) diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/pocket/unequip.lua b/src/main/resources/assets/computercraft/lua/rom/programs/pocket/unequip.lua index 99189aa59..28308d407 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/pocket/unequip.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/pocket/unequip.lua @@ -1,3 +1,8 @@ +if not pocket then + printError( "Requires a Pocket Computer" ) + return +end + local ok, err = pocket.unequipBack() if not ok then printError( err ) diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/craft.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/craft.lua index 581229039..8b273c2d6 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/craft.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/craft.lua @@ -1,3 +1,7 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end if not turtle.craft then print( "Requires a Crafty Turtle" ) diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/dance.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/dance.lua index dc3c7d083..6f32a1df0 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/dance.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/dance.lua @@ -1,3 +1,6 @@ +if not turtle then + printError( "Requires a Turtle" ) +end local tMoves = { function() diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/equip.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/equip.lua index e10cf2dfb..0a8f2a480 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/equip.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/equip.lua @@ -1,3 +1,7 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end local tArgs = { ... } local function printUsage() diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/excavate.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/excavate.lua index 2c47f2986..677e43678 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/excavate.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/excavate.lua @@ -1,3 +1,7 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end local tArgs = { ... } if #tArgs ~= 1 then diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/go.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/go.lua index 19a1ee6ea..c84120ce0 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/go.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/go.lua @@ -1,3 +1,8 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end + local tArgs = { ... } if #tArgs < 1 then print( "Usage: go " ) diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/refuel.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/refuel.lua index 618b199cb..d9f606f8c 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/refuel.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/refuel.lua @@ -1,3 +1,7 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end local tArgs = { ... } local nLimit = 1 diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/tunnel.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/tunnel.lua index 4ee78ecde..9345a6225 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/tunnel.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/tunnel.lua @@ -1,3 +1,7 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end local tArgs = { ... } if #tArgs ~= 1 then diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/turn.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/turn.lua index deb6c5aa0..4ab6151ec 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/turn.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/turn.lua @@ -1,3 +1,8 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end + local tArgs = { ... } if #tArgs < 1 then print( "Usage: turn " ) diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/unequip.lua b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/unequip.lua index ababde40f..38e864f4b 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/turtle/unequip.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/turtle/unequip.lua @@ -1,3 +1,7 @@ +if not turtle then + printError( "Requires a Turtle" ) + return +end local tArgs = { ... } local function printUsage()