Station AI (#30944)

* Station AI overlay

* implement

* Bunch of ports

* Fix a heap of bugs and basic scouting

* helldivers

* Shuffle interactions a bit

* navmap stuff

* Revert "navmap stuff"

This reverts commit d1f89dd4be83233e22cf5dd062b2581f3c6da062.

* AI wires implemented

* Fix examines

* Optimise the overlay significantly

* Back to old static

* BUI radial working

* lots of work

* Saving work

* thanks fork

* alright

* pc

* AI upload console

* AI upload

* stuff

* Fix copy-paste shitcode

* AI actions

* navmap work

* Fixes

* first impressions

* a

* reh

* Revert "navmap work"

This reverts commit 6f63fea6e9245e189f368f97be3e32e9b210580e.

# Conflicts:
#	Content.Client/Silicons/StationAi/StationAiOverlay.cs

* OD

* radar

* weh

* Fix examines

* scoop mine eyes

* fixes

* reh

* Optimise

* Final round of optimisations

* Fixes

* fixes
This commit is contained in:
metalgearsloth
2024-08-28 10:57:12 +10:00
committed by GitHub
parent 3a4affd438
commit afd0618a60
153 changed files with 2384 additions and 344 deletions

View File

@@ -8,14 +8,18 @@ using Content.Shared.Storage;
using Content.Shared.Storage.EntitySystems;
using Robust.Shared.Collections;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
namespace Content.Shared.Station;
public abstract class SharedStationSpawningSystem : EntitySystem
{
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] protected readonly InventorySystem InventorySystem = default!;
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly MetaDataSystem _metadata = default!;
[Dependency] private readonly SharedStorageSystem _storage = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
@@ -34,7 +38,7 @@ public abstract class SharedStationSpawningSystem : EntitySystem
}
/// <summary>
/// Equips the given starting gears from a `RoleLoadout` onto an entity.
/// Equips the data from a `RoleLoadout` onto an entity.
/// </summary>
public void EquipRoleLoadout(EntityUid entity, RoleLoadout loadout, RoleLoadoutPrototype roleProto)
{
@@ -52,6 +56,26 @@ public abstract class SharedStationSpawningSystem : EntitySystem
EquipStartingGear(entity, loadoutProto, raiseEvent: false);
}
}
EquipRoleName(entity, loadout, roleProto);
}
/// <summary>
/// Applies the role's name as applicable to the entity.
/// </summary>
public void EquipRoleName(EntityUid entity, RoleLoadout loadout, RoleLoadoutPrototype roleProto)
{
string? name = null;
if (string.IsNullOrEmpty(name) && PrototypeManager.TryIndex(roleProto.NameDataset, out var nameData))
{
name = _random.Pick(nameData.Values);
}
if (!string.IsNullOrEmpty(name))
{
_metadata.SetEntityName(entity, name);
}
}
public void EquipStartingGear(EntityUid entity, LoadoutPrototype loadout, bool raiseEvent = true)