Use typed hull facets in entity state

This commit is contained in:
Meta Vens 2026-06-14 05:08:39 +01:00
commit 710a98bc8d
160 changed files with 413 additions and 308 deletions

View file

@ -388,6 +388,7 @@ internal static class LegacyCatalogReader
Description = description,
Mass = GetDouble(payload, 4),
SpecificHeat = GetPositiveDoubleOrDefault(payload, 6, 1),
Conductivity = GetPositiveDoubleOrDefault(payload, 7, 1),
Volume = shape.OccupiedCells,
ManufacturerLegacyId = GetOptionalGuid(payload, 3),
Price = GetInt(payload, 8),
@ -413,6 +414,10 @@ internal static class LegacyCatalogReader
MaximumTemperature = unionKey is 2 or 3 or 29 or 30 or 31 ? GetDouble(payload, 14) : 0,
ThermalPerformanceCurveKeys = unionKey is 2 or 3 or 29 or 30 or 31 ? ReadCurveKeys(payload, 17) : [],
HullPrefab = unionKey == 3 ? GetString(payload, 24) : "",
HullGridOffset = unionKey == 3 ? GetDouble(payload, 26) : 0,
HullArmor = unionKey == 3 ? GetDouble(payload, 27) : 0,
HullDrag = unionKey == 3 ? GetDouble(payload, 28) : 0,
HullCanTow = unionKey == 3 && GetBool(payload, 29),
SimpleCommodityCategory = unionKey == 0 ? GetEnumName(payload, 10, SimpleCommodityCategories) : "",
CompoundCommodityCategory = unionKey == 1 ? GetEnumName(payload, 11, CompoundCommodityCategories) : "",
WeaponRange = unionKey == 31 ? GetEnumName(payload, 24, WeaponRanges) : "",