Add LUA setting files to .cfg and .log

This commit is contained in:
D4rkl1ght3r
2025-03-29 09:04:09 +01:00
parent fea1fc6c73
commit c2ebc767fe
8 changed files with 22 additions and 12 deletions

View File

@@ -19,61 +19,71 @@ rem.ConfigureWeaponFire({
-- Dynamic Enviroments and Characters
local char_gen = "trent"
local fileChar = io.open(".\\REM\\Avatars\\characters.txt", "w")
local fileChar = io.open(".\\REM\\Avatars\\characters.cfg", "w")
if fileChar then
fileChar:write(char_gen)
fileChar:close()
print("Setting Character to " .. char_gen)
else
print("Error while opening characters.txt")
print("Error while opening characters.cfg")
end
local gcs_state = "off"
local fileGCS = io.open(".\\REM\\LUA\\DYNAMIC\\gcs_state.cfg", "w")
if fileGCS then
fileGCS:write(gcs_state)
fileGCS:close()
print("Setting gcs_state to " .. gcs_state)
else
print("Error while opening gcs_state.cfg")
end
local months_gen = os.date("%B")
local fileMonths = io.open(".\\REM\\LUA\\DYNAMIC\\months.txt", "w")
local fileMonths = io.open(".\\REM\\LUA\\DYNAMIC\\months.cfg", "w")
if fileMonths then
fileMonths:write(months_gen)
fileMonths:close()
print("Setting Month to " .. months_gen)
else
print("Error while opening months.txt")
print("Error while opening months.cfg")
end
local day_gen = os.date("%d")
local fileDay = io.open(".\\REM\\LUA\\DYNAMIC\\day.txt", "w")
local fileDay = io.open(".\\REM\\LUA\\DYNAMIC\\day.cfg", "w")
if fileDay then
fileDay:write(day_gen)
fileDay:close()
print("Setting Day to " .. day_gen)
else
print("Error while opening day.txt")
print("Error while opening day.cfg")
end
local manhattan_gen = "origin"
local fileManhattan = io.open(".\\REM\\LUA\\DYNAMIC\\manhattan.txt", "w")
local fileManhattan = io.open(".\\REM\\LUA\\DYNAMIC\\manhattan.cfg", "w")
if fileManhattan then
fileManhattan:write(manhattan_gen)
fileManhattan:close()
print("Setting Manhattan Scene to " .. manhattan_gen)
else
print("Error while opening manhattan.txt")
print("Error while opening manhattan.cfg")
end
local toledo_gen = "origin"
local fileToledo = io.open(".\\REM\\LUA\\DYNAMIC\\toledo.txt", "w")
local fileToledo = io.open(".\\REM\\LUA\\DYNAMIC\\toledo.cfg", "w")
if fileToledo then
fileToledo:write(toledo_gen)
fileToledo:close()
print("Setting Toledo Scene to " .. toledo_gen)
else
print("Error while opening toledo.txt")
print("Error while opening toledo.cfg")
end
local rochester_gen = "origin"
local fileRochester = io.open(".\\REM\\LUA\\DYNAMIC\\rochester.txt", "w")
local fileRochester = io.open(".\\REM\\LUA\\DYNAMIC\\rochester.cfg", "w")
if fileRochester then
fileRochester:write(rochester_gen)
fileRochester:close()
print("Setting Rochester Scene to " .. rochester_gen)
else
print("Error while opening rochester.txt")
print("Error while opening rochester.cfg")
end