Bugfix for SET

This commit is contained in:
FlightControl 2016-06-07 13:20:29 +02:00
parent 0573ebb919
commit a8a87be9c4
18 changed files with 17 additions and 5 deletions

View File

@ -288,9 +288,13 @@ function SET_BASE:ForEach( IteratorFunction, arg, Set, Function, FunctionArgumen
local Count = 0 local Count = 0
for ObjectID, Object in pairs( Set ) do for ObjectID, Object in pairs( Set ) do
self:T2( Object ) self:T2( Object )
if Function then
if Function( unpack( FunctionArguments ), Object ) == true then if Function( unpack( FunctionArguments ), Object ) == true then
IteratorFunction( Object, unpack( arg ) ) IteratorFunction( Object, unpack( arg ) )
end end
else
IteratorFunction( Object, unpack( arg ) )
end
Count = Count + 1 Count = Count + 1
if Count % 10 == 0 then if Count % 10 == 0 then
coroutine.yield( false ) coroutine.yield( false )

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20160607_1223' ) env.info( 'Moose Generation Timestamp: 20160607_1320' )
local base = _G local base = _G
env.info("Loading MOOSE " .. base.timer.getAbsTime() ) env.info("Loading MOOSE " .. base.timer.getAbsTime() )
@ -9628,9 +9628,13 @@ function SET_BASE:ForEach( IteratorFunction, arg, Set, Function, FunctionArgumen
local Count = 0 local Count = 0
for ObjectID, Object in pairs( Set ) do for ObjectID, Object in pairs( Set ) do
self:T2( Object ) self:T2( Object )
if Function then
if Function( unpack( FunctionArguments ), Object ) == true then if Function( unpack( FunctionArguments ), Object ) == true then
IteratorFunction( Object, unpack( arg ) ) IteratorFunction( Object, unpack( arg ) )
end end
else
IteratorFunction( Object, unpack( arg ) )
end
Count = Count + 1 Count = Count + 1
if Count % 10 == 0 then if Count % 10 == 0 then
coroutine.yield( false ) coroutine.yield( false )

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20160607_1223' ) env.info( 'Moose Generation Timestamp: 20160607_1320' )
local base = _G local base = _G
env.info("Loading MOOSE " .. base.timer.getAbsTime() ) env.info("Loading MOOSE " .. base.timer.getAbsTime() )
@ -9628,9 +9628,13 @@ function SET_BASE:ForEach( IteratorFunction, arg, Set, Function, FunctionArgumen
local Count = 0 local Count = 0
for ObjectID, Object in pairs( Set ) do for ObjectID, Object in pairs( Set ) do
self:T2( Object ) self:T2( Object )
if Function then
if Function( unpack( FunctionArguments ), Object ) == true then if Function( unpack( FunctionArguments ), Object ) == true then
IteratorFunction( Object, unpack( arg ) ) IteratorFunction( Object, unpack( arg ) )
end end
else
IteratorFunction( Object, unpack( arg ) )
end
Count = Count + 1 Count = Count + 1
if Count % 10 == 0 then if Count % 10 == 0 then
coroutine.yield( false ) coroutine.yield( false )