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

0
placeholder.dfpwm Normal file
View File

View File

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