- Corretto ID strategia STR0015

- Paramtri generali sono pre-processati quindi si deve controllare che non siano nil, perchè potrebbero esserci, ma essere falsi
This commit is contained in:
andrea.villa
2025-10-29 13:11:53 +01:00
parent dd0b39df71
commit fa36c51de0
4 changed files with 10 additions and 16 deletions
+6 -6
View File
@@ -500,7 +500,7 @@ function BeamLib.GetPieceGeneralParameters( Part, DefaultGeneralParamList)
GeneralParameters[DefaultGeneralParamList[i].sName] = xParameterValue
end
else
if GENERAL_PARAMETERS.BTL and GENERAL_PARAMETERS.BTL[Part.sBTLInfo] and GENERAL_PARAMETERS.BTL[Part.sBTLInfo][DefaultGeneralParamList[i].sName] then
if GENERAL_PARAMETERS.BTL and GENERAL_PARAMETERS.BTL[Part.sBTLInfo] and GENERAL_PARAMETERS.BTL[Part.sBTLInfo][DefaultGeneralParamList[i].sName] ~= nil then
GeneralParameters[DefaultGeneralParamList[i].sName] = GENERAL_PARAMETERS.BTL[Part.sBTLInfo][DefaultGeneralParamList[i].sName]
elseif GENERAL_PARAMETERS.PROJECT[DefaultGeneralParamList[i].sName] then
GeneralParameters[DefaultGeneralParamList[i].sName] = GENERAL_PARAMETERS.PROJECT[DefaultGeneralParamList[i].sName]
@@ -515,11 +515,11 @@ end
local function GetInheritedParameter( Part, sSourceParamName)
local sValue = nil
if sSourceParamName and #sSourceParamName > 0 then
if Part.GeneralParameters[sSourceParamName] then
if Part.GeneralParameters[sSourceParamName] ~= nil then
sValue = Part.GeneralParameters[sSourceParamName]
elseif GENERAL_PARAMETERS.BTL and GENERAL_PARAMETERS.BTL[Part.sBTLInfo] and GENERAL_PARAMETERS.BTL[Part.sBTLInfo][sSourceParamName] then
elseif GENERAL_PARAMETERS.BTL and GENERAL_PARAMETERS.BTL[Part.sBTLInfo] and GENERAL_PARAMETERS.BTL[Part.sBTLInfo][sSourceParamName] ~= nil then
sValue = GENERAL_PARAMETERS.BTL[Part.sBTLInfo][sSourceParamName]
elseif GENERAL_PARAMETERS.PROJECT[sSourceParamName] then
elseif GENERAL_PARAMETERS.PROJECT[sSourceParamName] ~= nil then
sValue = GENERAL_PARAMETERS.PROJECT[sSourceParamName]
end
end
@@ -611,13 +611,13 @@ function BeamLib.LoadGeneralParametersInList( DefaultGeneralParamList)
-- aggiornamento parametri BTL
local BTLInfo = EgtGetNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
for j = 1, #BTLInfo do
local BTLName = EgtGetInfo( BTLInfo[j], 'PROJECT', 's')
local BTLName = EgtGetInfo( BTLInfo[j], 'PROJ', 's')
if BTLName then
UpdatedParameters.BTL[BTLName] = {}
UpdatedParameters.BTL[BTLName].sAISetupConfig = EgtGetInfo( BTLInfo[j], 'AISETUP', 's') or nil
for i = 1, #DefaultGeneralParamList do
local sParamNameNGE = DefaultGeneralParamList[i].sNameNge
local xParameterValue = EgtGetInfo( BTLInfo[j], sParamNameNGE, 's') or DefaultGeneralParamList[i].sValue
local xParameterValue = EgtGetInfo( BTLInfo[j], sParamNameNGE, 's')
-- salvataggio dato su lista con accesso diretto
if DefaultGeneralParamList[i].sType == 'b' then
UpdatedParameters.BTL[BTLName][DefaultGeneralParamList[i].sName] = xParameterValue == 'true' or xParameterValue == '1' or xParameterValue == true