Job starting gear is now defined in the starting gear rather than backpack prototypes (#27605)

*
This commit is contained in:
Mr. 27
2024-06-03 19:52:15 -04:00
committed by GitHub
parent 2ae5c953de
commit 7d22897d02
85 changed files with 729 additions and 1728 deletions

View File

@@ -179,13 +179,6 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
profile = HumanoidCharacterProfile.RandomWithSpecies(speciesId);
}
if (prototype?.StartingGear != null)
{
var startingGear = _prototypeManager.Index<StartingGearPrototype>(prototype.StartingGear);
EquipStartingGear(entity.Value, startingGear, raiseEvent: false);
}
// Run loadouts after so stuff like storage loadouts can get
var jobLoadout = LoadoutSystem.GetJobPrototype(prototype?.ID);
if (_prototypeManager.TryIndex(jobLoadout, out RoleLoadoutPrototype? roleProto))
@@ -203,6 +196,12 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
EquipRoleLoadout(entity.Value, loadout, roleProto);
}
if (prototype?.StartingGear != null)
{
var startingGear = _prototypeManager.Index<StartingGearPrototype>(prototype.StartingGear);
EquipStartingGear(entity.Value, startingGear, raiseEvent: false);
}
var gearEquippedEv = new StartingGearEquippedEvent(entity.Value);
RaiseLocalEvent(entity.Value, ref gearEquippedEv);
@@ -309,4 +308,4 @@ public sealed class PlayerSpawningEvent : EntityEventArgs
HumanoidCharacterProfile = humanoidCharacterProfile;
Station = station;
}
}
}