Small syndicate gear tweak (#13284)

This commit is contained in:
dontbetank
2023-01-20 19:11:24 +03:00
committed by GitHub
parent 8d65086184
commit 299180bf16
5 changed files with 35 additions and 29 deletions

View File

@@ -11,7 +11,6 @@ using Content.Shared.Toggleable;
using Content.Shared.Tools.Components; using Content.Shared.Tools.Components;
using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee;
using Content.Shared.Weapons.Melee.Events; using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Audio;
using Robust.Shared.Player; using Robust.Shared.Player;
using Robust.Shared.Random; using Robust.Shared.Random;
@@ -22,6 +21,8 @@ namespace Content.Server.Weapons.Melee.EnergySword
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedRgbLightControllerSystem _rgbSystem = default!; [Dependency] private readonly SharedRgbLightControllerSystem _rgbSystem = default!;
[Dependency] private readonly SharedItemSystem _item = default!; [Dependency] private readonly SharedItemSystem _item = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
public override void Initialize() public override void Initialize()
{ {
@@ -42,7 +43,8 @@ namespace Content.Server.Weapons.Melee.EnergySword
private void OnMeleeHit(EntityUid uid, EnergySwordComponent comp, MeleeHitEvent args) 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 // Overrides basic blunt damage with burn+slash as set in yaml
args.BonusDamage = comp.LitDamageBonus; args.BonusDamage = comp.LitDamageBonus;
@@ -50,7 +52,8 @@ namespace Content.Server.Weapons.Melee.EnergySword
private void OnUseInHand(EntityUid uid, EnergySwordComponent comp, UseInHandEvent args) private void OnUseInHand(EntityUid uid, EnergySwordComponent comp, UseInHandEvent args)
{ {
if (args.Handled) return; if (args.Handled)
return;
args.Handled = true; args.Handled = true;
@@ -91,7 +94,7 @@ namespace Content.Server.Weapons.Melee.EnergySword
if (comp.IsSharp) if (comp.IsSharp)
RemComp<SharpComponent>(comp.Owner); RemComp<SharpComponent>(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; comp.Activated = false;
} }
@@ -115,8 +118,7 @@ namespace Content.Server.Weapons.Melee.EnergySword
if (comp.Secret) if (comp.Secret)
weaponComp.HideFromExamine = false; weaponComp.HideFromExamine = false;
} }
_audio.Play(comp.ActivateSound, Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner, true, comp.ActivateSound.Params);
SoundSystem.Play(comp.ActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner);
if (TryComp<DisarmMalusComponent>(comp.Owner, out var malus)) if (TryComp<DisarmMalusComponent>(comp.Owner, out var malus))
{ {
@@ -131,15 +133,17 @@ namespace Content.Server.Weapons.Melee.EnergySword
if (!TryComp(component.Owner, out AppearanceComponent? appearanceComponent)) if (!TryComp(component.Owner, out AppearanceComponent? appearanceComponent))
return; return;
appearanceComponent.SetData(ToggleableLightVisuals.Enabled, component.Activated); _appearance.SetData(component.Owner, ToggleableLightVisuals.Enabled, component.Activated, appearanceComponent);
appearanceComponent.SetData(ToggleableLightVisuals.Color, component.BladeColor); _appearance.SetData(component.Owner, ToggleableLightVisuals.Color, component.BladeColor, appearanceComponent);
} }
private void OnInteractUsing(EntityUid uid, EnergySwordComponent comp, InteractUsingEvent args) 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; args.Handled = true;
comp.Hacked = !comp.Hacked; comp.Hacked = !comp.Hacked;

View File

@@ -49,7 +49,7 @@
icon: { sprite: /Textures/Objects/Weapons/Melee/e_sword.rsi, state: icon } icon: { sprite: /Textures/Objects/Weapons/Melee/e_sword.rsi, state: icon }
productEntity: EnergySword productEntity: EnergySword
cost: cost:
Telecrystal: 8 Telecrystal: 6
categories: categories:
- UplinkWeapons - UplinkWeapons
@@ -60,7 +60,7 @@
icon: { sprite: /Textures/Objects/Weapons/Melee/e_dagger.rsi, state: icon } icon: { sprite: /Textures/Objects/Weapons/Melee/e_dagger.rsi, state: icon }
productEntity: EnergyDagger productEntity: EnergyDagger
cost: cost:
Telecrystal: 2 Telecrystal: 3
categories: categories:
- UplinkWeapons - UplinkWeapons
@@ -275,9 +275,9 @@
description: uplink-headset-desc description: uplink-headset-desc
productEntity: ClothingHeadsetAltSyndicate productEntity: ClothingHeadsetAltSyndicate
cost: cost:
Telecrystal: 2 Telecrystal: 2 # next step is adding encryption keys
categories: categories:
- UplinkUtility - UplinkUtility
- type: listing - type: listing
id: UplinkHypopen id: UplinkHypopen

View File

@@ -103,7 +103,7 @@
sprite: Clothing/Ears/Headsets/engineering.rsi sprite: Clothing/Ears/Headsets/engineering.rsi
- type: Clothing - type: Clothing
sprite: Clothing/Ears/Headsets/engineering.rsi sprite: Clothing/Ears/Headsets/engineering.rsi
- type: entity - type: entity
parent: ClothingHeadsetAlt parent: ClothingHeadsetAlt
id: ClothingHeadsetAltScience id: ClothingHeadsetAltScience
@@ -150,3 +150,6 @@
sprite: Clothing/Ears/Headsets/syndicate.rsi sprite: Clothing/Ears/Headsets/syndicate.rsi
- type: Clothing - type: Clothing
sprite: Clothing/Ears/Headsets/syndicate.rsi sprite: Clothing/Ears/Headsets/syndicate.rsi
- type: Tag
tags:
- WhitelistChameleon

View File

@@ -153,17 +153,10 @@
- type: entity - type: entity
name: pen name: pen
suffix: Hypopen suffix: Hypopen
parent: BaseItem parent: Pen # It is just like normal pen, isn't it?
description: A dark ink pen. description: A dark ink pen.
id: Hypopen id: Hypopen
components: components:
- type: Sprite
sprite: Objects/Misc/bureaucracy.rsi
state: pen
netsync: false
- type: Item
sprite: Objects/Misc/bureaucracy.rsi
heldPrefix: pen
- type: SolutionContainerManager - type: SolutionContainerManager
solutions: solutions:
hypospray: hypospray:
@@ -173,8 +166,5 @@
- type: ExaminableSolution - type: ExaminableSolution
solution: hypospray solution: hypospray
- type: Hypospray - type: Hypospray
- type: Tag - type: StaticPrice # A new shitcurity meta
tags:
- Write
- type: StaticPrice
price: 75 price: 75

View File

@@ -7,8 +7,8 @@
- type: EnergySword - type: EnergySword
litDamageBonus: litDamageBonus:
types: types:
Slash: 8.5 Slash: 9.5
Heat: 8.5 Heat: 9.5
Blunt: -4.5 Blunt: -4.5
litDisarmMalus: 0.6 litDisarmMalus: 0.6
- type: Sprite - type: Sprite
@@ -66,6 +66,14 @@
Heat: 7.5 Heat: 7.5
Blunt: -1 Blunt: -1
litDisarmMalus: 0.4 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 - type: Sprite
sprite: Objects/Weapons/Melee/e_dagger.rsi sprite: Objects/Weapons/Melee/e_dagger.rsi
layers: layers:
@@ -76,6 +84,7 @@
shader: unshaded shader: unshaded
map: [ "blade" ] map: [ "blade" ]
- type: MeleeWeapon - type: MeleeWeapon
attackRate: 1
hidden: true hidden: true
damage: damage:
types: types: