Refactored pulse running logic, made it easier to follow and debug
Made the pulse runner use thread-safe collections instead of synchronizing on a thread-unsafe list
This commit is contained in:
@@ -55,10 +55,10 @@ object TestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
fun advanceTicks(amount: Int) {
|
||||
fun advanceTicks(amount: Int, skipPulseUpdates: Boolean = true) {
|
||||
SystemLogger.logInfo("Advancing ticks by $amount.")
|
||||
for(i in 0 until amount) {
|
||||
GameWorld.majorUpdateWorker.handleTickActions()
|
||||
GameWorld.majorUpdateWorker.handleTickActions(skipPulseUpdates)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user