opus/sys/extensions/4.label.lua

16 lines
355 B
Lua
Raw Normal View History

2018-01-20 12:18:13 +00:00
local os = _G.os
2018-01-14 21:44:43 +00:00
-- 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)
else
os.setComputerLabel('computer_' .. id)
end
end