Всякие твики (#467)
* tomato juice no longer slippery * flashbang rework * add starting gear support for flashbang rework * flash size and charges tweak * night and thermal vision tweaks * night vision is turned off by default * some size tweaks * cleanup * sunglasses and hardsuits tweak
This commit is contained in:
@@ -10,4 +10,5 @@ public sealed partial class FlashOnTriggerComponent : Component
|
||||
[DataField] public float Range = 1.0f;
|
||||
[DataField] public float Duration = 8.0f;
|
||||
[DataField] public float Probability = 1.0f;
|
||||
[DataField] public bool ForceStun; // WD
|
||||
}
|
||||
|
||||
@@ -48,7 +48,11 @@ public abstract class SharedNightVisionSystem : EntitySystem
|
||||
return;
|
||||
|
||||
component.IsActive = !component.IsActive;
|
||||
_audio.PlayPredicted(component.ToggleSound, uid, uid);
|
||||
|
||||
if (component.IsActive && component.ActivateSound != null)
|
||||
_audio.PlayPredicted(component.ActivateSound, uid, uid);
|
||||
else if (component.DeactivateSound != null)
|
||||
_audio.PlayPredicted(component.DeactivateSound, uid, uid);
|
||||
|
||||
args.Handled = true;
|
||||
|
||||
|
||||
@@ -48,7 +48,11 @@ public abstract class SharedThermalVisionSystem : EntitySystem
|
||||
return;
|
||||
|
||||
component.IsActive = !component.IsActive;
|
||||
_audio.PlayPredicted(component.ToggleSound, uid, uid);
|
||||
|
||||
if (component.IsActive && component.ActivateSound != null)
|
||||
_audio.PlayPredicted(component.ActivateSound, uid, uid);
|
||||
else if (component.DeactivateSound != null)
|
||||
_audio.PlayPredicted(component.DeactivateSound, uid, uid);
|
||||
|
||||
args.Handled = true;
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._White.BuffedFlashGrenade;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class FlashSoundSuppressionComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Stunnable;
|
||||
|
||||
namespace Content.Shared._White.BuffedFlashGrenade;
|
||||
|
||||
public sealed class FlashSoundSuppressionSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
||||
|
||||
public void Stun(EntityUid target, float duration)
|
||||
{
|
||||
if (HasComp<FlashSoundSuppressionComponent>(target))
|
||||
return;
|
||||
|
||||
_stunSystem.TryParalyze(target, TimeSpan.FromSeconds(duration / 1000f), true);
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,11 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
||||
if (_timing.ApplyingState)
|
||||
return;
|
||||
|
||||
if (!TryComp<ClothingComponent>(uid, out var clothing)) return;
|
||||
if (!TryComp<ClothingComponent>(uid, out var clothing))
|
||||
return;
|
||||
|
||||
if (!clothing.Slots.HasFlag(args.SlotFlags)) return;
|
||||
if (!clothing.Slots.HasFlag(args.SlotFlags))
|
||||
return;
|
||||
|
||||
if (component.Components.Count > 8)
|
||||
{
|
||||
@@ -53,7 +55,7 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
||||
}
|
||||
|
||||
component.IsActive = true;
|
||||
Dirty(component);
|
||||
Dirty(uid, component);
|
||||
}
|
||||
|
||||
private void OnCompUnequip(EntityUid uid, ClothingGrantComponentComponent component, GotUnequippedEvent args)
|
||||
@@ -68,7 +70,7 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
||||
}
|
||||
|
||||
component.IsActive = false;
|
||||
Dirty(component);
|
||||
Dirty(uid, component);
|
||||
}
|
||||
|
||||
private void OnTagEquip(EntityUid uid, ClothingGrantTagComponent component, GotEquippedEvent args)
|
||||
@@ -81,7 +83,7 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
||||
_tagSystem.AddTag(args.Equipee, component.Tag);
|
||||
|
||||
component.IsActive = true;
|
||||
Dirty(component);
|
||||
Dirty(uid, component);
|
||||
}
|
||||
|
||||
private void OnTagUnequip(EntityUid uid, ClothingGrantTagComponent component, GotUnequippedEvent args)
|
||||
@@ -91,6 +93,6 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
||||
_tagSystem.RemoveTag(args.Equipee, component.Tag);
|
||||
|
||||
component.IsActive = false;
|
||||
Dirty(component);
|
||||
Dirty(uid, component);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,13 @@ public sealed partial class NightVisionComponent : BaseNvOverlayComponent
|
||||
public override Color Color { get; set; } = Color.FromHex("#98FB98");
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool IsActive = true;
|
||||
public bool IsActive;
|
||||
|
||||
[DataField]
|
||||
public SoundSpecifier? ToggleSound = new SoundPathSpecifier("/Audio/Items/flashlight_pda.ogg");
|
||||
public SoundSpecifier? ActivateSound = new SoundPathSpecifier("/Audio/White/Items/Goggles/activate.ogg");
|
||||
|
||||
[DataField]
|
||||
public SoundSpecifier? DeactivateSound = new SoundPathSpecifier("/Audio/White/Items/Goggles/deactivate.ogg");
|
||||
|
||||
[DataField]
|
||||
public EntProtoId? ToggleAction = "ToggleNightVision";
|
||||
|
||||
@@ -15,7 +15,10 @@ public sealed partial class ThermalVisionComponent : BaseNvOverlayComponent
|
||||
public bool IsActive = true;
|
||||
|
||||
[DataField]
|
||||
public SoundSpecifier? ToggleSound = new SoundPathSpecifier("/Audio/Items/flashlight_pda.ogg");
|
||||
public SoundSpecifier? ActivateSound = new SoundPathSpecifier("/Audio/White/Items/Goggles/activate.ogg");
|
||||
|
||||
[DataField]
|
||||
public SoundSpecifier? DeactivateSound = new SoundPathSpecifier("/Audio/White/Items/Goggles/deactivate.ogg");
|
||||
|
||||
[DataField]
|
||||
public EntProtoId? ToggleAction = "ToggleThermalVision";
|
||||
|
||||
Reference in New Issue
Block a user