fix: Fixes plant issue with old client (#1330)

This commit is contained in:
Kamron Batman 2023-02-04 09:33:07 -08:00 committed by GitHub
parent 0b4c73a8dd
commit df29fca0c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,8 +56,14 @@ namespace Server.Engines.Plants
public PlantSystem PlantSystem { get; private set; } public PlantSystem PlantSystem { get; private set; }
public ObjectPropertyList OldClientPropertyList => public ObjectPropertyList OldClientPropertyList
_oldClientPropertyList ??= InitializePropertyList(new ObjectPropertyList(this)); {
get
{
InitializePropertyList(_oldClientPropertyList ??= new ObjectPropertyList(this));
return _oldClientPropertyList;
}
}
public override bool ForceShowProperties => ObjectPropertyList.Enabled; public override bool ForceShowProperties => ObjectPropertyList.Enabled;
@ -239,12 +245,11 @@ namespace Server.Engines.Plants
InvalidateProperties(); InvalidateProperties();
} }
private ObjectPropertyList InitializePropertyList(ObjectPropertyList list) private void InitializePropertyList(ObjectPropertyList list)
{ {
GetProperties(list); GetProperties(list);
AppendChildProperties(list); AppendChildProperties(list);
list.Terminate(); list.Terminate();
return list;
} }
// Overridden to support new and old client localization // Overridden to support new and old client localization