mirror of
https://github.com/kepler155c/opus
synced 2024-11-16 21:54:49 +00:00
24 lines
474 B
Lua
24 lines
474 B
Lua
local os = _G.os
|
|
local peripheral = _G.peripheral
|
|
|
|
-- Default label
|
|
if not os.getComputerLabel() then
|
|
local id = os.getComputerID()
|
|
|
|
if _G.turtle then
|
|
os.setComputerLabel('turtle_' .. id)
|
|
|
|
elseif _G.pocket then
|
|
os.setComputerLabel('pocket_' .. id)
|
|
|
|
elseif _G.commands then
|
|
os.setComputerLabel('command_' .. id)
|
|
|
|
elseif peripheral.find('neuralInterface') then
|
|
os.setComputerLabel('neural_' .. id)
|
|
|
|
else
|
|
os.setComputerLabel('computer_' .. id)
|
|
end
|
|
end
|