Maybe fix invalid loadout prototypes (#28734)
* Maybe fix invalid loadout prototypes So if we have existing data SetDefault is not normally called iirc. So what I think is happening is that if we have old loadout groups that get saved to DB and loaded these get dropped entirely and nothing is used to replace the group unless the person specifically looks at their loadout. Need someone affected to send me their loadout to confirm it's fixed. * Better fix
This commit is contained in:
@@ -467,10 +467,10 @@ namespace Content.Shared.Preferences
|
||||
var configManager = collection.Resolve<IConfigurationManager>();
|
||||
var prototypeManager = collection.Resolve<IPrototypeManager>();
|
||||
|
||||
if (!prototypeManager.TryIndex<SpeciesPrototype>(Species, out var speciesPrototype) || speciesPrototype.RoundStart == false)
|
||||
if (!prototypeManager.TryIndex(Species, out var speciesPrototype) || speciesPrototype.RoundStart == false)
|
||||
{
|
||||
Species = SharedHumanoidAppearanceSystem.DefaultSpecies;
|
||||
speciesPrototype = prototypeManager.Index<SpeciesPrototype>(Species);
|
||||
speciesPrototype = prototypeManager.Index(Species);
|
||||
}
|
||||
|
||||
var sex = Sex switch
|
||||
|
||||
Reference in New Issue
Block a user