From 299180bf164259d74afbc20f58f747f124ec3c87 Mon Sep 17 00:00:00 2001 From: dontbetank <59025279+dontbetank@users.noreply.github.com> Date: Fri, 20 Jan 2023 19:11:24 +0300 Subject: [PATCH] Small syndicate gear tweak (#13284) --- .../Melee/EnergySword/EnergySwordSystem.cs | 24 +++++++++++-------- .../Prototypes/Catalog/uplink_catalog.yml | 8 +++---- .../Entities/Clothing/Ears/headsets_alt.yml | 5 +++- .../Objects/Specific/Medical/hypospray.yml | 14 ++--------- .../Objects/Weapons/Melee/e_sword.yml | 13 ++++++++-- 5 files changed, 35 insertions(+), 29 deletions(-) diff --git a/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs b/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs index 0caa21a4ef..6ebb293ece 100644 --- a/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs +++ b/Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs @@ -11,7 +11,6 @@ using Content.Shared.Toggleable; using Content.Shared.Tools.Components; using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee.Events; -using Robust.Shared.Audio; using Robust.Shared.Player; using Robust.Shared.Random; @@ -22,6 +21,8 @@ namespace Content.Server.Weapons.Melee.EnergySword [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedRgbLightControllerSystem _rgbSystem = default!; [Dependency] private readonly SharedItemSystem _item = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; public override void Initialize() { @@ -42,7 +43,8 @@ namespace Content.Server.Weapons.Melee.EnergySword private void OnMeleeHit(EntityUid uid, EnergySwordComponent comp, MeleeHitEvent args) { - if (!comp.Activated) return; + if (!comp.Activated) + return; // Overrides basic blunt damage with burn+slash as set in yaml args.BonusDamage = comp.LitDamageBonus; @@ -50,7 +52,8 @@ namespace Content.Server.Weapons.Melee.EnergySword private void OnUseInHand(EntityUid uid, EnergySwordComponent comp, UseInHandEvent args) { - if (args.Handled) return; + if (args.Handled) + return; args.Handled = true; @@ -91,7 +94,7 @@ namespace Content.Server.Weapons.Melee.EnergySword if (comp.IsSharp) RemComp(comp.Owner); - SoundSystem.Play(comp.DeActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner); + _audio.Play(comp.DeActivateSound, Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner, true, comp.DeActivateSound.Params); comp.Activated = false; } @@ -115,8 +118,7 @@ namespace Content.Server.Weapons.Melee.EnergySword if (comp.Secret) weaponComp.HideFromExamine = false; } - - SoundSystem.Play(comp.ActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner); + _audio.Play(comp.ActivateSound, Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner, true, comp.ActivateSound.Params); if (TryComp(comp.Owner, out var malus)) { @@ -131,15 +133,17 @@ namespace Content.Server.Weapons.Melee.EnergySword if (!TryComp(component.Owner, out AppearanceComponent? appearanceComponent)) return; - appearanceComponent.SetData(ToggleableLightVisuals.Enabled, component.Activated); - appearanceComponent.SetData(ToggleableLightVisuals.Color, component.BladeColor); + _appearance.SetData(component.Owner, ToggleableLightVisuals.Enabled, component.Activated, appearanceComponent); + _appearance.SetData(component.Owner, ToggleableLightVisuals.Color, component.BladeColor, appearanceComponent); } private void OnInteractUsing(EntityUid uid, EnergySwordComponent comp, InteractUsingEvent args) { - if (args.Handled) return; + if (args.Handled) + return; - if (!TryComp(args.Used, out ToolComponent? tool) || !tool.Qualities.ContainsAny("Pulsing")) return; + if (!TryComp(args.Used, out ToolComponent? tool) || !tool.Qualities.ContainsAny("Pulsing")) + return; args.Handled = true; comp.Hacked = !comp.Hacked; diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index cb3d6c800e..811e76d66e 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -49,7 +49,7 @@ icon: { sprite: /Textures/Objects/Weapons/Melee/e_sword.rsi, state: icon } productEntity: EnergySword cost: - Telecrystal: 8 + Telecrystal: 6 categories: - UplinkWeapons @@ -60,7 +60,7 @@ icon: { sprite: /Textures/Objects/Weapons/Melee/e_dagger.rsi, state: icon } productEntity: EnergyDagger cost: - Telecrystal: 2 + Telecrystal: 3 categories: - UplinkWeapons @@ -275,9 +275,9 @@ description: uplink-headset-desc productEntity: ClothingHeadsetAltSyndicate cost: - Telecrystal: 2 + Telecrystal: 2 # next step is adding encryption keys categories: - - UplinkUtility + - UplinkUtility - type: listing id: UplinkHypopen diff --git a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml index 52b386733d..d4f603941e 100644 --- a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml +++ b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml @@ -103,7 +103,7 @@ sprite: Clothing/Ears/Headsets/engineering.rsi - type: Clothing sprite: Clothing/Ears/Headsets/engineering.rsi - + - type: entity parent: ClothingHeadsetAlt id: ClothingHeadsetAltScience @@ -150,3 +150,6 @@ sprite: Clothing/Ears/Headsets/syndicate.rsi - type: Clothing sprite: Clothing/Ears/Headsets/syndicate.rsi + - type: Tag + tags: + - WhitelistChameleon diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml index 96fb580104..7f77b8f6dd 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml @@ -153,17 +153,10 @@ - type: entity name: pen suffix: Hypopen - parent: BaseItem + parent: Pen # It is just like normal pen, isn't it? description: A dark ink pen. id: Hypopen components: - - type: Sprite - sprite: Objects/Misc/bureaucracy.rsi - state: pen - netsync: false - - type: Item - sprite: Objects/Misc/bureaucracy.rsi - heldPrefix: pen - type: SolutionContainerManager solutions: hypospray: @@ -173,8 +166,5 @@ - type: ExaminableSolution solution: hypospray - type: Hypospray - - type: Tag - tags: - - Write - - type: StaticPrice + - type: StaticPrice # A new shitcurity meta price: 75 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml index e8941186cc..36911ae3d9 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml @@ -7,8 +7,8 @@ - type: EnergySword litDamageBonus: types: - Slash: 8.5 - Heat: 8.5 + Slash: 9.5 + Heat: 9.5 Blunt: -4.5 litDisarmMalus: 0.6 - type: Sprite @@ -66,6 +66,14 @@ Heat: 7.5 Blunt: -1 litDisarmMalus: 0.4 + activateSound: !type:SoundPathSpecifier + path: /Audio/Weapons/ebladeon.ogg + params: + volume: -6 + deActivateSound: !type:SoundPathSpecifier + path: /Audio/Weapons/ebladeoff.ogg + params: + volume: -6 - type: Sprite sprite: Objects/Weapons/Melee/e_dagger.rsi layers: @@ -76,6 +84,7 @@ shader: unshaded map: [ "blade" ] - type: MeleeWeapon + attackRate: 1 hidden: true damage: types: