Skip to content

Commit b236b94

Browse files
committed
more renames
1 parent 489fb81 commit b236b94

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

Dat/Objects/Industry/IndustryObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public record IndustryObject(
5656
[property: LocoStructOffset(0xED), LocoStructVariableLoad, LocoArrayLength(IndustryObject.MaxWallTypeCount)] List<S5Header> WallTypes, // There can be up to 4 different wall types for an industry
5757
[property: LocoStructOffset(0xF1), LocoStructVariableLoad, Browsable(false)] object_id _BuildingWall, // Selection of wall types isn't completely random from the 4 it is biased into 2 groups of 2 (wall and entrance)
5858
[property: LocoStructOffset(0xF2), LocoStructVariableLoad, Browsable(false)] object_id _BuildingWallEntrance, // An alternative wall type that looks like a gate placed at random places in building perimeter
59-
[property: LocoStructOffset(0xF3)] uint8_t var_F3
59+
[property: LocoStructOffset(0xF3)] uint8_t MonthlyClosureChance
6060
) : ILocoStruct, ILocoStructVariableData
6161
{
6262
public const int AnimationSequencesCount = 4;

Gui/ViewModels/DatTypes/Objects/IndustryViewModel.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class IndustryViewModel : LocoObjectViewModel<IndustryObject>
1919
[Reactive, Category("Production")] public BindingList<IndustryObjectProductionRateRange> InitialProductionRate { get; set; }
2020
[Reactive, Category("Production"), Length(0, IndustryObject.MaxProducedCargoType)] public BindingList<S5HeaderViewModel> ProducedCargo { get; set; }
2121
[Reactive, Category("Production"), Length(0, IndustryObject.MaxProducedCargoType)] public BindingList<S5HeaderViewModel> RequiredCargo { get; set; }
22+
[Reactive, Category("Production")] public uint8_t MonthlyClosureChance { get; set; }
2223
[Reactive, Category("Cost")] public uint8_t CostIndex { get; set; }
2324
[Reactive, Category("Cost")] public int16_t BuildCostFactor { get; set; }
2425
[Reactive, Category("Cost")] public int16_t SellCostFactor { get; set; }
@@ -37,11 +38,10 @@ public class IndustryViewModel : LocoObjectViewModel<IndustryObject>
3738
[Reactive, Category("Building")] public S5HeaderViewModel? BuildingWallEntrance { get; set; }
3839
[Reactive, Category("<unknown>")] public BindingList<IndustryObjectUnk38> var_38 { get; set; }
3940
[Reactive, Category("<unknown>")] public uint8_t var_E8 { get; set; }
40-
[Reactive, Category("<unknown>")] public uint8_t var_E9 { get; set; }
41-
[Reactive, Category("<unknown>")] public uint8_t var_EA { get; set; }
42-
[Reactive, Category("<unknown>")] public uint8_t var_EB { get; set; }
43-
[Reactive, Category("<unknown>")] public uint8_t var_EC { get; set; }
44-
[Reactive, Category("<unknown>")] public uint8_t var_F3 { get; set; }
41+
[Reactive, Category("Farm")] public uint8_t FarmTileNumImageAngles { get; set; }
42+
[Reactive, Category("Farm")] public uint8_t FarmGrowthStageWithNoProduction { get; set; }
43+
[Reactive, Category("Farm")] public uint8_t FarmIdealSize { get; set; }
44+
[Reactive, Category("Farm")] public uint8_t FarmNumStagesOfGrowth { get; set; }
4545

4646
public IndustryViewModel(IndustryObject io)
4747
{
@@ -72,11 +72,11 @@ public IndustryViewModel(IndustryObject io)
7272
MapColour = io.MapColour;
7373
Flags = io.Flags;
7474
var_E8 = io.var_E8;
75-
var_E9 = io.FarmTileNumImageAngles;
76-
var_EA = io.FarmGrowthStageWithNoProduction;
77-
var_EB = io.FarmIdealSize;
78-
var_EC = io.FarmNumStagesOfGrowth;
79-
var_F3 = io.var_E8;
75+
FarmTileNumImageAngles = io.FarmTileNumImageAngles;
76+
FarmGrowthStageWithNoProduction = io.FarmGrowthStageWithNoProduction;
77+
FarmIdealSize = io.FarmIdealSize;
78+
FarmNumStagesOfGrowth = io.FarmNumStagesOfGrowth;
79+
MonthlyClosureChance = io.MonthlyClosureChance;
8080
}
8181

8282
// validation:
@@ -106,11 +106,11 @@ public override IndustryObject GetAsStruct(IndustryObject io)
106106
MapColour = MapColour,
107107
Flags = Flags,
108108
var_E8 = var_E8,
109-
FarmTileNumImageAngles = var_E9,
110-
FarmGrowthStageWithNoProduction = var_EA,
111-
FarmIdealSize = var_EB,
112-
FarmNumStagesOfGrowth = var_EC,
113-
var_F3 = var_E8,
109+
FarmTileNumImageAngles = FarmTileNumImageAngles,
110+
FarmGrowthStageWithNoProduction = FarmGrowthStageWithNoProduction,
111+
FarmIdealSize = FarmIdealSize,
112+
FarmNumStagesOfGrowth = FarmNumStagesOfGrowth,
113+
MonthlyClosureChance = MonthlyClosureChance,
114114
};
115115
}
116116
}

