updating
This commit is contained in:
126056
external_alarm.dfpwm
Normal file
126056
external_alarm.dfpwm
Normal file
File diff suppressed because one or more lines are too long
@@ -12,13 +12,6 @@ end
|
||||
|
||||
local function startup()
|
||||
speakerDriver.startup()
|
||||
print("Testing Control Room Speakers...")
|
||||
local speakerList = peripheral.find("speaker")
|
||||
for index, value in ipairs(speakerList) do
|
||||
print("Speaker " .. index .. ": " .. value.getName())
|
||||
end
|
||||
|
||||
speakerDriver.playControlRoomAlarm(controlRoomSpeakers)
|
||||
end
|
||||
|
||||
local function run()
|
||||
|
||||
@@ -9,7 +9,6 @@ local function getFileName(name)
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function playSound(speaker, fileName)
|
||||
local fileStream = getFileName(fileName)
|
||||
local values = io.lines(fileStream, 16 * 1024)
|
||||
@@ -23,11 +22,14 @@ local function playSound(speaker, fileName)
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function playControlRoomAlarm(speakers)
|
||||
playSound(speakers,"short_control_alarm")
|
||||
end
|
||||
|
||||
local function playExternalAlarm(speakers)
|
||||
playSound(speakers,"external_alarm")
|
||||
end
|
||||
|
||||
local function createSoundFile(fileName)
|
||||
|
||||
local baseRoute = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/"
|
||||
@@ -45,7 +47,6 @@ local function createSoundFile(fileName)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function addSoundFile(fileName)
|
||||
createSoundFile(fileName)
|
||||
end
|
||||
@@ -54,10 +55,10 @@ local function watch()
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function startup()
|
||||
local sounds = {
|
||||
{ fileName = "short_control_alarm" }
|
||||
{ fileName = "short_control_alarm" },
|
||||
{ fileName = "external_alarm" }
|
||||
}
|
||||
|
||||
for i, item in ipairs(sounds) do
|
||||
|
||||
Reference in New Issue
Block a user