1
0
mirror of https://github.com/kepler155c/opus synced 2024-12-29 10:00:26 +00:00
opus/sys/extensions/4.label.lua
kepler155c@gmail.com 1c1eb9b782 transition to kernel
2018-01-20 07:18:13 -05:00

16 lines
355 B
Lua

local os = _G.os
-- 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