mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 03:30:29 +00:00
id.lua now handles more disk types (#677)
Co-authored-by: Lupus590 <lupussolitarius590@gmail.com>
This commit is contained in:
parent
9d1ee6f61d
commit
c83eeb16a8
@ -13,16 +13,30 @@ if sDrive == nil then
|
|||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
local bData = disk.hasData(sDrive)
|
if disk.hasAudio(sDrive) then
|
||||||
if not bData then
|
local title = disk.getAudioTitle(sDrive)
|
||||||
|
if title then
|
||||||
|
print("Has audio track \"" .. title .. "\"")
|
||||||
|
else
|
||||||
|
print("Has untitled audio")
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not disk.hasData(sDrive) then
|
||||||
print("No disk in drive " .. sDrive)
|
print("No disk in drive " .. sDrive)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
print("The disk is #" .. disk.getID(sDrive))
|
local id = disk.getID(sDrive)
|
||||||
|
if id then
|
||||||
|
print("The disk is #" .. id)
|
||||||
|
else
|
||||||
|
print("Non-disk data source")
|
||||||
|
end
|
||||||
|
|
||||||
local label = disk.getLabel(sDrive)
|
local label = disk.getLabel(sDrive)
|
||||||
if label then
|
if label then
|
||||||
print("The disk is labelled \"" .. label .. "\"")
|
print("Labelled \"" .. label .. "\"")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user