#SCoRING - suppress autocreation of CSV files better

This commit is contained in:
Applevangelist 2025-10-05 13:52:22 +02:00
parent 5ae6495e69
commit db138be5f3

View File

@ -321,7 +321,9 @@ function SCORING:New( GameName, SavePath, AutoSave )
-- Create the CSV file. -- Create the CSV file.
self.AutoSavePath = SavePath self.AutoSavePath = SavePath
self.AutoSave = AutoSave or true self.AutoSave = AutoSave or true
self:OpenCSV( GameName ) if self.AutoSave == true then
self:OpenCSV( GameName )
end
return self return self
@ -1935,7 +1937,7 @@ function SCORING:ScoreCSV( PlayerName, TargetPlayerName, ScoreType, ScoreTimes,
TargetUnitType = TargetUnitType or "" TargetUnitType = TargetUnitType or ""
TargetUnitName = TargetUnitName or "" TargetUnitName = TargetUnitName or ""
if lfs and io and os and self.AutoSave then if lfs and io and os and self.AutoSave == true and self.CSVFile ~= nil then
self.CSVFile:write( self.CSVFile:write(
'"' .. self.GameName .. '"' .. ',' .. '"' .. self.GameName .. '"' .. ',' ..
'"' .. self.RunTime .. '"' .. ',' .. '"' .. self.RunTime .. '"' .. ',' ..