New science unlock: the H.A.R.M.P.A.C.K (#38824)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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();
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ research-technology-kinetic-modifications = Kinetic Modifications
|
||||
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
|
||||
|
||||
@@ -98,3 +98,25 @@
|
||||
- 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
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
- SignallerAdvanced
|
||||
- DeviceQuantumSpinInverter
|
||||
- DeviceDesynchronizer
|
||||
- ClothingBackpackHarmpack
|
||||
|
||||
- type: latheRecipePack
|
||||
id: ScienceClothing
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
- PowerCageMedium
|
||||
- PowerCageSmall
|
||||
- TelescopicShield
|
||||
- ClothingBackpackHarmpack
|
||||
|
||||
- type: latheRecipePack
|
||||
id: SecurityBoards
|
||||
|
||||
@@ -84,6 +84,18 @@
|
||||
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
|
||||
|
||||
@@ -191,6 +191,18 @@
|
||||
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
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Resources/Textures/Clothing/Back/Specific/harmpack.rsi/icon.png
Normal file
BIN
Resources/Textures/Clothing/Back/Specific/harmpack.rsi/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 657 B |
Binary file not shown.
|
After Width: | Height: | Size: 487 B |
Binary file not shown.
|
After Width: | Height: | Size: 521 B |
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user