Фиксы светошумовых гранат (#470)
* add full headset to security lockers and vendors * wd * fix range * - fix: Night vision. * - fix: Fixes. --------- Co-authored-by: Aviu00 <aviu00@protonmail.com>
This commit is contained in:
@@ -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<InventoryComponent, ChemRegenModifyEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, ChangelingRefundEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, EnergyDomeClothesTurnOffEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, GetFlashbangedEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, GetDefaultRadioChannelEvent>(RelayInventoryEvent);
|
||||
|
||||
// by-ref events
|
||||
|
||||
@@ -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<FlashSoundSuppressionComponent, InventoryRelayedEvent<GetFlashbangedEvent>>(
|
||||
OnGetFlashbanged);
|
||||
}
|
||||
|
||||
private void OnGetFlashbanged(Entity<FlashSoundSuppressionComponent> ent,
|
||||
ref InventoryRelayedEvent<GetFlashbangedEvent> args)
|
||||
{
|
||||
args.Args.Protected = true;
|
||||
}
|
||||
|
||||
public void Stun(EntityUid target, float duration)
|
||||
{
|
||||
if (HasComp<FlashSoundSuppressionComponent>(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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
- id: Flash
|
||||
prob: 0.5
|
||||
- id: ClothingEyesGlassesSecurity
|
||||
- id: ClothingHeadsetSecurity
|
||||
- id: ClothingHeadsetAltSecurity # WD
|
||||
- id: ClothingHandsGlovesColorBlack
|
||||
- id: ClothingShoesBootsJack
|
||||
- id: WeaponMeleeNeedle
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
ClothingHeadHatBeret: 4
|
||||
ClothingHeadHatSecsoft: 4
|
||||
ClothingHeadBandRed: 4
|
||||
ClothingHeadsetSecurity: 4
|
||||
ClothingHeadsetAltSecurity: 4
|
||||
ClothingEyesGlassesSecurity: 4
|
||||
ClothingOuterWinterSec: 4
|
||||
ClothingUniformJumpsuitSec: 4
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -121,7 +121,8 @@
|
||||
attributes:
|
||||
gender: male
|
||||
- type: NightVision
|
||||
toggleSound: null
|
||||
activateSound: null
|
||||
deactivateSound: null
|
||||
color: "#404040"
|
||||
- type: GlobalAntagonist
|
||||
antagonistPrototype: globalAntagonistRats
|
||||
|
||||
@@ -124,7 +124,8 @@
|
||||
- type: Speech
|
||||
speechVerb: LargeMob
|
||||
- type: NightVision
|
||||
toggleSound: null
|
||||
activateSound: null
|
||||
deactivateSound: null
|
||||
color: "#404040"
|
||||
|
||||
- type: entity
|
||||
|
||||
@@ -131,7 +131,8 @@
|
||||
- CannotSuicide
|
||||
- DoorBumpOpener
|
||||
- type: NightVision
|
||||
toggleSound: null
|
||||
activateSound: null
|
||||
deactivateSound: null
|
||||
color: "#404040"
|
||||
- type: Tool
|
||||
speed: 3
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Weapons/Grenades/flashbang.rsi
|
||||
- type: FlashOnTrigger
|
||||
range: 5
|
||||
range: 7
|
||||
forceStun: true # WD
|
||||
- type: SoundOnTrigger
|
||||
sound:
|
||||
|
||||
@@ -1603,7 +1603,7 @@
|
||||
loadouts:
|
||||
- SecurityCommandHeadset
|
||||
|
||||
- type: loadoutGroup
|
||||
- type: loadoutGroup # WD
|
||||
id: CommonSecurityHeadsetFull
|
||||
name: loadout-group-ears
|
||||
loadouts:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
- type: ShowCultHud
|
||||
- type: IsDeadIC
|
||||
- type: NightVision
|
||||
toggleSound: null
|
||||
activateSound: null
|
||||
deactivateSound: null
|
||||
color: White
|
||||
- type: ShowHealthBars
|
||||
damageContainers:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user