updated
This commit is contained in:
@@ -35,21 +35,28 @@ end
|
|||||||
|
|
||||||
|
|
||||||
local function createSoundFile(fileName)
|
local function createSoundFile(fileName)
|
||||||
local placeholder = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/placeholder.dfpwm"
|
--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)
|
--shell.execute("wget", fullPath, name)
|
||||||
|
|
||||||
|
--print("Added placeholder sound file: " .. name)
|
||||||
|
|
||||||
local response = http.get(fullPath)
|
local response = http.get(fullPath)
|
||||||
|
|
||||||
|
print("Downloading sound file: " .. name)
|
||||||
|
|
||||||
local fileData = response.readAll()
|
local fileData = response.readAll()
|
||||||
|
|
||||||
local file = fs.open(name,"w")
|
local file = fs.open(name,"w")
|
||||||
|
|
||||||
file.write(fileData)
|
file.write(fileData)
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
response.close()
|
response.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user