updated
This commit is contained in:
0
placeholder.dfpwm
Normal file
0
placeholder.dfpwm
Normal 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user