1
1
namespace OpenLocoTool . DatFileParsing
2
2
{
3
3
[ AttributeUsage ( AttributeTargets . Parameter | AttributeTargets . Property , AllowMultiple = false ) ]
4
- public class LocoArrayLengthAttribute : Attribute
4
+ public class LocoArrayLengthAttribute ( int length ) : Attribute
5
5
{
6
- public LocoArrayLengthAttribute ( int length ) => Length = length ;
7
- public int Length { get ; }
6
+ public int Length => length ;
8
7
}
9
8
10
9
[ AttributeUsage ( AttributeTargets . Parameter | AttributeTargets . Property , AllowMultiple = false ) ]
11
- public class LocoStructOffsetAttribute : Attribute
10
+ public class LocoStructOffsetAttribute ( int offset ) : Attribute
12
11
{
13
- public LocoStructOffsetAttribute ( int offset ) => Offset = offset ;
14
-
15
- public int Offset { get ; }
12
+ public int Offset => offset ;
16
13
}
17
14
18
15
[ AttributeUsage ( AttributeTargets . Class | AttributeTargets . Struct , AllowMultiple = false ) ]
19
- public class LocoStructSizeAttribute : Attribute
16
+ public class LocoStructSizeAttribute ( int size ) : Attribute
20
17
{
21
- public LocoStructSizeAttribute ( int size ) => Size = size ;
22
-
23
- public int Size { get ; }
18
+ public int Size => size ;
24
19
}
25
20
26
21
[ AttributeUsage ( AttributeTargets . Class | AttributeTargets . Struct , AllowMultiple = false ) ]
27
- public class LocoStringTableAttribute : Attribute
22
+ public class LocoStringTableAttribute ( params string [ ] names ) : Attribute
28
23
{
29
- public LocoStringTableAttribute ( params string [ ] names )
30
- {
31
- Names = names ;
32
- }
33
-
34
- public string [ ] Names { get ; }
24
+ public string [ ] Names => names ;
35
25
36
26
public int Count => Names . Length ;
37
27
}
@@ -40,4 +30,9 @@ public LocoStringTableAttribute(params string[] names)
40
30
[ AttributeUsage ( AttributeTargets . Parameter | AttributeTargets . Property , AllowMultiple = false ) ]
41
31
public class LocoStructVariableLoadAttribute : Attribute
42
32
{ }
33
+
34
+ // basically a 'skip' attribute to allow deferred loading for variable data, and writing of this property will be 0
35
+ [ AttributeUsage ( AttributeTargets . Parameter | AttributeTargets . Property , AllowMultiple = false ) ]
36
+ public class LocoStructZeroAttribute : Attribute
37
+ { }
43
38
}
0 commit comments