- Cleaned up debug lines
This commit is contained in:
Frank
2024-07-01 22:07:55 +02:00
parent 1ba1738aa0
commit 9ceb26c7b1
2 changed files with 5 additions and 20 deletions
-3
View File
@@ -2073,8 +2073,6 @@ function ATIS:onafterBroadcast( From, Event, To )
-- Cloud preset (DCS 2.7) -- Cloud preset (DCS 2.7)
local cloudspreset = clouds.preset or "Nothing" local cloudspreset = clouds.preset or "Nothing"
env.info("FF cloud preset "..cloudspreset)
-- Precepitation: 0=None, 1=Rain, 2=Thunderstorm, 3=Snow, 4=Snowstorm. -- Precepitation: 0=None, 1=Rain, 2=Thunderstorm, 3=Snow, 4=Snowstorm.
local precepitation = 0 local precepitation = 0
@@ -2102,7 +2100,6 @@ function ATIS:onafterBroadcast( From, Event, To )
else else
precepitation = 3 -- snow precepitation = 3 -- snow
end end
env.info("Fprecipt "..precepitation)
elseif cloudspreset:find( "RainyPreset" ) then elseif cloudspreset:find( "RainyPreset" ) then
-- Overcast + Rain -- Overcast + Rain
clouddens = 9 clouddens = 9
+5 -17
View File
@@ -3998,23 +3998,20 @@ end
-- @return #table The table filled with data from the csv file. -- @return #table The table filled with data from the csv file.
function UTILS.ReadCSV(filename) function UTILS.ReadCSV(filename)
if not UTILS.FileExists(filename) then if not UTILS.FileExists(filename) then
env.error("File does not exist") env.error("File does not exist")
return nil return nil
end end
--- Function that load data from a file. --- Function that load data from a file.
local function _loadfile( filename ) local function _loadfile( filename )
local f = io.open( filename, "rb" ) local f = io.open( filename, "rb" )
if f then if f then
-- self:I(self.lid..string.format("Loading player results from file %s", tostring(filename)))
local data = f:read( "*all" ) local data = f:read( "*all" )
f:close() f:close()
return data return data
else else
BASE:E( self.lid .. string.format( "WARNING: Could not load player results from file %s. File might not exist just yet.", tostring( filename ) ) ) BASE:E(string.format( "WARNING: Could read data from file %s!", tostring( filename ) ) )
return nil return nil
end end
end end
@@ -4032,9 +4029,7 @@ function UTILS.ReadCSV(filename)
local sep=";" local sep=";"
local columns=UTILS.Split(lines[1], sep) local columns=UTILS.Split(lines[1], sep)
BASE:I(columns)
-- Remove header line. -- Remove header line.
table.remove(lines, 1) table.remove(lines, 1)
@@ -4046,16 +4041,9 @@ function UTILS.ReadCSV(filename)
for j, value in pairs(UTILS.Split(line, sep)) do for j, value in pairs(UTILS.Split(line, sep)) do
local key=string.gsub(columns[j], "[\n\r]","") local key=string.gsub(columns[j], "[\n\r]","")
row[key]=value
--env.info(string.format("i=%d, j=%d key=%s value=%s", i,j, key, value))
row[key]=value
end end
table.insert(csvdata, row) table.insert(csvdata, row)
BASE:E(row)
end end