File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Definitions/ObjectModels/Objects/Building Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Definitions . ObjectModels . Objects . Building ;
4
4
5
- public class BuildingObject : ILocoStruct
5
+ public enum CardinalDirection : uint8_t
6
+ {
7
+ South ,
8
+ West ,
9
+ North ,
10
+ East ,
11
+ }
12
+
13
+ public class BuildingObject : ILocoStruct , IImageTableNameProvider
6
14
{
7
15
public uint16_t DesignedYear { get ; set ; }
8
16
public uint16_t ObsoleteYear { get ; set ; }
@@ -39,4 +47,13 @@ public bool Validate()
39
47
&& BuildingAnimations . Count is not 0 and not > 63
40
48
&& BuildingHeights . Count == BuildingAnimations . Count
41
49
&& BuildingVariations . Count is not 0 and <= 31 ;
50
+
51
+ public bool TryGetImageName ( int id , out string ? value )
52
+ {
53
+ var direction = ( CardinalDirection ) ( id % 4 ) ;
54
+ var level = id / 4 ;
55
+ value = $ "{ direction } | Level { level } ";
56
+ return true ;
57
+ }
58
+
42
59
}
You can’t perform that action at this time.
0 commit comments