Gui/ViewModels/DatTypes/Objects/RegionViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class RegionViewModel : LocoObjectViewModel<RegionObject>
1010
[Reactive] public BindingList<S5HeaderViewModel> RequiredObjects { get; set; }
1111
[Reactive] public BindingList<S5HeaderViewModel> DependentObjects { get; set; }
1212

13-
[Reactive] public BindingList<uint8_t> var_06 { get; set; }
14-
[Reactive] public BindingList<uint8_t> var_0D { get; set; }
13+
[Reactive, Category("<unknown>")] public BindingList<uint8_t> var_06 { get; set; }
14+
[Reactive, Category("<unknown>")] public BindingList<uint8_t> var_0D { get; set; }
1515

1616
public RegionViewModel(RegionObject ro)
1717
{

Tests/LoadSaveTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ void assertFunc(ILocoObject obj, IndustryObject struc) => Assert.Multiple(() =>
413413
Assert.That(struc.FarmGrowthStageWithNoProduction, Is.EqualTo(0), nameof(struc.FarmGrowthStageWithNoProduction));
414414
Assert.That(struc.FarmIdealSize, Is.EqualTo(0), nameof(struc.FarmIdealSize));
415415
Assert.That(struc.FarmNumStagesOfGrowth, Is.EqualTo(0), nameof(struc.FarmNumStagesOfGrowth));
416-
Assert.That(struc.var_F3, Is.EqualTo(1), nameof(struc.var_F3));
416+
Assert.That(struc.MonthlyClosureChance, Is.EqualTo(1), nameof(struc.MonthlyClosureChance));
417417
// Walls
418418
Assert.That(struc.WallTypes, Has.Count.EqualTo(0));
419419
// WallTypes
@@ -498,7 +498,7 @@ void assertFunc(ILocoObject obj, IndustryObject struc) => Assert.Multiple(() =>
498498
Assert.That(struc.FarmGrowthStageWithNoProduction, Is.EqualTo(0), nameof(struc.FarmGrowthStageWithNoProduction));
499499
Assert.That(struc.FarmIdealSize, Is.EqualTo(0), nameof(struc.FarmIdealSize));
500500
Assert.That(struc.FarmNumStagesOfGrowth, Is.EqualTo(0), nameof(struc.FarmNumStagesOfGrowth));
501-
Assert.That(struc.var_F3, Is.EqualTo(1), nameof(struc.var_F3));
501+
Assert.That(struc.MonthlyClosureChance, Is.EqualTo(1), nameof(struc.MonthlyClosureChance));
502502
// Walls
503503
Assert.That(struc.WallTypes, Has.Count.EqualTo(0));
504504
// WallTypes

0 commit comments

Comments
 (0)