mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-15 03:31:30 +01:00
* Laws * positronic brain and PAI rewrite * MMI * MMI pt. 2 * borg brain transfer * Roleban support, Borg job (WIP), the end of mind shenaniganry * battery drain, item slot cleanup, alerts * visuals * fix this pt1 * fix this pt2 * Modules, Lingering Stacks, Better borg flashlight * Start on UI, fix battery alerts, expand activation/deactivation, low movement speed on no power. * sprotes * no zombie borgs * oh fuck yeah i love a good relay * charger * fix the tiniest of sprite issues * adjustable names * a functional UI???? * foobar * more modules * this shit for some reason * upstream * genericize selectable borg modules * upstream again * holy fucking shit * i love christ * proper construction * da job * AA borgs * and boom more shit * admin logs * laws redux * ok just do this rq * oh boy that looks like modules * oh shit research * testos passo * so much shit holy fuck * fuckit we SHIP * last minute snags * should've gotten me on a better day
52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
using Robust.Shared.Containers;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
|
|
|
namespace Content.Shared.Silicons.Borgs.Components;
|
|
|
|
/// <summary>
|
|
/// This is used for a <see cref="BorgModuleComponent"/> that provides items to the entity it's installed into.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
|
|
public sealed class ItemBorgModuleComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The items that are provided.
|
|
/// </summary>
|
|
[DataField("items", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>), required: true)]
|
|
public List<string> Items = new();
|
|
|
|
/// <summary>
|
|
/// The entities from <see cref="Items"/> that were spawned.
|
|
/// </summary>
|
|
[DataField("providedItems")]
|
|
public SortedDictionary<string, EntityUid> ProvidedItems = new();
|
|
|
|
/// <summary>
|
|
/// A counter that ensures a unique
|
|
/// </summary>
|
|
[DataField("handCounter")]
|
|
public int HandCounter;
|
|
|
|
/// <summary>
|
|
/// Whether or not the items have been created and stored in <see cref="ProvidedContainer"/>
|
|
/// </summary>
|
|
[DataField("itemsCrated")]
|
|
public bool ItemsCreated;
|
|
|
|
/// <summary>
|
|
/// A container where provided items are stored when not being used.
|
|
/// This is helpful as it means that items retain state.
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public Container ProvidedContainer = default!;
|
|
|
|
/// <summary>
|
|
/// An ID for the container where provided items are stored when not used.
|
|
/// </summary>
|
|
[DataField("providedContainerId")]
|
|
public string ProvidedContainerId = "provided_container";
|
|
}
|
|
|