diff --git a/Content.Shared/Inventory/InventorySystem.Relay.cs b/Content.Shared/Inventory/InventorySystem.Relay.cs index f6713713b6..8ea8dd0217 100644 --- a/Content.Shared/Inventory/InventorySystem.Relay.cs +++ b/Content.Shared/Inventory/InventorySystem.Relay.cs @@ -1,3 +1,4 @@ +using Content.Shared._White.BuffedFlashGrenade; using Content.Shared._White.Events; using Content.Shared._White.StaminaProtection; using Content.Shared.Changeling; @@ -34,6 +35,7 @@ public partial class InventorySystem SubscribeLocalEvent(RelayInventoryEvent); // WD SubscribeLocalEvent(RelayInventoryEvent); // WD SubscribeLocalEvent(RelayInventoryEvent); // WD + SubscribeLocalEvent(RelayInventoryEvent); // WD SubscribeLocalEvent(RelayInventoryEvent); // by-ref events diff --git a/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs b/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs index 803538e9a3..c04d650fa0 100644 --- a/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs +++ b/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs @@ -1,4 +1,4 @@ -using Content.Shared.Inventory.Events; +using Content.Shared.Inventory; using Content.Shared.Stunnable; namespace Content.Shared._White.BuffedFlashGrenade; @@ -7,11 +7,37 @@ public sealed class FlashSoundSuppressionSystem : EntitySystem { [Dependency] private readonly SharedStunSystem _stunSystem = default!; + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent>( + OnGetFlashbanged); + } + + private void OnGetFlashbanged(Entity ent, + ref InventoryRelayedEvent args) + { + args.Args.Protected = true; + } + public void Stun(EntityUid target, float duration) { if (HasComp(target)) return; + var ev = new GetFlashbangedEvent(); + RaiseLocalEvent(target, ev); + if (ev.Protected) + return; + _stunSystem.TryParalyze(target, TimeSpan.FromSeconds(duration / 1000f), true); } } + +public sealed class GetFlashbangedEvent : EntityEventArgs, IInventoryRelayEvent +{ + public bool Protected; + + public SlotFlags TargetSlots => SlotFlags.EARS | SlotFlags.HEAD; +} diff --git a/Content.Shared/_White/Overlays/NightVisionComponent.cs b/Content.Shared/_White/Overlays/NightVisionComponent.cs index 9c27c271a8..ed706b5241 100644 --- a/Content.Shared/_White/Overlays/NightVisionComponent.cs +++ b/Content.Shared/_White/Overlays/NightVisionComponent.cs @@ -12,7 +12,7 @@ public sealed partial class NightVisionComponent : BaseNvOverlayComponent public override Color Color { get; set; } = Color.FromHex("#98FB98"); [DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] - public bool IsActive; + public bool IsActive = true; [DataField] public SoundSpecifier? ActivateSound = new SoundPathSpecifier("/Audio/White/Items/Goggles/activate.ogg"); diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml index 96315ffa2c..6a8f1faf4f 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml @@ -56,7 +56,7 @@ - id: Flash prob: 0.5 - id: ClothingEyesGlassesSecurity - - id: ClothingHeadsetSecurity + - id: ClothingHeadsetAltSecurity # WD - id: ClothingHandsGlovesColorBlack - id: ClothingShoesBootsJack - id: WeaponMeleeNeedle diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/secdrobe.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/secdrobe.yml index d16f4dbe27..bbb485afd5 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/secdrobe.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/secdrobe.yml @@ -7,7 +7,7 @@ ClothingHeadHatBeret: 4 ClothingHeadHatSecsoft: 4 ClothingHeadBandRed: 4 - ClothingHeadsetSecurity: 4 + ClothingHeadsetAltSecurity: 4 ClothingEyesGlassesSecurity: 4 ClothingOuterWinterSec: 4 ClothingUniformJumpsuitSec: 4 diff --git a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml index 0d1c1b8131..07247d66ef 100644 --- a/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml +++ b/Resources/Prototypes/Entities/Clothing/Ears/headsets_alt.yml @@ -1,4 +1,4 @@ -- type: entity +- type: entity abstract: true parent: ClothingHeadset id: ClothingHeadsetAlt @@ -9,9 +9,7 @@ state: icon_alt - type: Clothing equippedPrefix: alt - - type: ClothingGrantComponent # WD - component: - - type: FlashSoundSuppression + - type: FlashSoundSuppression # WD - type: entity parent: ClothingHeadsetAlt diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml index 95077cdf5c..46aacbaa80 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml @@ -185,9 +185,7 @@ Piercing: 0.9 Heat: 0.9 - type: FlashImmunity # WD edit - - type: ClothingGrantComponent # WD - component: - - type: FlashSoundSuppression + - type: FlashSoundSuppression # WD edit #Brigmedic Hardsuit - type: entity @@ -215,9 +213,8 @@ - type: PressureProtection highPressureMultiplier: 0.6 lowPressureMultiplier: 1000 - - type: ClothingGrantComponent # WD - component: - - type: FlashSoundSuppression + - type: FlashImmunity # WD edit + - type: FlashSoundSuppression # WD edit #Warden's Hardsuit - type: entity @@ -244,9 +241,7 @@ Piercing: 0.9 Heat: 0.9 - type: FlashImmunity # WD edit - - type: ClothingGrantComponent # WD - component: - - type: FlashSoundSuppression + - type: FlashSoundSuppression # WD edit #Captain's Hardsuit - type: entity @@ -263,9 +258,8 @@ - type: PressureProtection highPressureMultiplier: 0.3 lowPressureMultiplier: 1000 - - type: ClothingGrantComponent # WD - component: - - type: FlashSoundSuppression + - type: FlashImmunity # WD edit + - type: FlashSoundSuppression # WD edit #Inspector's Hardsuit - type: entity @@ -364,9 +358,7 @@ Piercing: 0.9 Heat: 0.9 - type: FlashImmunity - - type: ClothingGrantComponent # WD - component: - - type: FlashSoundSuppression + - type: FlashSoundSuppression #Luxury Mining Hardsuit - type: entity diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml index 6336f512bd..16583994c7 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml @@ -84,7 +84,8 @@ path: /Audio/Effects/bite.ogg - type: Penetrated - type: NightVision - toggleSound: null + activateSound: null + deactivateSound: null color: "#404040" - type: Tool speed: 2 diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml index 264c4cf1f6..f8ae047dbe 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml @@ -121,7 +121,8 @@ attributes: gender: male - type: NightVision - toggleSound: null + activateSound: null + deactivateSound: null color: "#404040" - type: GlobalAntagonist antagonistPrototype: globalAntagonistRats diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml index f1c338a827..1dcfffc687 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml @@ -124,7 +124,8 @@ - type: Speech speechVerb: LargeMob - type: NightVision - toggleSound: null + activateSound: null + deactivateSound: null color: "#404040" - type: entity diff --git a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml index 962b8e21e1..10b022bdda 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml @@ -131,7 +131,8 @@ - CannotSuicide - DoorBumpOpener - type: NightVision - toggleSound: null + activateSound: null + deactivateSound: null color: "#404040" - type: Tool speed: 3 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml index c58c7f7113..48aff490f1 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml @@ -66,7 +66,7 @@ - type: Sprite sprite: Objects/Weapons/Grenades/flashbang.rsi - type: FlashOnTrigger - range: 5 + range: 7 forceStun: true # WD - type: SoundOnTrigger sound: diff --git a/Resources/Prototypes/Loadouts/loadout_groups.yml b/Resources/Prototypes/Loadouts/loadout_groups.yml index 14cf725630..975bff6227 100644 --- a/Resources/Prototypes/Loadouts/loadout_groups.yml +++ b/Resources/Prototypes/Loadouts/loadout_groups.yml @@ -1603,7 +1603,7 @@ loadouts: - SecurityCommandHeadset -- type: loadoutGroup +- type: loadoutGroup # WD id: CommonSecurityHeadsetFull name: loadout-group-ears loadouts: diff --git a/Resources/Prototypes/_White/Actions/types.yml b/Resources/Prototypes/_White/Actions/types.yml index 237c7bf44d..60ad2d137f 100644 --- a/Resources/Prototypes/_White/Actions/types.yml +++ b/Resources/Prototypes/_White/Actions/types.yml @@ -52,7 +52,7 @@ itemIconStyle: BigAction priority: -20 icon: - sprite: Clothing/Eyes/Glasses/thermal.rsi + sprite: White/Clothing/Eyes/Glasses/thermal.rsi state: icon event: !type:ToggleThermalVisionEvent diff --git a/Resources/Prototypes/_White/Catalog/uplink.yml b/Resources/Prototypes/_White/Catalog/uplink.yml index 5797124322..9e8d094515 100644 --- a/Resources/Prototypes/_White/Catalog/uplink.yml +++ b/Resources/Prototypes/_White/Catalog/uplink.yml @@ -108,7 +108,7 @@ name: uplink-night-vision-name description: uplink-night-vision-desc productEntity: ClothingEyesNightVisionGogglesSyndie - icon: { sprite: White/Clothing/Head/nightvision.rsi, state: icon } + icon: { sprite: White/Clothing/Eyes/Glasses/nightvision.rsi, state: icon } cost: Telecrystal: 3 categories: @@ -124,7 +124,7 @@ name: uplink-night-vision-name description: uplink-night-vision-desc productEntity: ClothingEyesNightVisionGogglesNukie - icon: { sprite: White/Clothing/Head/nightvision.rsi, state: icon } + icon: { sprite: White/Clothing/Eyes/Glasses/nightvision.rsi, state: icon } cost: Telecrystal: 3 categories: @@ -140,7 +140,7 @@ name: uplink-thermal-vision-name description: uplink-thermal-vision-desc productEntity: ClothingEyesGlassesThermalSyndie - icon: { sprite: Clothing/Eyes/Glasses/thermal.rsi, state: icon } + icon: { sprite: White/Clothing/Eyes/Glasses/thermal.rsi, state: icon } cost: Telecrystal: 3 categories: @@ -156,7 +156,7 @@ name: uplink-thermal-vision-name description: uplink-thermal-vision-desc productEntity: ClothingEyesGlassesThermalNukie - icon: { sprite: Clothing/Eyes/Glasses/thermal.rsi, state: icon } + icon: { sprite: White/Clothing/Eyes/Glasses/thermal.rsi, state: icon } cost: Telecrystal: 3 categories: diff --git a/Resources/Prototypes/_White/Entities/Cult/constructs.yml b/Resources/Prototypes/_White/Entities/Cult/constructs.yml index e1ac802ef4..44071134e3 100644 --- a/Resources/Prototypes/_White/Entities/Cult/constructs.yml +++ b/Resources/Prototypes/_White/Entities/Cult/constructs.yml @@ -64,7 +64,8 @@ - type: ShowCultHud - type: IsDeadIC - type: NightVision - toggleSound: null + activateSound: null + deactivateSound: null color: White - type: ShowHealthBars damageContainers: diff --git a/Resources/Prototypes/_White/Research/experimental.yml b/Resources/Prototypes/_White/Research/experimental.yml index bd57be222c..f4041df2b9 100644 --- a/Resources/Prototypes/_White/Research/experimental.yml +++ b/Resources/Prototypes/_White/Research/experimental.yml @@ -3,7 +3,7 @@ id: NightVisionTech name: research-technology-night-vision icon: - sprite: White/Clothing/Head/nightvision.rsi + sprite: White/Clothing/Eyes/Glasses/nightvision.rsi state: icon discipline: Experimental tier: 2 @@ -15,7 +15,7 @@ id: ThermalVisionTech name: research-technology-thermal-vision icon: - sprite: Clothing/Eyes/Glasses/thermal.rsi + sprite: White/Clothing/Eyes/Glasses/thermal.rsi state: icon discipline: Experimental tier: 2