Release 1.10.5.0 - Autumn Update 2025
This commit is contained in:
+21
-1
@@ -876,7 +876,18 @@ namespace Barotrauma
|
||||
Dictionary<Identifier, SerializableProperty> dictionary = new Dictionary<Identifier, SerializableProperty>();
|
||||
foreach (var property in properties)
|
||||
{
|
||||
var serializableProperty = new SerializableProperty(property);
|
||||
//if the getter is private, we must get it from the declaring type to access it and check if it exists
|
||||
SerializableProperty serializableProperty = null;
|
||||
try
|
||||
{
|
||||
serializableProperty = new SerializableProperty(property);
|
||||
}
|
||||
catch (AmbiguousMatchException)
|
||||
{
|
||||
//can happen e.g. with AnimController.CurrentGroundedParams, which is of an abstract type -
|
||||
//let's just ignore these types of properties (you can't really do anything with SerializableProperties that are reference types anyway)
|
||||
continue;
|
||||
}
|
||||
dictionary.Add(serializableProperty.Name.ToIdentifier(), serializableProperty);
|
||||
}
|
||||
|
||||
@@ -1066,6 +1077,15 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (attributeName == "unlockrecipe" || attributeName == "unlockrecipes")
|
||||
{
|
||||
var recipes = subElement.GetAttributeIdentifierImmutableHashSet("unlockrecipes",
|
||||
def: subElement.GetAttributeIdentifierImmutableHashSet("unlockrecipe", ImmutableHashSet<Identifier>.Empty));
|
||||
foreach (var recipe in recipes)
|
||||
{
|
||||
GameMain.GameSession?.UnlockRecipe(CharacterTeamType.Team1, recipe, showNotifications: false);
|
||||
}
|
||||
}
|
||||
|
||||
if (entity.SerializableProperties.TryGetValue(attributeName, out SerializableProperty property))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user