1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00
CC-Tweaked/src/main/resources/data/computercraft/lua/rom/programs/id.lua
SquidDev 5e462adc5c Relocate all resource files
- textures/{block,item}s -> textures/{block,item}
 - assets/*/{advancements,lua,recipes} -> data/*/...
2019-04-02 13:18:43 +01:00

30 lines
622 B
Lua

local sDrive = nil
local tArgs = { ... }
if #tArgs > 0 then
sDrive = tostring( tArgs[1] )
end
if sDrive == nil then
print( "This is computer #"..os.getComputerID() )
local label = os.getComputerLabel()
if label then
print( "This computer is labelled \""..label.."\"" )
end
else
local bData = disk.hasData( sDrive )
if not bData then
print( "No disk in drive "..sDrive )
return
end
print( "The disk is #"..disk.getID( sDrive ) )
local label = disk.getLabel( sDrive )
if label then
print( "The disk is labelled \""..label.."\"" )
end
end