1
- //Simplified BSD License (BSD-2-Clause)
1
+ //Simplified BSD License (BSD-2-Clause)
2
2
//
3
3
//Copyright (c) 2020, Christopher Lees, The OpenBVE Project
4
4
//
28
28
using OpenBveApi . FunctionScripting ;
29
29
using OpenBveApi . Hosts ;
30
30
using OpenBveApi . Math ;
31
+ using OpenBveApi . Objects ;
31
32
32
33
namespace Formats . OpenBve
33
34
{
@@ -136,8 +137,14 @@ public virtual bool GetVector3(T2 key, char separator, out Vector3 value)
136
137
return false ;
137
138
}
138
139
139
- /// <summary>Unconditionally reads the specified Color24 from the block</summary>
140
- public virtual bool GetColor24 ( T2 key , out Color24 value )
140
+ /// <summary>Reads the specified Vector3 from the block, preserving the prior value if not present</summary>
141
+ public virtual bool TryGetVector3 ( T2 key , char separator , ref Vector3 value )
142
+ {
143
+ return false ;
144
+ }
145
+
146
+ /// <summary>Unconditionally reads the specified Color24 from the block</summary>
147
+ public virtual bool GetColor24 ( T2 key , out Color24 value )
141
148
{
142
149
value = Color24 . White ;
143
150
return false ;
@@ -156,15 +163,29 @@ public virtual bool TryGetStringArray(T2 key, char separator, ref string[] value
156
163
return false ;
157
164
}
158
165
166
+ /// <summary>Reads the specified path array from the block</summary>
167
+ public virtual bool GetPathArray ( T2 key , char separator , string absolutePath , ref string [ ] values )
168
+ {
169
+ values = new string [ 0 ] ;
170
+ return false ;
171
+ }
172
+
173
+ /// <summary>Reads the specified FunctionScript from the block, preserving the prior value if not present</summary>
174
+ public virtual bool GetFunctionScript ( T2 key , out AnimationScript function )
175
+ {
176
+ function = null ;
177
+ return false ;
178
+ }
179
+
159
180
/// <summary>Reads the specified FunctionScript from the block, preserving the prior value if not present</summary>
160
- public virtual bool GetFunctionScript ( T2 key , out FunctionScript function )
181
+ public virtual bool GetFunctionScript ( T2 [ ] keys , string absolutePath , out AnimationScript function )
161
182
{
162
183
function = null ;
163
184
return false ;
164
185
}
165
186
166
- /// <summary>Reads the specified Enum value from the block</summary>
167
- public virtual bool GetEnumValue < T3 > ( T2 key , out T3 enumValue ) where T3 : struct , Enum
187
+ /// <summary>Reads the specified Enum value from the block</summary>
188
+ public virtual bool GetEnumValue < T3 > ( T2 key , out T3 enumValue ) where T3 : struct , Enum
168
189
{
169
190
enumValue = default ;
170
191
return false ;
@@ -193,12 +214,23 @@ public virtual bool GetNextRawValue(out string s)
193
214
return false ;
194
215
}
195
216
217
+ public virtual bool GetNextPath ( string absolutePath , out string finalPath )
218
+ {
219
+ finalPath = string . Empty ;
220
+ return false ;
221
+ }
222
+
223
+ public virtual bool GetDamping ( T2 key , char separator , out Damping damping )
224
+ {
225
+ damping = null ;
226
+ return false ;
227
+ }
196
228
197
- protected Block ( int myIndex , T1 myKey , HostInterface host )
229
+ protected Block ( int myIndex , T1 myKey , HostInterface currentHost )
198
230
{
199
231
Index = myIndex ;
200
232
Key = myKey ;
201
- currentHost = host ;
233
+ this . currentHost = currentHost ;
202
234
}
203
235
}
204
236
}
0 commit comments