[fix] fixed behaviour timeline map parsing

- added missing config.tickfactor when a map is used
This commit is contained in:
2020-01-29 01:19:11 -06:00
parent a5984f037e
commit 05a3a88f83

View File

@@ -156,8 +156,8 @@ class SimulationConfigParser(input: Map[String, Any], simulationBehaviours: Simu
if (!simulationBehaviours.get(name).isEmpty) funcPointer = Some((simulationBehaviours.get(name).get, args))
val output: mutable.Map[Int, Option[(SimulationBehaviour, Option[FunctionArgs])]] = mutable.Map()
timeLineVector.map(tuple => {
output(tuple._1) = funcPointer
if (!tuple._2.isEmpty && !output.contains(tuple._2.get)) output(tuple._2.get) = None // only set None when it doesnt exist yet
output(tuple._1 * config.tickfactor) = funcPointer
if (!tuple._2.isEmpty && !output.contains(tuple._2.get)) output(tuple._2.get * config.tickfactor) = None // only set None when it doesnt exist yet
})
output.toMap
}