Don't use invalid defaults for loadouts (#28740)
* Don't use invalid defaults for loadouts At the time it made more sense but now with species specific stuff it's better to have nothing. * Loadout SetDefault only applies valid loadouts
This commit is contained in:
@@ -690,15 +690,15 @@ namespace Content.Shared.Preferences
|
||||
return profile;
|
||||
}
|
||||
|
||||
public RoleLoadout GetLoadoutOrDefault(string id, ProtoId<SpeciesPrototype>? species, IEntityManager entManager, IPrototypeManager protoManager)
|
||||
public RoleLoadout GetLoadoutOrDefault(string id, ICommonSession? session, ProtoId<SpeciesPrototype>? species, IEntityManager entManager, IPrototypeManager protoManager)
|
||||
{
|
||||
if (!_loadouts.TryGetValue(id, out var loadout))
|
||||
{
|
||||
loadout = new RoleLoadout(id);
|
||||
loadout.SetDefault(protoManager, force: true);
|
||||
loadout.SetDefault(this, session, protoManager, force: true);
|
||||
}
|
||||
|
||||
loadout.SetDefault(protoManager);
|
||||
loadout.SetDefault(this, session, protoManager);
|
||||
return loadout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user