[fix] fixed behaviour timeline map parsing
- added missing config.tickfactor when a map is used
This commit is contained in:
@@ -156,8 +156,8 @@ class SimulationConfigParser(input: Map[String, Any], simulationBehaviours: Simu
|
|||||||
if (!simulationBehaviours.get(name).isEmpty) funcPointer = Some((simulationBehaviours.get(name).get, args))
|
if (!simulationBehaviours.get(name).isEmpty) funcPointer = Some((simulationBehaviours.get(name).get, args))
|
||||||
val output: mutable.Map[Int, Option[(SimulationBehaviour, Option[FunctionArgs])]] = mutable.Map()
|
val output: mutable.Map[Int, Option[(SimulationBehaviour, Option[FunctionArgs])]] = mutable.Map()
|
||||||
timeLineVector.map(tuple => {
|
timeLineVector.map(tuple => {
|
||||||
output(tuple._1) = funcPointer
|
output(tuple._1 * config.tickfactor) = funcPointer
|
||||||
if (!tuple._2.isEmpty && !output.contains(tuple._2.get)) output(tuple._2.get) = None // only set None when it doesnt exist yet
|
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
|
output.toMap
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user