Decouples starting gear from UtilityAI (#8512)
This commit is contained in:
@@ -39,10 +39,6 @@ namespace Content.Server.AI.Components
|
||||
[DataField("awake")]
|
||||
private bool _awake = true;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("startingGear")]
|
||||
public string? StartingGearPrototype { get; set; }
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float VisionRadius
|
||||
{
|
||||
@@ -59,20 +55,6 @@ namespace Content.Server.AI.Components
|
||||
Owner.EnsureComponent<PhysicsComponent>();
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
if (StartingGearPrototype != null)
|
||||
{
|
||||
var stationSpawning = EntitySystem.Get<StationSpawningSystem>();
|
||||
var protoManager = IoCManager.Resolve<IPrototypeManager>();
|
||||
|
||||
var startingGear = protoManager.Index<StartingGearPrototype>(StartingGearPrototype);
|
||||
stationSpawning.EquipStartingGear(Owner, startingGear, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Movement speed (m/s) that the entity walks, after modifiers
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user