diff --git a/Content.Shared/Stealth/Components/BreakStealthOnAttackComponent.cs b/Content.Shared/Stealth/Components/BreakStealthOnAttackComponent.cs new file mode 100644 index 0000000000..ce92ee92c1 --- /dev/null +++ b/Content.Shared/Stealth/Components/BreakStealthOnAttackComponent.cs @@ -0,0 +1,6 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Stealth.Components; + +[RegisterComponent, NetworkedComponent] +public sealed partial class BreakStealthOnAttackComponent : Component { } diff --git a/Content.Shared/Stealth/SharedStealthSystem.cs b/Content.Shared/Stealth/SharedStealthSystem.cs index cdb1ef87ca..e66a36f741 100644 --- a/Content.Shared/Stealth/SharedStealthSystem.cs +++ b/Content.Shared/Stealth/SharedStealthSystem.cs @@ -1,7 +1,10 @@ using Content.Shared.Examine; +using Content.Shared.Interaction.Events; using Content.Shared.Mobs; using Content.Shared.Mobs.Systems; using Content.Shared.Stealth.Components; +using Content.Shared.Throwing; +using Content.Shared.Weapons.Ranged.Events; using Robust.Shared.GameStates; using Robust.Shared.Timing; @@ -25,6 +28,9 @@ public abstract class SharedStealthSystem : EntitySystem SubscribeLocalEvent(OnExamineAttempt); SubscribeLocalEvent(OnExamined); SubscribeLocalEvent(OnMobStateChanged); + SubscribeLocalEvent(OnThrow); + SubscribeLocalEvent(OnAttack); + SubscribeLocalEvent(OnShoot); } private void OnExamineAttempt(EntityUid uid, StealthComponent component, ExamineAttemptEvent args) @@ -188,6 +194,19 @@ public abstract class SharedStealthSystem : EntitySystem return Math.Clamp(component.LastVisibility + ev.FlatModifier, component.MinVisibility, component.MaxVisibility); } + private void OnThrow(EntityUid uid, BreakStealthOnAttackComponent stealth, BeforeThrowEvent args) => BreakStealth(uid); + private void OnAttack(EntityUid uid, BreakStealthOnAttackComponent stealth, AttackAttemptEvent args) => BreakStealth(uid); + private void OnShoot(EntityUid uid, BreakStealthOnAttackComponent stealth, ShotAttemptedEvent args) => BreakStealth(uid); + + public void BreakStealth(EntityUid uid) + { + if (!TryComp(uid, out StealthComponent? stealth)) + return; + + BreakStealth(uid, stealth); + } + public void BreakStealth(EntityUid uid, StealthComponent stealth) => ModifyVisibility(uid, stealth.MaxVisibility, stealth); + /// /// Used to run through any stealth effecting components on the entity. /// diff --git a/Resources/Locale/en-US/_Goobstation/store/uplink-catalog.ftl b/Resources/Locale/en-US/_Goobstation/store/uplink-catalog.ftl index f94d63469d..938fc5e82a 100644 --- a/Resources/Locale/en-US/_Goobstation/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/_Goobstation/store/uplink-catalog.ftl @@ -5,3 +5,6 @@ uplink-mech-teleporter-heavy-desc = Contains a heavily armored Cybersun mech wit uplink-mech-teleporter-assault-name = Assault Mech teleporter uplink-mech-teleporter-assault-desc = Contains a lightly armored Cybersun mech with an integrated chainsword, LBX AC 10 "Scattershot", SRM-8 Light Missile Rack and P-X Tesla Cannon. + +uplink-hardsuit-cybersun-stealth-name = CSA-91x "Èguǐ" tacsuit +uplink-hardsuit-cybersun-stealth-desc = A rare prototype tacsuit that features metamaterial plating which warps light around it to produce an "Invisibility cloak" effect. diff --git a/Resources/Locale/en-US/prototypes/entities/clothing/head/hardsuit-helmets.ftl b/Resources/Locale/en-US/prototypes/entities/clothing/head/hardsuit-helmets.ftl index 17b41b7001..2918cabb4d 100644 --- a/Resources/Locale/en-US/prototypes/entities/clothing/head/hardsuit-helmets.ftl +++ b/Resources/Locale/en-US/prototypes/entities/clothing/head/hardsuit-helmets.ftl @@ -75,6 +75,8 @@ ent-ClothingHeadHelmetHardsuitCybersun = CSA-80UA helmet .desc = An incredibly sturdy looking helmet designed for the Guan Yu tacsuit. ent-ClothingHeadHelmetHardsuitJuggernautReverseEngineered = CSA-80UA helmet .desc = An incredibly sturdy looking helmet designed for the Guan Yu tacsuit. This one has been painted blue. +ent-ClothingHeadHelmetHardsuitCybersunStealth = CSA-91x helmet + .desc = A moderately protective sealed helmet designed for the èguǐ tacsuit. It features "Cloaking" metamaterials. ent-ClothingHeadHelmetHardsuitWizard = WZD-84 helmet .desc = A bizarre, gem-encrusted helmet from unknown origins. It provides some protection to its wearer without restricting their movements. ent-ClothingHeadHelmetHardsuitLing = organic space helmet diff --git a/Resources/Locale/en-US/prototypes/entities/clothing/outerClothing/hardsuits.ftl b/Resources/Locale/en-US/prototypes/entities/clothing/outerClothing/hardsuits.ftl index 5d7b55c163..224774322e 100644 --- a/Resources/Locale/en-US/prototypes/entities/clothing/outerClothing/hardsuits.ftl +++ b/Resources/Locale/en-US/prototypes/entities/clothing/outerClothing/hardsuits.ftl @@ -102,6 +102,9 @@ ent-ClothingOuterHardsuitJuggernaut = CSA-80UA - "Guan Yu" tacsuit ent-ClothingOuterHardsuitJuggernautReverseEngineered = CSA-80UA - "Guan Yu" tacsuit .desc = The pride and joy of the Cybersun-Armaments Corporation, named after an ancient Sol' War God. Commonly known throughout the galaxy as a "Juggernaut". Matching its bulky appearance, it protects against all forms of damage. It feels VERY heavy. +ent-ClothingOuterHardsuitCybersunStealth = CSA-91x "Èguǐ" tacsuit + .desc = A rare prototype tacsuit that features metamaterial plating which warps light around it to produce an "Invisibility cloak" effect. + Unfortunately, it accomplishes this by trading a lot of protections that one would normally expect from a typical tacsuit. ent-ClothingOuterHardsuitWizard = WZD-84 - "Mana" tacsuit .desc = A bizarre gem-encrusted hardsuit. Famously used by members of the Wizard Federation in their operations. Contrary to it's appearance, it can protect its wearer from space and considerable amounts of physical trauma, it feels somewhat light. diff --git a/Resources/Prototypes/_Goobstation/Catalog/Fills/Backpacks/duffelbag.yml b/Resources/Prototypes/_Goobstation/Catalog/Fills/Backpacks/duffelbag.yml new file mode 100644 index 0000000000..edd0d70040 --- /dev/null +++ b/Resources/Prototypes/_Goobstation/Catalog/Fills/Backpacks/duffelbag.yml @@ -0,0 +1,13 @@ +- type: entity + parent: ClothingBackpackDuffelSyndicateBundle + id: ClothingBackpackDuffelSyndicateStealthHardsuitBundle + name: cybersun stealthsuit bundle + description: "An advanced cybersun stealth tacsuit bundle." + components: + - type: StorageFill + contents: + - id: ClothingOuterHardsuitCybersunStealth + - id: ClothingMaskGasSyndicate + - id: ClothingHandsGlovesCombat + - id: DoubleEmergencyOxygenTankFilled + - id: DoubleEmergencyNitrogenTankFilled diff --git a/Resources/Prototypes/_Goobstation/Catalog/uplink_catalog.yml b/Resources/Prototypes/_Goobstation/Catalog/uplink_catalog.yml index 60b6420371..b090c7eedf 100644 --- a/Resources/Prototypes/_Goobstation/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/_Goobstation/Catalog/uplink_catalog.yml @@ -36,3 +36,17 @@ whitelist: tags: - NukeOpsUplink + +- type: listing + id: UplinkHardsuitCybersunStealth + name: uplink-hardsuit-cybersun-stealth-name + description: uplink-hardsuit-cybersun-stealth-desc + icon: { sprite: /Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi, state: icon } + productEntity: ClothingBackpackDuffelSyndicateStealthHardsuitBundle + discountCategory: rareDiscounts + discountDownTo: + Telecrystal: 35 + cost: + Telecrystal: 55 + categories: + - UplinkWearables diff --git a/Resources/Prototypes/_Goobstation/Entities/Clothing/Head/hardsuit-helmets.yml b/Resources/Prototypes/_Goobstation/Entities/Clothing/Head/hardsuit-helmets.yml index 50c93e1ce4..0a88d8171a 100644 --- a/Resources/Prototypes/_Goobstation/Entities/Clothing/Head/hardsuit-helmets.yml +++ b/Resources/Prototypes/_Goobstation/Entities/Clothing/Head/hardsuit-helmets.yml @@ -21,3 +21,32 @@ Slash: 0.9 Piercing: 0.9 Heat: 0.9 + +# cybersun stealth + +- type: entity + parent: ClothingHeadHardsuitWithLightBase + id: ClothingHeadHelmetHardsuitCybersunStealth + suffix: stealth + name: cybersun stealth hardsuit helmet + description: A helmet with plating for stealth operations. + components: + - type: Sprite + sprite: _Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi + - type: Clothing + sprite: _Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi + - type: PointLight + color: green + - type: PressureProtection + highPressureMultiplier: 0.08 + lowPressureMultiplier: 1000 + - type: Armor + modifiers: + coefficients: + Blunt: 0.95 + Slash: 0.95 + Piercing: 0.95 + Heat: 0.95 + - type: ClothingGrantComponent + component: + - type: Stealth diff --git a/Resources/Prototypes/_Goobstation/Entities/Clothing/OuterClothing/hardsuits.yml b/Resources/Prototypes/_Goobstation/Entities/Clothing/OuterClothing/hardsuits.yml index 23812c039b..28bd09d920 100644 --- a/Resources/Prototypes/_Goobstation/Entities/Clothing/OuterClothing/hardsuits.yml +++ b/Resources/Prototypes/_Goobstation/Entities/Clothing/OuterClothing/hardsuits.yml @@ -29,3 +29,67 @@ clothingPrototype: ClothingHeadHelmetHardsuitBlueshield - type: StaminaDamageResistance coefficient: 0.5 # 50% + + +# cybersun stealth + +- type: entity + parent: ClothingOuterHardsuitBase + id: ClothingOuterHardsuitCybersunStealth + suffix: stealth + name: cybersun stealth hardsuit + description: A hardsuit with stealth plating for operations, the shielding doesn't work while you're moving though! Needs the helmet on to finish the stealth field. + components: + - type: Sprite + sprite: _Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi + - type: Item + size: Huge + - type: Clothing + sprite: _Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi + onEquipFunctions: + - !type:TraitAddComponent + components: + - type: BreakStealthOnAttack + onUnequipFunctions: + - !type:TraitRemoveComponent + components: + - type: BreakStealthOnAttack + - type: PressureProtection + highPressureMultiplier: 0.05 + lowPressureMultiplier: 1000 + - type: ExplosionResistance + damageCoefficient: 0.75 + - type: Armor + modifiers: + coefficients: + Blunt: 0.85 # Metamaterials are quite brittle + Slash: 0.75 + Piercing: 0.70 # But at least it can have steel plates underneath. + Heat: 0.75 + Radiation: 0.85 + Caustic: 0.85 + - type: ClothingSpeedModifier + walkModifier: 0.8 + sprintModifier: 0.85 + - type: HeldSpeedModifier + - type: ToggleableClothing + clothingPrototype: ClothingHeadHelmetHardsuitCybersunStealth + - type: Tag + tags: + - Hardsuit + - WhitelistChameleon + - type: ClothingGrantComponent + component: + - type: StealthOnMove + passiveVisibilityRate: -0.65 + movementVisibilityRate: 0.575 + - type: EmitsSoundOnMove + soundCollection: + collection: FootstepHardsuitLight + params: + volume: -12 + maxDistance: 5 + rolloffFactor: 1.2 + # SIGNIFICANTLY Quieter than a normal hardsuit, but not perfectly stealthy. If you move while people are close enough, they can still hear it. + - type: StaminaDamageResistance + coefficient: 0.85 # 15%. Substantially lower than a normal hardsuit. diff --git a/Resources/Prototypes/_Goobstation/Entities/Debugging/nukiestealth.yml b/Resources/Prototypes/_Goobstation/Entities/Debugging/nukiestealth.yml new file mode 100644 index 0000000000..eb76b17a1c --- /dev/null +++ b/Resources/Prototypes/_Goobstation/Entities/Debugging/nukiestealth.yml @@ -0,0 +1,70 @@ +- type: entity + parent: ClothingOuterHardsuitBase + id: ClothingOuterHardsuitSyndieStealthDebug + suffix: DEBUG, DO NOT MAP, stealth + name: syndicate stealth hardsuit + description: A hardsuit with stealth plating for operations, the shielding doesn't work while you're moving though! Needs the helmet on to finish the stealth field. + components: + - type: Sprite + sprite: Clothing/OuterClothing/Hardsuits/syndicate.rsi + - type: Item + size: Huge + - type: Clothing + sprite: Clothing/OuterClothing/Hardsuits/syndicate.rsi + - type: PressureProtection + highPressureMultiplier: 0.05 + lowPressureMultiplier: 1000 + - type: ExplosionResistance + damageCoefficient: 0.5 + - type: Armor + modifiers: + coefficients: + Blunt: 0.65 + Slash: 0.65 + Piercing: 0.65 + Heat: 0.7 + Radiation: 0.55 + Caustic: 0.7 + - type: ClothingSpeedModifier + walkModifier: 0.95 + sprintModifier: 0.95 + - type: HeldSpeedModifier + - type: ToggleableClothing + clothingPrototype: ClothingHeadHelmetHardsuitSyndieStealthDebug + - type: Tag + tags: + - Hardsuit + - WhitelistChameleon + - type: ClothingGrantComponent + component: + - type: StealthOnMove + passiveVisibilityRate: -0.5 + movementVisibilityRate: 0.4 + + +- type: entity + parent: ClothingHeadHardsuitWithLightBase + id: ClothingHeadHelmetHardsuitSyndieStealthDebug + suffix: DEBUG, DO NOT MAP, stealth + name: syndicate stealth hardsuit helmet + description: A helmet with plating for stealth operations. + components: + - type: Sprite + sprite: Clothing/Head/Hardsuits/syndicate.rsi + - type: Clothing + sprite: Clothing/Head/Hardsuits/syndicate.rsi + - type: PointLight + color: green + - type: PressureProtection + highPressureMultiplier: 0.08 + lowPressureMultiplier: 1000 + - type: Armor + modifiers: + coefficients: + Blunt: 0.9 + Slash: 0.9 + Piercing: 0.9 + Heat: 0.9 + - type: ClothingGrantComponent # this is horrible shitcode i have to do because clothinggrantcomponent only works with 1 comp per clothing item + component: + - type: Stealth diff --git a/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/icon-flash.png b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/icon-flash.png new file mode 100644 index 0000000000..902c847556 Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/icon-flash.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/icon.png b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/icon.png new file mode 100644 index 0000000000..7e08dc20a8 Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/icon.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/meta.json b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/meta.json new file mode 100644 index 0000000000..c7fa1cabe6 --- /dev/null +++ b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/meta.json @@ -0,0 +1,25 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Sprites made by InfinityPandaRed for Goobstation", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "icon-flash" + }, + { + "name": "off-equipped-HELMET", + "directions": 4 + }, + { + "name": "on-equipped-HELMET", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/off-equipped-HELMET.png b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/off-equipped-HELMET.png new file mode 100644 index 0000000000..53c9cabfcf Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/off-equipped-HELMET.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/on-equipped-HELMET.png b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/on-equipped-HELMET.png new file mode 100644 index 0000000000..d1d62fa7ff Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi/on-equipped-HELMET.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/equipped-OUTERCLOTHING.png b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/equipped-OUTERCLOTHING.png new file mode 100644 index 0000000000..311aab9ba8 Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/equipped-OUTERCLOTHING.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/icon.png b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/icon.png new file mode 100644 index 0000000000..474bca0f87 Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/icon.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/inhand-left.png b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/inhand-left.png new file mode 100644 index 0000000000..2eadf95d78 Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/inhand-left.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/inhand-right.png b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/inhand-right.png new file mode 100644 index 0000000000..b3d23c6752 Binary files /dev/null and b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/inhand-right.png differ diff --git a/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/meta.json b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/meta.json new file mode 100644 index 0000000000..fdd5058584 --- /dev/null +++ b/Resources/Textures/_Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "made by InfinityPandaRed for goob station", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-OUTERCLOTHING", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +}