mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-06 12:02:52 +00:00

Unfortunately we can't apply the config changes due to backwards compatibility. This'll be something we may need to PR into Forge. CraftTweaker support still needs to be added.
30 lines
636 B
Lua
30 lines
636 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
|