Decouples starting gear from UtilityAI (#8512)

This commit is contained in:
EmoGarbage404
2022-05-29 18:14:47 -04:00
committed by GitHub
parent cbf1f6322f
commit 86ee423449
5 changed files with 48 additions and 21 deletions

View File

@@ -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>