This commit is contained in:
2025-06-15 20:04:24 -04:00
parent c3e08817b3
commit 13fdd68454
2 changed files with 2 additions and 8 deletions

View File

@@ -33,25 +33,19 @@ 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 placeholder = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/placeholder.dfpwm"
local baseRoute = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/"
local name = getFileName(fileName)
local fullPath = baseRoute .. name
shell.execute("rm", name)
shell.execute("wget", fullPath, name)
local response = http.get(fullPath)
local fileData = response.readAll()
prepareFile(name)
local file = fs.open(name,"w")
file.close()
file.write(fileData)