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:
vddcore
2022-07-16 07:36:44 +00:00
committed by Ryan
parent c7c97ea176
commit 895444f1a8
8 changed files with 88 additions and 153 deletions
+2 -2
View File
@@ -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)
}
}
}