In BeamLib, dalla lista strategie si prendono solo quelle che sono attive
This commit is contained in:
+19
-10
@@ -881,7 +881,7 @@ end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function BeamLib.GetStrategiesFromList( Proc, StrategyList)
|
||||
-- cerco tra le feature
|
||||
-- cerco tra le feature
|
||||
for i = 1, #StrategyList.FEATURE do
|
||||
-- se trovo la feature
|
||||
if Proc.nPrc == StrategyList.FEATURE[i].nPrc then
|
||||
@@ -899,16 +899,25 @@ function BeamLib.GetStrategiesFromList( Proc, StrategyList)
|
||||
|
||||
-- si controlla gruppo
|
||||
if bGroupIsCompatible then
|
||||
if #StrategyList.FEATURE[i].TopologyList == 1 and StrategyList.FEATURE[i].TopologyList[1].sName == 'Feature' then
|
||||
return BeamLib.TableCopyDeep( StrategyList.FEATURE[i].TopologyList[1].StrategyList)
|
||||
else
|
||||
-- cerco tra le topologie
|
||||
for j = 1, #StrategyList.FEATURE[i].TopologyList do
|
||||
-- se trovo la topologia
|
||||
if Proc.Topology.sName == StrategyList.FEATURE[i].TopologyList[j].sName then
|
||||
-- ritorno le strategie disponibili per la feature che sto analizzando
|
||||
return BeamLib.TableCopyDeep( StrategyList.FEATURE[i].TopologyList[j].StrategyList)
|
||||
-- cerco tra le topologie
|
||||
for j = 1, #StrategyList.FEATURE[i].TopologyList do
|
||||
-- non si possono mischiare topologie specifiche con topologia 'Feature'. Se presente topologia 'Feature' allora deve essere esclusiva
|
||||
if StrategyList.FEATURE[i].TopologyList[j].sName == 'Feature' and #StrategyList.FEATURE[i].TopologyList > 1 then
|
||||
error( "UNEXPECTED ERROR: topology 'Feature' can't be mixed with others")
|
||||
end
|
||||
-- se trovo la topologia oppure se è 'Feature'
|
||||
if Proc.Topology.sName == StrategyList.FEATURE[i].TopologyList[j].sName or StrategyList.FEATURE[i].TopologyList[j].sName == 'Feature' then
|
||||
local ActiveStrategyList = {}
|
||||
-- aggiungo in lista solo le strategie attive
|
||||
if StrategyList.FEATURE[i].TopologyList[j].StrategyList then
|
||||
for k = 1, #StrategyList.FEATURE[i].TopologyList[j].StrategyList do
|
||||
if StrategyList.FEATURE[i].TopologyList[j].StrategyList[k].nIndexInList >= 0 then
|
||||
table.insert( ActiveStrategyList, BeamLib.TableCopyDeep( StrategyList.FEATURE[i].TopologyList[j].StrategyList[k]))
|
||||
end
|
||||
end
|
||||
end
|
||||
-- ritorno le strategie disponibili per la feature che sto analizzando, altrimenti nil se non ho trovato nulla
|
||||
return EgtIf( #ActiveStrategyList > 0, ActiveStrategyList, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user