Skip to content

Commit

Permalink
Fix: Static buildings not getting shape info (causing them to not spawn)
Browse files Browse the repository at this point in the history
  • Loading branch information
john681611 committed Dec 9, 2024
1 parent a26831f commit e60e010
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/BriefingRoom/Data/JSON/DBEntryCargo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ namespace BriefingRoom4DCS.Data
internal class DBEntryCargo : DBEntryJSONUnit
{

internal string ShapeName { get; init; }

protected override bool OnLoad(string o)
{
throw new NotImplementedException();
Expand All @@ -50,7 +48,7 @@ internal static Dictionary<string, DBEntry> LoadJSON(string filepath, DatabaseLa
UIDisplayName = new LanguageString(LangDB, GetLanguageClassName(typeof(DBEntryCargo)), id, "displayName", @static.displayName),
DCSID = @static.type,
Operators = new Dictionary<Country, (Template.Decade start, Template.Decade end)> { { Country.ALL, (Template.Decade.Decade1940, Template.Decade.Decade2020) } },
ShapeName = @static.shapeName,
Shape = @static.shapeName,
Module = @static.module,
Families = new UnitFamily[] { UnitFamily.Cargo }
});
Expand Down
3 changes: 1 addition & 2 deletions src/BriefingRoom/Data/JSON/DBEntryStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ namespace BriefingRoom4DCS.Data
internal class DBEntryStatic : DBEntryJSONUnit
{

internal string ShapeName { get; init; }
internal int ParkingSpots { get; init; }

protected override bool OnLoad(string o)
Expand Down Expand Up @@ -59,7 +58,7 @@ internal static Dictionary<string, DBEntry> LoadJSON(string filepath, DatabaseLa
UIDisplayName = new LanguageString(LangDB, GetLanguageClassName(typeof(DBEntryStatic)), id, "displayName", @static.displayName),
DCSID = @static.type,
Operators = new Dictionary<Country, (Template.Decade start, Template.Decade end)> { { Country.ALL, (Template.Decade.Decade1940, Template.Decade.Decade2020) } },
ShapeName = @static.shapeName,
Shape = @static.shapeName,
Families = supportInfo.families.Select(x => (UnitFamily)Enum.Parse(typeof(UnitFamily), x, true)).ToArray(),
LowPolly = supportInfo.lowPolly,
Module = @static.module,
Expand Down

0 comments on commit e60e010

Please sign in to comment.