@@ -395,9 +395,9 @@ Module moduleB2S
395395 Return _defaultValue
396396 End Function
397397 Public Function SafeParseBool(_value As String , _defaultValue As Boolean ) As Boolean
398- Dim result As Boolean
399- If Boolean .TryParse(_value, result) Then
400- Return result
398+ Dim result As Integer
399+ If Integer .TryParse(_value, result) Then
400+ Return result = 1
401401 End If
402402 Return _defaultValue
403403 End Function
@@ -613,6 +613,8 @@ Module moduleB2S
613613 animation.LockInvolvedLamps = SafeParseBool(animationNode.Attributes( "LockInvolvedLamps" )?.Value, False )
614614 animation.HideScoreDisplays = SafeParseBool(animationNode.Attributes( "HideScoreDisplays" )?.Value, False )
615615 animation.BringToFront = SafeParseBool(animationNode.Attributes( "BringToFront" )?.Value, False )
616+ animation.RandomStart = SafeParseBool(animationNode.Attributes( "RandomStart" )?.Value, False )
617+ animation.RandomQuality = SafeParseInt(animationNode.Attributes( "RandomQuality" )?.Value, 1 )
616618
617619 ' Read animation steps
618620 For Each stepNode As Xml.XmlNode In animationNode.SelectNodes( "AnimationStep" )
@@ -655,6 +657,8 @@ Module moduleB2S
655657 animationNode.SetAttribute( "LockInvolvedLamps" , If (_animationHeader.LockInvolvedLamps, "1" , "0" ))
656658 animationNode.SetAttribute( "HideScoreDisplays" , If (_animationHeader.HideScoreDisplays, "1" , "0" ))
657659 animationNode.SetAttribute( "BringToFront" , If (_animationHeader.BringToFront, "1" , "0" ))
660+ animationNode.SetAttribute( "RandomStart" , If (_animationHeader.RandomStart, "1" , "0" ))
661+ animationNode.SetAttribute( "RandomQuality" , CType (_animationHeader.RandomQuality, Integer ).ToString())
658662
659663 ' Add Animation Steps as child nodes
660664 For Each stepItem As Animation.AnimationStep In _animationHeader.AnimationSteps
0 commit comments