--- /dev/null
+using Robust.Shared.GameStates;
+using Content.Shared.Hands.EntitySystems;
+
+namespace Content.Shared.Hands.Components;
+
+/// <summary>
+/// An entity with this component will give you extra hands when you equip it in your inventory.
+/// </summary>
+[RegisterComponent, NetworkedComponent]
+[Access(typeof(ExtraHandsEquipmentSystem))]
+public sealed partial class ExtraHandsEquipmentComponent : Component
+{
+ /// <summary>
+ /// Dictionary relating a unique hand ID corresponding to a container slot on the attached entity to a struct containing information about the Hand itself.
+ /// </summary>
+ [DataField]
+ public Dictionary<string, Hand> Hands = new();
+}
--- /dev/null
+using Content.Shared.Hands.Components;
+using Content.Shared.Inventory.Events;
+
+namespace Content.Shared.Hands.EntitySystems;
+
+public sealed class ExtraHandsEquipmentSystem : EntitySystem
+{
+ [Dependency] private readonly SharedHandsSystem _hands = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent<ExtraHandsEquipmentComponent, GotEquippedEvent>(OnEquipped);
+ SubscribeLocalEvent<ExtraHandsEquipmentComponent, GotUnequippedEvent>(OnUnequipped);
+ }
+
+ private void OnEquipped(Entity<ExtraHandsEquipmentComponent> ent, ref GotEquippedEvent args)
+ {
+ if (!TryComp<HandsComponent>(args.Equipee, out var handsComp))
+ return;
+
+ foreach (var (handName, hand) in ent.Comp.Hands)
+ {
+ // add the NetEntity id to the container name to prevent multiple items with this component from conflicting
+ var handId = $"{GetNetEntity(ent.Owner).Id}-{handName}";
+ _hands.AddHand((args.Equipee, handsComp), handId, hand.Location);
+ }
+ }
+
+ private void OnUnequipped(Entity<ExtraHandsEquipmentComponent> ent, ref GotUnequippedEvent args)
+ {
+ if (!TryComp<HandsComponent>(args.Equipee, out var handsComp))
+ return;
+
+ foreach (var handName in ent.Comp.Hands.Keys)
+ {
+ // add the NetEntity id to the container name to prevent multiple items with this component from conflicting
+ var handId = $"{GetNetEntity(ent.Owner).Id}-{handName}";
+ _hands.RemoveHand((args.Equipee, handsComp), handId);
+ }
+ }
+}
research-technology-basic-shuttle-armament = Shuttle Basic Armament
research-technology-advanced-shuttle-weapon = Advanced Shuttle Weapons
research-technology-thermal-weaponry = Thermal Weaponry
+research-technology-dual-wielding-technology = Dual Wielding Technology
research-technology-basic-robotics = Basic Robotics
research-technology-basic-anomalous-research = Basic Anomalous Research
- type: Construction
graph: ClothingBagPet
node: bagPet
+
+- type: entity
+ parent: Clothing
+ id: ClothingBackpackHarmpack
+ name: H.A.R.M.P.A.C.K.
+ description: Now you can reload, punch, and eat a snack - simultaneously.
+ components:
+ - type: Sprite
+ sprite: Clothing/Back/Specific/harmpack.rsi
+ state: icon
+ - type: Item
+ size: Ginormous
+ - type: Clothing
+ slots: BACK
+ - type: ExtraHandsEquipment
+ hands:
+ # middle hands to prevent overlapping inhand sprites
+ # This can be changed once we have per-hand displacement maps
+ extra_hand_1:
+ location: Middle
+ extra_hand_2:
+ location: Middle
- SignallerAdvanced
- DeviceQuantumSpinInverter
- DeviceDesynchronizer
+ - ClothingBackpackHarmpack
- type: latheRecipePack
id: ScienceClothing
- PowerCageMedium
- PowerCageSmall
- TelescopicShield
+ - ClothingBackpackHarmpack
- type: latheRecipePack
id: SecurityBoards
Plasma: 500
Glass: 500
+- type: latheRecipe
+ id: ClothingBackpackHarmpack
+ result: ClothingBackpackHarmpack
+ categories:
+ - Clothing
+ completetime: 15
+ materials:
+ Steel: 2000
+ Plastic: 1000
+ Plasma: 500
+ Gold: 500
+
# Shields
- type: latheRecipe
parent: BaseShieldRecipe
technologyPrerequisites:
- SalvageWeapons
+- type: technology
+ id: DualWieldingTechnology
+ name: research-technology-dual-wielding-technology
+ icon:
+ sprite: Clothing/Back/Specific/harmpack.rsi
+ state: icon
+ discipline: Arsenal
+ tier: 2
+ cost: 10000
+ recipeUnlocks:
+ - ClothingBackpackHarmpack
+
# Tier 3
- type: technology
--- /dev/null
+{
+ "version": 1,
+ "license": "CC0-1.0",
+ "copyright": "Created by EmoGarbage404 (github) for Space Station 14",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "icon"
+ },
+ {
+ "name": "equipped-BACKPACK",
+ "directions": 4
+ },
+ {
+ "name": "inhand-left",
+ "directions": 4
+ },
+ {
+ "name": "inhand-right",
+ "directions": 4
+ }
+ ]
+}