public virtual void Load(XElement componentElement, bool usePrefabValues) { if (componentElement != null && !usePrefabValues) { foreach (XAttribute attribute in componentElement.Attributes()) { if (!SerializableProperties.TryGetValue(attribute.Name.ToString().ToLowerInvariant(), out SerializableProperty property)) { continue; } property.TrySetValue(this, attribute.Value); } ParseMsg(); OverrideRequiredItems(componentElement); } if (item.Submarine != null) { SerializableProperty.UpgradeGameVersion(this, originalElement, item.Submarine.Info.GameVersion); } }