This commit is contained in:
2025-06-15 19:58:15 -04:00
parent fd12b48736
commit c3e08817b3

View File

@@ -33,6 +33,12 @@ local function playInternalAlarm(speakers)
playSound(speakers,"internal_alarm")
end
local function prepareFile(name)
local file = fs.open(name,"w")
file.write("")
file.close()
end
local function createSoundFile(fileName)
local baseRoute = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/"
@@ -43,13 +49,18 @@ local function createSoundFile(fileName)
local response = http.get(fullPath)
local fileData = response.readAll()
prepareFile(name)
local file = fs.open(name,"w")
file.close()
file.write(fileData)
file.close()
response.close()
end
function addSoundFile(fileName)
createSoundFile(fileName)
end