diff --git a/Content.Client/Overlays/Switchable/BaseSwitchableOverlay.cs b/Content.Client/Overlays/Switchable/BaseSwitchableOverlay.cs deleted file mode 100644 index 5977355968..0000000000 --- a/Content.Client/Overlays/Switchable/BaseSwitchableOverlay.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Numerics; -using Content.Shared.Overlays.Switchable; -using Robust.Client.Graphics; -using Robust.Shared.Enums; -using Robust.Shared.Prototypes; - -namespace Content.Client.Overlays.Switchable; - -public sealed class BaseSwitchableOverlay : Overlay where TComp : SwitchableOverlayComponent -{ - [Dependency] private readonly IPrototypeManager _prototype = default!; - - public override bool RequestScreenTexture => true; - public override OverlaySpace Space => OverlaySpace.WorldSpace; - - private readonly ShaderInstance _shader; - - public TComp? Comp = null; - - public bool IsActive = true; - - public BaseSwitchableOverlay() - { - IoCManager.InjectDependencies(this); - _shader = _prototype.Index("NightVision").InstanceUnique(); - } - - protected override void Draw(in OverlayDrawArgs args) - { - if (ScreenTexture is null || Comp is null || !IsActive) - return; - - _shader.SetParameter("SCREEN_TEXTURE", ScreenTexture); - _shader.SetParameter("tint", Comp.Tint); - _shader.SetParameter("luminance_threshold", Comp.Strength); - _shader.SetParameter("noise_amount", Comp.Noise); - - var worldHandle = args.WorldHandle; - - var accumulator = Math.Clamp(Comp.PulseAccumulator, 0f, Comp.PulseTime); - var alpha = Comp.PulseTime <= 0f ? 1f : float.Lerp(1f, 0f, accumulator / Comp.PulseTime); - - worldHandle.SetTransform(Matrix3x2.Identity); - worldHandle.UseShader(_shader); - worldHandle.DrawRect(args.WorldBounds, Comp.Color.WithAlpha(alpha)); - worldHandle.UseShader(null); - } -} diff --git a/Content.Client/Overlays/Switchable/NightVisionOverlay.cs b/Content.Client/Overlays/Switchable/NightVisionOverlay.cs new file mode 100644 index 0000000000..2d3e91457a --- /dev/null +++ b/Content.Client/Overlays/Switchable/NightVisionOverlay.cs @@ -0,0 +1,73 @@ +using System.Numerics; +using Robust.Client.Graphics; +using Robust.Shared.Enums; +using Robust.Shared.Prototypes; +using Robust.Shared.Timing; +using Vector3 = Robust.Shared.Maths.Vector3; + +namespace Content.Client.Overlays.Switchable; + +public sealed class NightVisionOverlay : Overlay +{ + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + + public override bool RequestScreenTexture => true; + public override OverlaySpace Space => OverlaySpace.WorldSpace; + + public bool IsActive = true; + + private readonly ProtoId _shaderProto = new("NightVision"); + private readonly ShaderInstance _shader; + + private Vector3 _tint = Vector3.One * 0.5f; + private float _strength = 1; + private float _noise = 0.5f; + private Color _color = Color.Red; + private float _pulseTime; + + private float _timeAccumulator; + + public NightVisionOverlay() + { + IoCManager.InjectDependencies(this); + _shader = _prototypeManager.Index(_shaderProto).InstanceUnique(); + } + + protected override void FrameUpdate(FrameEventArgs args) + { + _timeAccumulator += args.DeltaSeconds; + if (_timeAccumulator >= _pulseTime) + _timeAccumulator = 0; + } + + public void SetParams(Vector3 tint, float strength, float noise, Color color, float pulseTime) + { + _tint = tint; + _strength = strength; + _noise = noise; + _color = color; + _pulseTime = pulseTime; + } + + protected override void Draw(in OverlayDrawArgs args) + { + if (ScreenTexture is null || !IsActive) + return; + + _shader.SetParameter("SCREEN_TEXTURE", ScreenTexture); + _shader.SetParameter("tint", _tint); + _shader.SetParameter("luminance_threshold", _strength); + _shader.SetParameter("noise_amount", _noise); + + var worldHandle = args.WorldHandle; + + var alpha = _pulseTime <= 0f + ? 1f + : float.Lerp(1f, 0f, _timeAccumulator / _pulseTime); + + worldHandle.SetTransform(Matrix3x2.Identity); + worldHandle.UseShader(_shader); + worldHandle.DrawRect(args.WorldBounds, _color.WithAlpha(alpha)); + worldHandle.UseShader(null); + } +} diff --git a/Content.Client/Overlays/Switchable/NightVisionSystem.cs b/Content.Client/Overlays/Switchable/NightVisionSystem.cs index 96b1da78f8..e871fc4f9a 100644 --- a/Content.Client/Overlays/Switchable/NightVisionSystem.cs +++ b/Content.Client/Overlays/Switchable/NightVisionSystem.cs @@ -1,7 +1,7 @@ -using Content.Shared.Inventory; using Content.Shared.Inventory.Events; using Content.Shared.Overlays.Switchable; using Robust.Client.Graphics; +using Robust.Shared.Timing; namespace Content.Client.Overlays.Switchable; @@ -9,8 +9,9 @@ public sealed class NightVisionSystem : EquipmentHudSystem { [Dependency] private readonly IOverlayManager _overlayMan = default!; [Dependency] private readonly ILightManager _lightManager = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; - private BaseSwitchableOverlay _overlay = default!; + private NightVisionOverlay _overlay = default!; public override void Initialize() { @@ -18,40 +19,30 @@ public sealed class NightVisionSystem : EquipmentHudSystem SubscribeLocalEvent(OnToggle); - _overlay = new BaseSwitchableOverlay(); + _overlay = new() + { + IsActive = false + }; + _overlayMan.AddOverlay(_overlay); } - protected override void OnRefreshComponentHud( - Entity ent, - ref RefreshEquipmentHudEvent args - ) + public override void Shutdown() { - if (ent.Comp.IsEquipment) - return; - - base.OnRefreshComponentHud(ent, ref args); - } - - protected override void OnRefreshEquipmentHud( - Entity ent, - ref InventoryRelayedEvent> args - ) - { - if (!ent.Comp.IsEquipment) - return; - - base.OnRefreshEquipmentHud(ent, ref args); + base.Shutdown(); + _overlayMan.RemoveOverlay(_overlay); } private void OnToggle(Entity ent, ref SwitchableOverlayToggledEvent args) { + if (!_gameTiming.IsFirstTimePredicted) + return; + + _overlay.SetParams(ent.Comp.Tint, ent.Comp.Strength, ent.Comp.Noise, ent.Comp.Color, ent.Comp.PulseTime); RefreshOverlay(); } protected override void UpdateInternal(RefreshEquipmentHudEvent args) { - base.UpdateInternal(args); - var active = false; NightVisionComponent? nvComp = null; foreach (var comp in args.Components) @@ -60,11 +51,10 @@ public sealed class NightVisionSystem : EquipmentHudSystem active = true; else continue; + if (comp.DrawOverlay) { - if (nvComp == null) - nvComp = comp; - else if (nvComp.PulseTime > 0f && comp.PulseTime <= 0f) + if (nvComp == null || nvComp.PulseTime > 0f && comp.PulseTime <= 0f) nvComp = comp; } @@ -73,37 +63,13 @@ public sealed class NightVisionSystem : EquipmentHudSystem } UpdateNightVision(active); - UpdateOverlay(nvComp); } - protected override void DeactivateInternal() - { - base.DeactivateInternal(); - - UpdateNightVision(false); - UpdateOverlay(null); - } + protected override void DeactivateInternal() => UpdateNightVision(false); private void UpdateNightVision(bool active) { _lightManager.DrawLighting = !active; - } - - private void UpdateOverlay(NightVisionComponent? nvComp) - { - _overlay.Comp = nvComp; - - switch (nvComp) - { - case not null when !_overlayMan.HasOverlay>(): - _overlayMan.AddOverlay(_overlay); - break; - case null: - _overlayMan.RemoveOverlay(_overlay); - break; - } - - if (_overlayMan.TryGetOverlay>(out var overlay)) - overlay.IsActive = nvComp == null; + _overlay.IsActive = active; } } diff --git a/Content.Client/Overlays/Switchable/ThermalVisionSystem.cs b/Content.Client/Overlays/Switchable/ThermalVisionSystem.cs index 4503243619..a85a9d8c3f 100644 --- a/Content.Client/Overlays/Switchable/ThermalVisionSystem.cs +++ b/Content.Client/Overlays/Switchable/ThermalVisionSystem.cs @@ -1,16 +1,16 @@ -using Content.Shared.Inventory; using Content.Shared.Inventory.Events; using Content.Shared.Overlays.Switchable; using Robust.Client.Graphics; +using Robust.Shared.Timing; namespace Content.Client.Overlays.Switchable; public sealed class ThermalVisionSystem : EquipmentHudSystem { [Dependency] private readonly IOverlayManager _overlayMan = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; private ThermalVisionOverlay _thermalOverlay = default!; - private BaseSwitchableOverlay _overlay = default!; public override void Initialize() { @@ -18,35 +18,13 @@ public sealed class ThermalVisionSystem : EquipmentHudSystem(OnToggle); - _thermalOverlay = new ThermalVisionOverlay(); - _overlay = new BaseSwitchableOverlay(); - } - - protected override void OnRefreshComponentHud( - Entity ent, - ref RefreshEquipmentHudEvent args - ) - { - if (ent.Comp.IsEquipment) - return; - - base.OnRefreshComponentHud(ent, ref args); - } - - protected override void OnRefreshEquipmentHud( - Entity ent, - ref InventoryRelayedEvent> args - ) - { - if (!ent.Comp.IsEquipment) - return; - - base.OnRefreshEquipmentHud(ent, ref args); + _thermalOverlay = new(); } private void OnToggle(Entity ent, ref SwitchableOverlayToggledEvent args) { - RefreshOverlay(); + if (_gameTiming.IsFirstTimePredicted) + RefreshOverlay(); } protected override void UpdateInternal(RefreshEquipmentHudEvent args) @@ -70,7 +48,6 @@ public sealed class ThermalVisionSystem : EquipmentHudSystem>(): - _overlayMan.AddOverlay(_overlay); - break; - case null or { DrawOverlay: false }: - _overlayMan.RemoveOverlay(_overlay); - break; - } - - // Night vision overlay is prioritized - _overlay.IsActive = !_overlayMan.HasOverlay>(); - } } diff --git a/Content.Client/RadialSelector/RadialSelectorMenuBUI.cs b/Content.Client/RadialSelector/AttachedRadialSelectorMenuBUI.cs similarity index 94% rename from Content.Client/RadialSelector/RadialSelectorMenuBUI.cs rename to Content.Client/RadialSelector/AttachedRadialSelectorMenuBUI.cs index 5c3d7c670c..103293b766 100644 --- a/Content.Client/RadialSelector/RadialSelectorMenuBUI.cs +++ b/Content.Client/RadialSelector/AttachedRadialSelectorMenuBUI.cs @@ -1,5 +1,4 @@ -using Content.Client._White.RadialSelector; -using Content.Client.UserInterface.Controls; +using Content.Client.UserInterface.Controls; using Content.Shared.RadialSelector; using JetBrains.Annotations; using Robust.Client.Graphics; diff --git a/Content.Client/_White/RadialSelector/BaseRadialSelectorMenuBUI.cs b/Content.Client/RadialSelector/BaseRadialSelectorMenuBUI.cs similarity index 97% rename from Content.Client/_White/RadialSelector/BaseRadialSelectorMenuBUI.cs rename to Content.Client/RadialSelector/BaseRadialSelectorMenuBUI.cs index 48eff3f39a..a257bf8ec7 100644 --- a/Content.Client/_White/RadialSelector/BaseRadialSelectorMenuBUI.cs +++ b/Content.Client/RadialSelector/BaseRadialSelectorMenuBUI.cs @@ -11,8 +11,9 @@ using Robust.Client.UserInterface.Controls; using Robust.Shared.Prototypes; // ReSharper disable InconsistentNaming +// White Dream Code but moved to general folder for consistency -namespace Content.Client._White.RadialSelector; +namespace Content.Client.RadialSelector; public abstract class BasedRadialSelectorMenuBUI : BoundUserInterface { diff --git a/Content.Client/_White/RadialSelector/TrackedRadialSelectorMenuBUI.cs b/Content.Client/RadialSelector/TrackedRadialSelectorMenuBUI.cs similarity index 92% rename from Content.Client/_White/RadialSelector/TrackedRadialSelectorMenuBUI.cs rename to Content.Client/RadialSelector/TrackedRadialSelectorMenuBUI.cs index bbb2761803..7f3473af00 100644 --- a/Content.Client/_White/RadialSelector/TrackedRadialSelectorMenuBUI.cs +++ b/Content.Client/RadialSelector/TrackedRadialSelectorMenuBUI.cs @@ -3,8 +3,9 @@ using Content.Shared._White.RadialSelector; using JetBrains.Annotations; // ReSharper disable InconsistentNaming +// White Dream Code but moved to general folder for consistency -namespace Content.Client._White.RadialSelector; +namespace Content.Client.RadialSelector; [UsedImplicitly] public sealed class TrackedRadialSelectorMenuBUI(EntityUid owner, Enum uiKey) : BasedRadialSelectorMenuBUI(owner, uiKey) diff --git a/Content.Server/Administration/Managers/AdminManager.cs b/Content.Server/Administration/Managers/AdminManager.cs index 05dacdc577..e5d5498a90 100644 --- a/Content.Server/Administration/Managers/AdminManager.cs +++ b/Content.Server/Administration/Managers/AdminManager.cs @@ -376,6 +376,11 @@ namespace Content.Server.Administration.Managers private async void LoginAdminMaybe(ICommonSession session) { + // Not an admin. + // ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract + if (session is null) + return; + var adminDat = await LoadAdminData(session); if (adminDat == null) { diff --git a/Content.Server/Construction/PartExchangerSystem.cs b/Content.Server/Construction/PartExchangerSystem.cs index 93072e49fd..05937e79c4 100644 --- a/Content.Server/Construction/PartExchangerSystem.cs +++ b/Content.Server/Construction/PartExchangerSystem.cs @@ -1,3 +1,5 @@ +// Updated by WhiteDream by fckmoth + using System.Linq; using Content.Server.Construction.Components; using Content.Server.Storage.EntitySystems; @@ -30,46 +32,87 @@ public sealed class PartExchangerSystem : EntitySystem SubscribeLocalEvent(OnDoAfter); } - private void OnDoAfter(EntityUid uid, PartExchangerComponent component, DoAfterEvent args) + private void OnAfterInteract(Entity ent, ref AfterInteractEvent args) { - if (args.Cancelled) + if (ent.Comp.DoDistanceCheck && !args.CanReach || !args.Target.HasValue + || !HasComp(args.Target) && !HasComp(args.Target)) { - component.AudioStream = _audio.Stop(component.AudioStream); + args.Handled = false; return; } - if (args.Handled || args.Args.Target == null || !TryComp(uid, out var storage)) + if (TryComp(args.Target, out var panel) && !panel.Open) + { + _popup.PopupEntity(Loc.GetString("construction-step-condition-wire-panel-open"), args.Target.Value); + args.Handled = false; + return; + } + + if (!TryComp(ent, out var storage) || storage.Container.Count == 0) + { + _popup.PopupEntity(Loc.GetString("rped-container-empty"), args.Target.Value); + args.Handled = false; + return; + } + + args.Handled = true; + + var doAfter = new DoAfterArgs( + EntityManager, + args.User, + ent.Comp.ExchangeDuration, + new ExchangerDoAfterEvent(), + ent, + target: args.Target, + used: ent) + { + BreakOnDamage = true, + BreakOnMove = true + }; + + _doAfter.TryStartDoAfter(doAfter); + } + + private void OnDoAfter(EntityUid uid, PartExchangerComponent component, DoAfterEvent args) + { + if (args.Cancelled || args.Handled || args.Args.Target == null || + !TryComp(uid, out var storage)) return; - var machinePartQuery = GetEntityQuery(); var machineParts = new List>(); foreach (var item in storage.Container.ContainedEntities) //get parts in RPED { - if (machinePartQuery.TryGetComponent(item, out var part)) + if (TryComp(item, out MachinePartComponent? part)) machineParts.Add((item, part)); } - TryExchangeMachineParts(args.Args.Target.Value, uid, machineParts); - TryConstructMachineParts(args.Args.Target.Value, uid, machineParts); + if (machineParts.Count == 0) + return; args.Handled = true; + if (TryExchangeMachineParts(args.Args.Target.Value, uid, machineParts) || + TryConstructMachineParts(args.Args.Target.Value, uid, machineParts)) + component.AudioStream = _audio.PlayPvs(component.ExchangeSound, uid)?.Entity; } - private void TryExchangeMachineParts(EntityUid uid, EntityUid storageUid, List> machineParts) + private bool TryExchangeMachineParts( + EntityUid uid, + EntityUid storageUid, + List> machineParts + ) { if (!TryComp(uid, out var machine)) - return; + return false; - var machinePartQuery = GetEntityQuery(); var board = machine.BoardContainer.ContainedEntities.FirstOrNull(); - if (!TryComp(board, out var macBoardComp)) - return; + return false; - foreach (var item in new ValueList(machine.PartContainer.ContainedEntities)) //clone so don't modify during enumeration + //clone so don't modify during enumeration + foreach (var item in new ValueList(machine.PartContainer.ContainedEntities)) { - if (!machinePartQuery.TryGetComponent(item, out var part)) + if (!TryComp(item, out MachinePartComponent? part)) continue; machineParts.Add((item, part)); @@ -77,6 +120,7 @@ public sealed class PartExchangerSystem : EntitySystem } machineParts.Sort((x, y) => x.Comp.Rating.CompareTo(y.Comp.Rating)); + machineParts.Reverse(); var updatedParts = new List>(); foreach (var (machinePartId, amount) in macBoardComp.MachinePartRequirements) @@ -96,22 +140,28 @@ public sealed class PartExchangerSystem : EntitySystem _storage.Insert(storageUid, unused, out _, playSound: false); _construction.RefreshParts(uid, machine); + return true; } - private void TryConstructMachineParts(EntityUid uid, EntityUid storageEnt, List> machineParts) + private bool TryConstructMachineParts( + EntityUid uid, + EntityUid storageEnt, + List> machineParts + ) { if (!TryComp(uid, out var machine)) - return; + return false; - var machinePartQuery = GetEntityQuery(); var board = machine.BoardContainer.ContainedEntities.FirstOrNull(); if (!TryComp(board, out var macBoardComp)) - return; + return false; - foreach (var item in new ValueList(machine.PartContainer.ContainedEntities)) //clone so don't modify during enumeration + foreach (var item in + new ValueList( + machine.PartContainer.ContainedEntities)) //clone so don't modify during enumeration { - if (!machinePartQuery.TryGetComponent(item, out var part)) + if (!TryComp(item, out MachinePartComponent? part)) continue; machineParts.Add((item, part)); @@ -128,49 +178,20 @@ public sealed class PartExchangerSystem : EntitySystem updatedParts.AddRange(target); } - foreach (var pair in updatedParts) + foreach (var part in updatedParts) { - if (!machine.MachinePartRequirements.ContainsKey(pair.Comp.PartType)) + if (!machine.MachinePartRequirements.ContainsKey(part.Comp.PartType)) continue; - _container.Insert(pair.Owner, machine.PartContainer); - machine.MachinePartProgress[pair.Comp.PartType]++; - machineParts.Remove(pair); + _container.Insert(part.Owner, machine.PartContainer); + machine.MachinePartProgress[part.Comp.PartType]++; + machineParts.Remove(part); } //put the unused parts back into rped. (this also does the "swapping") foreach (var (unused, _) in machineParts) _storage.Insert(storageEnt, unused, out _, playSound: false); - } - private void OnAfterInteract(EntityUid uid, PartExchangerComponent component, AfterInteractEvent args) - { - if (component.DoDistanceCheck && !args.CanReach - || args.Target == null - || !HasComp(args.Target) && !HasComp(args.Target)) - return; - - if (TryComp(args.Target, out var panel) && !panel.Open) - { - _popup.PopupEntity(Loc.GetString("construction-step-condition-wire-panel-open"), args.Target.Value); - return; - } - - component.AudioStream = _audio.PlayPvs(component.ExchangeSound, uid)?.Entity; - - var doAfter = new DoAfterArgs( - EntityManager, - args.User, - component.ExchangeDuration, - new ExchangerDoAfterEvent(), - uid, - target: args.Target, - used: uid) - { - BreakOnDamage = true, - BreakOnMove = true - }; - - _doAfter.TryStartDoAfter(doAfter); + return true; } } diff --git a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs index a3795f2562..772fb54da8 100644 --- a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs +++ b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs @@ -1,3 +1,5 @@ +// Updated by White Dream by FckMoth + using Content.Server.Light.Components; using Content.Shared.Clothing.Components; using Content.Shared.Clothing.EntitySystems; @@ -7,200 +9,181 @@ using Content.Shared.Light.Components; using Content.Shared.Tag; using Content.Shared.Temperature; using Content.Shared.Verbs; +using Content.Shared.Weapons.Ranged.Components; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Audio.Systems; using Robust.Shared.Utility; -namespace Content.Server.Light.EntitySystems +namespace Content.Server.Light.EntitySystems; + +[UsedImplicitly] +public sealed class ExpendableLightSystem : EntitySystem { - [UsedImplicitly] - public sealed class ExpendableLightSystem : EntitySystem + [Dependency] private readonly SharedItemSystem _item = default!; + [Dependency] private readonly ClothingSystem _clothing = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + [Dependency] private readonly MetaDataSystem _metaData = default!; + + public override void Initialize() { - [Dependency] private readonly SharedItemSystem _item = default!; - [Dependency] private readonly ClothingSystem _clothing = default!; - [Dependency] private readonly TagSystem _tagSystem = default!; - [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly SharedAppearanceSystem _appearance = default!; - [Dependency] private readonly MetaDataSystem _metaData = default!; + base.Initialize(); - public override void Initialize() + SubscribeLocalEvent(OnInit); + SubscribeLocalEvent(OnUseInHand); + SubscribeLocalEvent>(OnGetVerbs); + } + + public override void Update(float frameTime) + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out _)) { - base.Initialize(); - - SubscribeLocalEvent(OnExpLightInit); - SubscribeLocalEvent(OnExpLightUse); - SubscribeLocalEvent>(AddIgniteVerb); - } - - public override void Update(float frameTime) - { - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var _)) + if (!TryComp(uid, out ExpendableLightComponent? light)) { - if (!TryComp(uid, out ExpendableLightComponent? light)) - { - RemCompDeferred(uid); - continue; - } - - UpdateLight((uid, light), frameTime); - } - } - - private void UpdateLight(Entity ent, float frameTime) - { - var component = ent.Comp; - component.StateExpiryTime -= frameTime; - - if (component.StateExpiryTime <= 0f) - { - switch (component.CurrentState) - { - case ExpendableLightState.Lit: - component.CurrentState = ExpendableLightState.Fading; - component.StateExpiryTime = component.FadeOutDuration; - - UpdateVisualizer(ent); - - break; - - default: - case ExpendableLightState.Fading: - component.CurrentState = ExpendableLightState.Dead; - var meta = MetaData(ent); - _metaData.SetEntityName(ent, Loc.GetString(component.SpentName), meta); - _metaData.SetEntityDescription(ent, Loc.GetString(component.SpentDesc), meta); - - _tagSystem.AddTag(ent, "Trash"); - - UpdateSounds(ent); - UpdateVisualizer(ent); - - if (TryComp(ent, out var item)) - { - _item.SetHeldPrefix(ent, "unlit", component: item); - } - - RemCompDeferred(ent); - break; - } - } - } - - /// - /// Enables the light if it is not active. Once active it cannot be turned off. - /// - public bool TryActivate(Entity ent) - { - var component = ent.Comp; - if (!component.Activated && component.CurrentState == ExpendableLightState.BrandNew) - { - if (TryComp(ent, out var item)) - { - _item.SetHeldPrefix(ent, "lit", component: item); - } - - var isHotEvent = new IsHotEvent() { IsHot = true }; - RaiseLocalEvent(ent, isHotEvent); - - component.CurrentState = ExpendableLightState.Lit; - component.StateExpiryTime = component.GlowDuration; - - UpdateSounds(ent); - UpdateVisualizer(ent); - EnsureComp(ent); - return true; + RemCompDeferred(uid); + continue; } - return false; - } + light.StateExpiryTime -= frameTime; + if (light.StateExpiryTime > 0f) + continue; - private void UpdateVisualizer(Entity ent, AppearanceComponent? appearance = null) - { - var component = ent.Comp; - if (!Resolve(ent, ref appearance, false)) - return; - - _appearance.SetData(ent, ExpendableLightVisuals.State, component.CurrentState, appearance); - - switch (component.CurrentState) - { - case ExpendableLightState.Lit: - _appearance.SetData(ent, ExpendableLightVisuals.Behavior, component.TurnOnBehaviourID, appearance); - break; - - case ExpendableLightState.Fading: - _appearance.SetData(ent, ExpendableLightVisuals.Behavior, component.FadeOutBehaviourID, appearance); - break; - - case ExpendableLightState.Dead: - _appearance.SetData(ent, ExpendableLightVisuals.Behavior, string.Empty, appearance); - var isHotEvent = new IsHotEvent() { IsHot = true }; - RaiseLocalEvent(ent, isHotEvent); - break; - } - } - - private void UpdateSounds(Entity ent) - { - var component = ent.Comp; - - switch (component.CurrentState) - { - case ExpendableLightState.Lit: - _audio.PlayPvs(component.LitSound, ent); - break; - case ExpendableLightState.Fading: - break; - default: - _audio.PlayPvs(component.DieSound, ent); - break; - } - - if (TryComp(ent, out var clothing)) - { - _clothing.SetEquippedPrefix(ent, component.Activated ? "Activated" : string.Empty, clothing); - } - } - - private void OnExpLightInit(EntityUid uid, ExpendableLightComponent component, ComponentInit args) - { - if (TryComp(uid, out var item)) - { - _item.SetHeldPrefix(uid, "unlit", component: item); - } - - component.CurrentState = ExpendableLightState.BrandNew; - EntityManager.EnsureComponent(uid); - } - - private void OnExpLightUse(Entity ent, ref UseInHandEvent args) - { - if (args.Handled) - return; - - if (TryActivate(ent)) - args.Handled = true; - } - - private void AddIgniteVerb(Entity ent, ref GetVerbsEvent args) - { - if (!args.CanAccess || !args.CanInteract) - return; - - if (ent.Comp.CurrentState != ExpendableLightState.BrandNew) - return; - - // Ignite the flare or make the glowstick glow. - // Also hot damn, those are some shitty glowsticks, we need to get a refund. - ActivationVerb verb = new() - { - Text = Loc.GetString("expendable-light-start-verb"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")), - Act = () => TryActivate(ent) - }; - args.Verbs.Add(verb); + UpdateLight((uid, light)); } } + + private void OnInit(EntityUid uid, ExpendableLightComponent component, ComponentInit args) + { + if (TryComp(uid, out var item)) + _item.SetHeldPrefix(uid, "unlit", component: item); + + component.CurrentState = ExpendableLightState.BrandNew; + EntityManager.EnsureComponent(uid); + } + + private void OnUseInHand(Entity ent, ref UseInHandEvent args) + { + if (!args.Handled && TryActivate(ent)) + args.Handled = true; + } + + private void OnGetVerbs(Entity ent, ref GetVerbsEvent args) + { + if (!args.CanAccess || !args.CanInteract || ent.Comp.CurrentState != ExpendableLightState.BrandNew) + return; + + // Ignite the flare or make the glowstick glow. + // Also hot damn, those are some shitty glowsticks, we need to get a refund. + ActivationVerb verb = new() + { + Text = Loc.GetString("expendable-light-start-verb"), + Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/light.svg.192dpi.png")), + Act = () => TryActivate(ent) + }; + args.Verbs.Add(verb); + } + + /// + /// Enables the light if it is not active. Once active it cannot be turned off. + /// + [UsedImplicitly] + public bool TryActivate(Entity ent) + { + var component = ent.Comp; + if (component is not { Activated: false, CurrentState: ExpendableLightState.BrandNew, }) + return false; + + if (TryComp(ent, out ItemComponent? item)) + _item.SetHeldPrefix(ent, "lit", component: item); + + var isHotEvent = new IsHotEvent { IsHot = true, }; + RaiseLocalEvent(ent, isHotEvent); + + component.CurrentState = ExpendableLightState.Lit; + component.StateExpiryTime = component.GlowDuration; + + UpdateSounds(ent); + UpdateVisualizer(ent); + EnsureComp(ent); + return true; + } + + private void UpdateLight(Entity ent) + { + switch (ent.Comp.CurrentState) + { + case ExpendableLightState.Lit: + ent.Comp.CurrentState = ExpendableLightState.Fading; + ent.Comp.StateExpiryTime = ent.Comp.FadeOutDuration; + UpdateVisualizer(ent); + break; + + case ExpendableLightState.Fading: + ent.Comp.CurrentState = ExpendableLightState.Dead; + UpdateSounds(ent); + UpdateVisualizer(ent); + + var meta = MetaData(ent); + _metaData.SetEntityName(ent, Loc.GetString(ent.Comp.SpentName), meta); + _metaData.SetEntityDescription(ent, Loc.GetString(ent.Comp.SpentDesc), meta); + _tagSystem.AddTag(ent, "Trash"); + + if (TryComp(ent, out ItemComponent? item)) + _item.SetHeldPrefix(ent, "unlit", component: item); + + if (TryComp(ent, out CartridgeAmmoComponent? ammo)) + ammo.Spent = true; + + var isHotEvent = new IsHotEvent { IsHot = false, }; + RaiseLocalEvent(ent, isHotEvent); + RemCompDeferred(ent); + break; + + case ExpendableLightState.Dead: + case ExpendableLightState.BrandNew: + default: + break; + } + } + + private void UpdateVisualizer(Entity ent) + { + if (!TryComp(ent, out AppearanceComponent? appearance)) + return; + + var expendableLight = ent.Comp; + _appearance.SetData(ent, ExpendableLightVisuals.State, expendableLight.CurrentState, appearance); + + var behaviorState = expendableLight.CurrentState switch + { + ExpendableLightState.Lit => expendableLight.TurnOnBehaviourID, + ExpendableLightState.Fading => expendableLight.FadeOutBehaviourID, + _ => string.Empty + }; + + _appearance.SetData(ent, ExpendableLightVisuals.Behavior, behaviorState, appearance); + } + + private void UpdateSounds(Entity ent) + { + switch (ent.Comp.CurrentState) + { + case ExpendableLightState.Lit: + _audio.PlayPvs(ent.Comp.LitSound, ent); + break; + case ExpendableLightState.Dead: + _audio.PlayPvs(ent.Comp.DieSound, ent); + break; + case ExpendableLightState.BrandNew: + case ExpendableLightState.Fading: + default: + break; + } + + if (TryComp(ent, out var clothing)) + _clothing.SetEquippedPrefix(ent, ent.Comp.Activated ? "Activated" : string.Empty, clothing); + } } diff --git a/Content.Server/_White/BloodCult/Spells/BloodCultSpellsSystem.cs b/Content.Server/_White/BloodCult/Spells/BloodCultSpellsSystem.cs index 501ff09392..355d89e7f2 100644 --- a/Content.Server/_White/BloodCult/Spells/BloodCultSpellsSystem.cs +++ b/Content.Server/_White/BloodCult/Spells/BloodCultSpellsSystem.cs @@ -99,6 +99,7 @@ public sealed class BloodCultSpellsSystem : EntitySystem Category = VerbCategory.BloodSpells, Text = Loc.GetString("blood-cult-select-spells-verb"), Priority = 1, + CloseMenu = true, Act = () => SelectBloodSpells(cultist) }; var removeVerb = new ExamineVerb @@ -106,6 +107,7 @@ public sealed class BloodCultSpellsSystem : EntitySystem Category = VerbCategory.BloodSpells, Text = Loc.GetString("blood-cult-remove-spells-verb"), Priority = 0, + CloseMenu = true, Act = () => RemoveBloodSpells(cultist) }; diff --git a/Content.Shared/Overlays/Switchable/NightVisionComponent.cs b/Content.Shared/Overlays/Switchable/NightVisionComponent.cs index cb8866dc85..eb6797e3d1 100644 --- a/Content.Shared/Overlays/Switchable/NightVisionComponent.cs +++ b/Content.Shared/Overlays/Switchable/NightVisionComponent.cs @@ -1,13 +1,15 @@ using Content.Shared.Actions; using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; namespace Content.Shared.Overlays.Switchable; [RegisterComponent, NetworkedComponent] public sealed partial class NightVisionComponent : SwitchableOverlayComponent { - public override string? ToggleAction { get; set; } = "ToggleNightVision"; + public override EntProtoId? ToggleAction { get; set; } = new EntProtoId("ToggleNightVision"); + [DataField] public override Color Color { get; set; } = Color.FromHex("#98FB98"); } diff --git a/Content.Shared/Overlays/Switchable/SwitchableOverlayComponent.cs b/Content.Shared/Overlays/Switchable/SwitchableOverlayComponent.cs index ce1be8a4f7..d89a263279 100644 --- a/Content.Shared/Overlays/Switchable/SwitchableOverlayComponent.cs +++ b/Content.Shared/Overlays/Switchable/SwitchableOverlayComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared.Overlays.Switchable; public abstract partial class SwitchableOverlayComponent : BaseOverlayComponent { - [DataField, AutoNetworkedField] + [DataField] public virtual bool IsActive { get; set; } [DataField] @@ -39,7 +39,7 @@ public abstract partial class SwitchableOverlayComponent : BaseOverlayComponent new SoundPathSpecifier("/Audio/Items/Goggles/deactivate.ogg"); [DataField] - public virtual string? ToggleAction { get; set; } + public virtual EntProtoId? ToggleAction { get; set; } [ViewVariables] public EntityUid? ToggleActionEntity; diff --git a/Content.Shared/Overlays/Switchable/ThermalVisionComponent.cs b/Content.Shared/Overlays/Switchable/ThermalVisionComponent.cs index 6e3d39f289..b194f10aab 100644 --- a/Content.Shared/Overlays/Switchable/ThermalVisionComponent.cs +++ b/Content.Shared/Overlays/Switchable/ThermalVisionComponent.cs @@ -1,12 +1,13 @@ using Content.Shared.Actions; using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; namespace Content.Shared.Overlays.Switchable; [RegisterComponent, NetworkedComponent] public sealed partial class ThermalVisionComponent : SwitchableOverlayComponent { - public override string? ToggleAction { get; set; } = "ToggleThermalVision"; + public override EntProtoId? ToggleAction { get; set; } = new("ToggleThermalVision"); public override Color Color { get; set; } = Color.FromHex("#F84742"); diff --git a/Content.Shared/UserInterface/ActivatableUISystem.cs b/Content.Shared/UserInterface/ActivatableUISystem.cs index f776b1ae2c..c2e25cdc5d 100644 --- a/Content.Shared/UserInterface/ActivatableUISystem.cs +++ b/Content.Shared/UserInterface/ActivatableUISystem.cs @@ -147,6 +147,9 @@ public sealed partial class ActivatableUISystem : EntitySystem if (component.RequiredItems != null) return; + if (_whitelistSystem.IsWhitelistFail(component.UserWhitelist, args.User)) + return; + args.Handled = InteractUI(args.User, uid, component); } @@ -161,6 +164,9 @@ public sealed partial class ActivatableUISystem : EntitySystem if (component.RequiredItems != null) return; + if (_whitelistSystem.IsWhitelistFail(component.UserWhitelist, args.User)) + return; + args.Handled = InteractUI(args.User, uid, component); } @@ -173,7 +179,7 @@ public sealed partial class ActivatableUISystem : EntitySystem return; if (_whitelistSystem.IsWhitelistFailOrNull(component.RequiredItems, args.Used) || - !_whitelistSystem.IsWhitelistFail(component.UserWhitelist, args.User)) + _whitelistSystem.IsWhitelistFail(component.UserWhitelist, args.User)) return; args.Handled = InteractUI(args.User, uid, component); diff --git a/Content.Shared/_White/BloodCult/TimedFactory/TimedFactoryComponent.cs b/Content.Shared/_White/BloodCult/TimedFactory/TimedFactoryComponent.cs index df5d4857cb..7b72aed2bc 100644 --- a/Content.Shared/_White/BloodCult/TimedFactory/TimedFactoryComponent.cs +++ b/Content.Shared/_White/BloodCult/TimedFactory/TimedFactoryComponent.cs @@ -1,19 +1,20 @@ using Content.Shared.RadialSelector; +using Robust.Shared.GameStates; namespace Content.Shared._White.BloodCult.TimedFactory; -[RegisterComponent] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] public sealed partial class TimedFactoryComponent : Component { - [DataField] + [DataField, AutoNetworkedField] public bool Active = true; [DataField(required: true)] public List Entries = new(); [DataField] - public TimeSpan Cooldown = TimeSpan.FromSeconds(240); + public float Cooldown = 240; - [ViewVariables(VVAccess.ReadOnly)] - public TimeSpan CooldownIn = TimeSpan.Zero; + [ViewVariables(VVAccess.ReadOnly), AutoNetworkedField] + public float CooldownRemain = 0; } diff --git a/Content.Shared/_White/BloodCult/TimedFactory/TimedFactorySystem.cs b/Content.Shared/_White/BloodCult/TimedFactory/TimedFactorySystem.cs index 14842a7aea..ca1271c798 100644 --- a/Content.Shared/_White/BloodCult/TimedFactory/TimedFactorySystem.cs +++ b/Content.Shared/_White/BloodCult/TimedFactory/TimedFactorySystem.cs @@ -4,13 +4,11 @@ using Content.Shared.Popups; using Content.Shared.RadialSelector; using Content.Shared.UserInterface; using Robust.Shared.Network; -using Robust.Shared.Timing; namespace Content.Shared._White.BloodCult.TimedFactory; public sealed class TimedFactorySystem : EntitySystem { - [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly INetManager _netManager = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; @@ -33,7 +31,12 @@ public sealed class TimedFactorySystem : EntitySystem var factoryQuery = EntityQueryEnumerator(); while (factoryQuery.MoveNext(out var uid, out var factory)) { - if (factory.Active || factory.CooldownIn > _gameTiming.CurTime) + if (factory.Active) + return; + + factory.CooldownRemain -= frameTime; + Dirty(uid, factory); + if (factory.CooldownRemain > 0) return; factory.Active = true; @@ -45,7 +48,9 @@ public sealed class TimedFactorySystem : EntitySystem { if (!factory.Comp.Active) { - _popup.PopupClient(Loc.GetString("timed-factory-cooldown", ("cooldown", (int) (factory.Comp.CooldownIn - _gameTiming.CurTime).TotalSeconds)), factory, args.User); + _popup.PopupClient(Loc.GetString("timed-factory-cooldown", ("cooldown", (int) factory.Comp.CooldownRemain)), + factory, + args.User); args.Cancel(); return; } @@ -59,7 +64,7 @@ public sealed class TimedFactorySystem : EntitySystem return; factory.Comp.Active = false; - factory.Comp.CooldownIn = _gameTiming.CurTime + factory.Comp.Cooldown; + factory.Comp.CooldownRemain = factory.Comp.Cooldown; _appearance.SetData(factory, GenericCultVisuals.State, false); _ui.CloseUi(factory.Owner, RadialSelectorUiKey.Key); diff --git a/Resources/Locale/en-US/construction/construction-system.ftl b/Resources/Locale/en-US/construction/construction-system.ftl index 81be8c4ab2..eb80617cea 100644 --- a/Resources/Locale/en-US/construction/construction-system.ftl +++ b/Resources/Locale/en-US/construction/construction-system.ftl @@ -5,3 +5,7 @@ construction-system-construct-no-materials = You don't have the materials to bui construction-system-already-building = You are already building that! construction-system-inside-container = You can't build while you're there! construction-system-cannot-start = You cannot craft this! + +## Rped + +rped-container-empty = RPED is empty! diff --git a/Resources/Locale/ru-RU/WWDP_TRANSLATION/_MainS/entity.ftl b/Resources/Locale/ru-RU/WWDP_TRANSLATION/_MainS/entity.ftl index b6043e9337..5c72bc4462 100644 --- a/Resources/Locale/ru-RU/WWDP_TRANSLATION/_MainS/entity.ftl +++ b/Resources/Locale/ru-RU/WWDP_TRANSLATION/_MainS/entity.ftl @@ -7060,7 +7060,7 @@ ent-MaterialHideCorgi = шкура корги ent-MaterialPyrotton = пироттон -ent-MaterialWebSilk = паутина +ent-MaterialWebSilk = шелк .desc = Липкий материал из паутины. @@ -8933,7 +8933,7 @@ ent-WindoorSecureUranium = укреплённая урановая стекло .desc = Настолько неоново-зелёная, что кажется, будто пахнет лаймом. Не нюхай. -ent-WebBed = паутина-кровать +ent-WebBed = кровать из паутины .desc = Попался. Ты теперь мебель. @@ -8976,7 +8976,7 @@ ent-TableBrass = латунный стол .desc = Блестит и не ржавеет. Чистый стимпанк. -ent-TableWeb = паутинный стол +ent-TableWeb = стол из паутины .desc = Удивительно гладкий и прочный. Пауки знают толк в дизайне. diff --git a/Resources/Locale/ru-RU/WWDP_TRANSLATION/actions/actions/spider.ftl b/Resources/Locale/ru-RU/WWDP_TRANSLATION/actions/actions/spider.ftl index 6b0a0b05c4..f2fa82e1c1 100644 --- a/Resources/Locale/ru-RU/WWDP_TRANSLATION/actions/actions/spider.ftl +++ b/Resources/Locale/ru-RU/WWDP_TRANSLATION/actions/actions/spider.ftl @@ -1,3 +1,3 @@ -spider-web-action-name = Паутина +spider-web-action-name = Создать паутину spider-web-action-description = Создает паутину, которая замедляет вашу добычу. diff --git a/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/actions/spider.ftl b/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/actions/spider.ftl index 8667dfae68..484bd2949d 100644 --- a/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/actions/spider.ftl +++ b/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/actions/spider.ftl @@ -1,4 +1,4 @@ -ent-ActionSpiderWeb = Паутина +ent-ActionSpiderWeb = Создать паутину .desc = Создает паутину, которая замедляет вашу добычу. ent-ActionSericulture = Ткать шёлк diff --git a/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/entities/objects/materials/materials.ftl b/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/entities/objects/materials/materials.ftl index bbda6be265..16f5aaa698 100644 --- a/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/entities/objects/materials/materials.ftl +++ b/Resources/Locale/ru-RU/WWDP_TRANSLATION/prototypes/entities/objects/materials/materials.ftl @@ -18,7 +18,7 @@ ent-MaterialDurathread1 = { ent-MaterialDurathread } .suffix = Одна .desc = { ent-MaterialDurathread.desc } -ent-MaterialWoodPlank = древесина +ent-MaterialWoodPlank = доски .suffix = Полный .desc = { ent-MaterialBase.desc } diff --git a/Resources/Locale/ru-RU/construction/construction-system.ftl b/Resources/Locale/ru-RU/construction/construction-system.ftl index 87dd1c416a..a7265fd5ea 100644 --- a/Resources/Locale/ru-RU/construction/construction-system.ftl +++ b/Resources/Locale/ru-RU/construction/construction-system.ftl @@ -4,4 +4,8 @@ construction-system-construct-cannot-start-another-construction = Сейчас construction-system-construct-no-materials = Недостаточно материалов для создания! construction-system-already-building = Вы уже строите это! construction-system-inside-container = Вы не можете строить, пока находитесь там! -construction-system-cannot-start = You cannot craft this! +construction-system-cannot-start = Вы не можете это собрать! + +## Rped + +rped-container-empty = РПЗД пуст! diff --git a/Resources/Prototypes/Actions/types.yml b/Resources/Prototypes/Actions/types.yml index 34f78ee5c8..2dbb1ec2f6 100644 --- a/Resources/Prototypes/Actions/types.yml +++ b/Resources/Prototypes/Actions/types.yml @@ -403,6 +403,7 @@ sprite: Clothing/Eyes/Goggles/nightvision.rsi state: icon event: !type:ToggleNightVisionEvent + useDelay: 4 - type: entity id: ToggleThermalVision diff --git a/Resources/Prototypes/Entities/Objects/Tools/flare.yml b/Resources/Prototypes/Entities/Objects/Tools/flare.yml index 935a8eebf5..39fd635ce8 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/flare.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/flare.yml @@ -31,8 +31,6 @@ - type: CartridgeAmmo proto: PelletShotgunFlare deleteOnSpawn: true - - - type: Sprite sprite: Objects/Misc/flare.rsi layers: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/fence_metal.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/fence_metal.yml index a68e1d50fb..dbfe0c22f7 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/fence_metal.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/fence_metal.yml @@ -9,7 +9,6 @@ - to: straight completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 5 @@ -17,7 +16,6 @@ - to: corner completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 5 @@ -25,7 +23,6 @@ - to: end completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 5 @@ -33,7 +30,6 @@ - to: gate completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 5 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/firelock.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/firelock.yml index 6b6d5c4895..a7020c91ae 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/firelock.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/firelock.yml @@ -140,7 +140,6 @@ doAfter: 0.25 completed: - !type:SnapToGrid - southRotation: true - node: FirelockGlassFrame edges: @@ -173,7 +172,6 @@ doAfter: 1 completed: - !type:SnapToGrid - southRotation: true - node: FirelockEdge entity: FirelockEdge diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml index f050c65c42..038965a33d 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml @@ -7,7 +7,6 @@ - to: railing completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 1 @@ -15,7 +14,6 @@ - to: railingCorner completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 2 @@ -23,7 +21,6 @@ - to: railingCornerSmall completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 1 @@ -31,7 +28,6 @@ - to: railingRound completed: - !type:SnapToGrid - southRotation: true steps: - material: MetalRod amount: 2 diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/hosbat.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/hosbat.yml index 4623a0bac9..ed47066574 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/hosbat.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/hosbat.yml @@ -7,7 +7,6 @@ animationRotation: -45 wideAnimationRotation: -135 attackRate: 2 - canHeavyAttack: false range: 1.6 damage: types: @@ -28,7 +27,7 @@ speed: 10 distance: 0.05 - type: AnimateOnHit - applyToUser: false + applyToUser: true whitelist: components: - MobState