Skip to content

Commit 8f3ab23

Browse files
committed
name more roadobject flags
1 parent 5082f15 commit 8f3ab23

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

Dat/Loaders/RoadObjectLoader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ internal enum DatRoadObjectFlags : uint16_t
141141
{
142142
None = 0,
143143
IsOneWay = 1 << 0,
144-
UseTracksMenu = 1 << 1,
144+
IsRailTransport = 1 << 1,
145145
unk_02 = 1 << 2,
146-
unk_03 = 1 << 3, // Likely isTram
147-
NoWheelSlipping = 1 << 4,
146+
AnyRoadTypeCompatible = 1 << 3,
147+
NoWheelSlip = 1 << 4,
148148
unk_05 = 1 << 5,
149149
IsRoad = 1 << 6, // If not set this is tram track
150150
AllowUseByAllCompanies = 1 << 7, // If set, all companies can use this road. If unset, only the player company can use it.

Definitions/ObjectModels/Objects/Road/RoadObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public IEnumerable<ValidationResult> Validate(ValidationContext validationContex
5959
yield return new ValidationResult("RoadMods.Count must be 2 or less", [nameof(RoadMods)]);
6060
}
6161

62-
if (Flags.HasFlag(RoadObjectFlags.unk_03) && RoadMods.Count != 0)
62+
if (Flags.HasFlag(RoadObjectFlags.AnyRoadTypeCompatible) && RoadMods.Count != 0)
6363
{
6464
yield return new ValidationResult("If unk_03 flag is set, RoadMods.Count must be 0", [nameof(Flags), nameof(RoadMods)]);
6565
}

Definitions/ObjectModels/Objects/Road/RoadObjectFlags.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ public enum RoadObjectFlags : uint16_t
55
{
66
None = 0,
77
IsOneWay = 1 << 0,
8-
UseTracksMenu = 1 << 1,
8+
IsRailTransport = 1 << 1,
99
unk_02 = 1 << 2,
10-
unk_03 = 1 << 3, // Likely isTram
11-
NoWheelSlipping = 1 << 4,
10+
AnyRoadTypeCompatible = 1 << 3,
11+
NoWheelSlip = 1 << 4,
1212
unk_05 = 1 << 5,
1313
IsRoad = 1 << 6, // If not set this is tram track
1414
AllowUseByAllCompanies = 1 << 7, // If set, all companies can use this road. If unset, only the player company can use it.

Tests/LoadSaveTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ void assertFunc(LocoObject obj, RoadObject struc) => Assert.Multiple(() =>
700700
Assert.That(struc.Flags, Is.EqualTo(
701701
RoadObjectFlags.IsOneWay
702702
| RoadObjectFlags.unk_02
703-
| RoadObjectFlags.unk_03
704-
| RoadObjectFlags.NoWheelSlipping
703+
| RoadObjectFlags.AnyRoadTypeCompatible
704+
| RoadObjectFlags.NoWheelSlip
705705
| RoadObjectFlags.IsRoad
706706
| RoadObjectFlags.AllowUseByAllCompanies
707707
| RoadObjectFlags.CanHaveStreetLights), nameof(struc.Flags));

0 commit comments

Comments
 (0)