From d4525a91e65db6ef696e1721c0e237612c7e605f Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:23:46 +0000 Subject: [PATCH] Fixes & more (#548) * - fix: Narsie not spawning, items not dropping on paralyze, cult tweaks. * - fix: Diagonal grilles layer. * - add: Cockroaches don't drop organs. * - add: Magic hands now work on interact & disable context menu interaction. * - fix: Shackles speech after doafter. * - tweak: Reduce flashbang knockdown, check for CanLieDown. * - tweak: Hspear limit. * - tweak: Remove knockdown tile friction. * - tweak: Engi belt in sus box. * - fix: Constructs can hear cult chat. * - fix: Desword audio. * - fix: Context menu. * - fix: Actually drop items on paralyze. * - tweak: Revert range reduction. * - add: Update thermal visibility. * - add: NPCs can miss. * - tweak: Update desc. * - fix: Actually fix desword audio. * - tweak: Secret weights & game presets. * - fix: Cult stun. --- .../ContextMenu/UI/EntityMenuUIController.cs | 17 ++++++ .../_White/Overlays/ThermalVisionOverlay.cs | 8 ++- Content.Server/Chat/Systems/ChatSystem.cs | 2 + .../Components/CultRitesHandComponent.cs | 2 +- .../Cult/Items/Systems/MagicHandSystem.cs | 61 +++++++++++-------- .../_White/Cult/Pylon/CheckForStructure.cs | 29 +++++++++ .../_White/Cult/Pylon/PylonSystem.cs | 9 --- .../Cult/Runes/Systems/CultSystem.Actions.cs | 7 ++- .../Item/ItemToggle/SharedItemToggleSystem.cs | 9 +-- .../Systems/SharedStandingStateSystem.cs | 18 ++---- Content.Shared/Stunnable/SharedStunSystem.cs | 5 +- .../Weapons/Melee/MeleeWeaponComponent.cs | 2 +- .../Weapons/Melee/SharedMeleeWeaponSystem.cs | 7 +-- .../FlashSoundSuppressionSystem.cs | 10 ++- .../_White/Cult/Actions/CultEvents.cs | 10 ++- .../_White/Cult/Systems/BloodSpearSystem.cs | 2 +- .../Locale/ru-RU/_white/cult/entities.ftl | 4 +- Resources/Locale/ru-RU/_white/white-shit.ftl | 2 + .../Catalog/Fills/Items/toolboxes.yml | 7 +-- .../Prototypes/Entities/Mobs/NPCs/animals.yml | 6 +- .../Weapons/Guns/Projectiles/projectiles.yml | 2 +- .../Entities/Objects/Weapons/Melee/spear.yml | 2 +- .../Objects/Weapons/Throwable/grenades.yml | 2 +- .../Entities/Structures/Walls/grille.yml | 8 +-- .../Prototypes/_White/Catalog/uplink.yml | 1 + .../_White/Construction/Cult/graphs.yml | 1 + .../_White/Entities/Cult/Items/hands.yml | 23 ------- .../Entities/Cult/Weapons/blood_spear.yml | 2 +- .../_White/Entities/Cult/constructs.yml | 1 + .../Guns/Projectiles/shinanogrenades.yml | 2 +- .../Objects/Weapons/chaplain_weapons.yml | 2 +- Resources/Prototypes/game_presets.yml | 10 +-- Resources/Prototypes/secret_weights.yml | 4 +- 33 files changed, 152 insertions(+), 125 deletions(-) create mode 100644 Content.Server/_White/Cult/Pylon/CheckForStructure.cs diff --git a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs index a60619baa3..227d9b05ae 100644 --- a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs +++ b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs @@ -3,12 +3,15 @@ using System.Numerics; using Content.Client.CombatMode; using Content.Client.Examine; using Content.Client.Gameplay; +using Content.Client.Popups; using Content.Client.Verbs; using Content.Client.Verbs.UI; using Content.Shared.CCVar; using Content.Shared.Examine; using Content.Shared.IdentityManagement; using Content.Shared.Input; +using Content.Shared.Mobs.Components; +using Content.Shared.Popups; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Input; @@ -50,6 +53,7 @@ namespace Content.Client.ContextMenu.UI [UISystemDependency] private readonly ExamineSystem _examineSystem = default!; [UISystemDependency] private readonly TransformSystem _xform = default!; [UISystemDependency] private readonly CombatModeSystem _combatMode = default!; + [UISystemDependency] private readonly PopupSystem _popup = default!; // WD EDIT private bool _updating; @@ -124,6 +128,19 @@ namespace Content.Client.ContextMenu.UI return; } + // WD START + var localEntity = _playerManager.LocalEntity; + if (args.Function == EngineKeyFunctions.Use && + EntityManager.HasComponent(entity.Value) && entity.Value != localEntity) + { + _popup.PopupClient(Loc.GetString("context-menu-cant-interact"), + entity.Value, localEntity, PopupType.MediumCaution); + _context.Close(); + args.Handle(); + return; + } + // WD END + // do some other server-side interaction? if (args.Function == EngineKeyFunctions.Use || args.Function == ContentKeyFunctions.ActivateItemInWorld || diff --git a/Content.Client/_White/Overlays/ThermalVisionOverlay.cs b/Content.Client/_White/Overlays/ThermalVisionOverlay.cs index fcc4863ff9..7f0701f0d9 100644 --- a/Content.Client/_White/Overlays/ThermalVisionOverlay.cs +++ b/Content.Client/_White/Overlays/ThermalVisionOverlay.cs @@ -1,7 +1,9 @@ using System.Linq; using System.Numerics; +using Content.Client.Stealth; using Content.Shared._White.Overlays; using Content.Shared.Body.Components; +using Content.Shared.Stealth.Components; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; @@ -19,6 +21,7 @@ public sealed class ThermalVisionOverlay : Overlay private readonly TransformSystem _transform; private readonly OccluderSystem _occluder; private readonly PointLightSystem _pointLight; + private readonly StealthSystem _stealth; public override OverlaySpace Space => OverlaySpace.WorldSpace; @@ -33,6 +36,7 @@ public sealed class ThermalVisionOverlay : Overlay _transform = _entity.System(); _occluder = _entity.System(); _pointLight = _entity.System(); + _stealth = _entity.System(); ZIndex = -1; } @@ -125,7 +129,9 @@ public sealed class ThermalVisionOverlay : Overlay private bool CanSee(EntityUid ent, SpriteComponent sprite) { - return sprite.Visible && !_entity.HasComponent(ent); + return sprite.Visible && !_entity.HasComponent(ent) && + (!_entity.TryGetComponent(ent, out StealthComponent? stealth) || + _stealth.GetVisibility(ent, stealth) > 0.5f); } private bool HasOccluders(EntityUid ent) diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index d5ddb8e16f..0cbb285514 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -24,6 +24,7 @@ using Content.Shared.Mobs.Systems; using Content.Shared.Players; using Content.Shared.Radio; using Content.Shared._White; +using Content.Shared._White.Cult.Components; using Content.Shared.Speech; using Content.Shared._White.Cult.Systems; using Robust.Server.Player; @@ -795,6 +796,7 @@ public sealed partial class ChatSystem : SharedChatSystem return Filter.Empty() .AddWhereAttachedEntity(HasComp) .AddWhereAttachedEntity(HasComp) + .AddWhereAttachedEntity(HasComp) .Recipients .Union(_adminManager.ActiveAdmins) .Select(p => p.Channel); diff --git a/Content.Server/_White/Cult/Items/Components/CultRitesHandComponent.cs b/Content.Server/_White/Cult/Items/Components/CultRitesHandComponent.cs index 9ed2b0dad6..4a83fdfbf3 100644 --- a/Content.Server/_White/Cult/Items/Components/CultRitesHandComponent.cs +++ b/Content.Server/_White/Cult/Items/Components/CultRitesHandComponent.cs @@ -14,7 +14,7 @@ public sealed partial class CultRitesHandComponent : BaseMagicHandComponent public SoundSpecifier SuckSound = new SoundPathSpecifier("/Audio/White/Cult/enter_blood.ogg"); [DataField] - public float HealModifier = 0.5f; + public float HealModifier = 1f; [DataField(customTypeSerializer: typeof(PrototypeIdListSerializer))] public List BloodRites = new () diff --git a/Content.Server/_White/Cult/Items/Systems/MagicHandSystem.cs b/Content.Server/_White/Cult/Items/Systems/MagicHandSystem.cs index 1fb79ba403..fbb615d9e2 100644 --- a/Content.Server/_White/Cult/Items/Systems/MagicHandSystem.cs +++ b/Content.Server/_White/Cult/Items/Systems/MagicHandSystem.cs @@ -17,11 +17,11 @@ using Content.Shared.Examine; using Content.Shared.FixedPoint; using Content.Shared.Fluids.Components; using Content.Shared.Interaction; +using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; using Content.Shared.StatusEffect; using Content.Shared.UserInterface; -using Content.Shared.Weapons.Melee.Events; using Robust.Server.Audio; using Robust.Server.GameObjects; using Robust.Shared.Prototypes; @@ -50,9 +50,8 @@ public sealed class MagicHandSystem : EntitySystem { base.Initialize(); - SubscribeLocalEvent(OnStunHit); - SubscribeLocalEvent(OnRitesHit); - SubscribeLocalEvent(OnInteract); + SubscribeLocalEvent(OnStunInteract); + SubscribeLocalEvent(OnRitesInteract); SubscribeLocalEvent(OnBloodRitesSelected); SubscribeLocalEvent(OnRitesSelectAttempt); SubscribeLocalEvent(BeforeRitesSelect); @@ -122,17 +121,26 @@ public sealed class MagicHandSystem : EntitySystem cultist.RitesBloodAmount -= prototype.BloodCost; } - private void OnInteract(Entity ent, ref AfterInteractEvent args) + private void OnRitesInteract(Entity ent, ref AfterInteractEvent args) { if (!args.CanReach || args.Target is not { } target) return; + if (!TryComp(args.User, out CultistComponent? cultist)) + return; + + if (HasComp(target) || HasComp(target)) + { + RitesHeal(ent, target, args.User, cultist); + return; + } + + var puddleQuery = GetEntityQuery(); if (!puddleQuery.HasComp(target)) return; - if (!TryComp(args.User, out BloodstreamComponent? bloodstreamComponent) || - !TryComp(args.User, out CultistComponent? cultist)) + if (!TryComp(args.User, out BloodstreamComponent? bloodstreamComponent)) return; var xform = Transform(target); @@ -176,28 +184,22 @@ public sealed class MagicHandSystem : EntitySystem args.Handled = true; } - private void OnRitesHit(Entity ent, ref MeleeHitEvent args) + private void RitesHeal(Entity ent, EntityUid target, EntityUid user, CultistComponent cultist) { - if (args.HitEntities.Count == 0) - return; - - var target = args.HitEntities[0]; var (uid, comp) = ent; - QueueDel(uid); - - if (!TryComp(args.User, out CultistComponent? cultist) || !TryComp(target, out DamageableComponent? damageable)) + if (!TryComp(target, out DamageableComponent? damageable) || !TryComp(target, out MobStateComponent? mobState)) return; - if (_mobState.IsDead(target)) + if (_mobState.IsDead(target, mobState)) { - Popup(Loc.GetString("cult-rites-dead"), args.User); + Popup(Loc.GetString("cult-rites-dead"), user); return; } if (cultist.RitesBloodAmount <= FixedPoint2.Zero) { - Popup(Loc.GetString("cult-rites-heal-no-blood"), args.User); + Popup(Loc.GetString("cult-rites-heal-no-blood"), user); return; } @@ -205,27 +207,32 @@ public sealed class MagicHandSystem : EntitySystem var totalDamage = damage.GetTotal(); if (totalDamage <= FixedPoint2.Zero) { - Popup(Loc.GetString("cult-rites-already-healed"), args.User); + Popup(Loc.GetString("cult-rites-already-healed"), user); return; } + QueueDel(uid); + var coef = FixedPoint2.Min(cultist.RitesBloodAmount * comp.HealModifier, totalDamage) / totalDamage; cultist.RitesBloodAmount = FixedPoint2.Max(FixedPoint2.Zero, cultist.RitesBloodAmount - totalDamage / comp.HealModifier); - _damageable.TryChangeDamage(target, -damage * coef, true, false, damageable, args.User); - Popup(Loc.GetString("cult-rites-after-heal", ("blood", cultist.RitesBloodAmount)), args.User); + _damageable.TryChangeDamage(target, -damage * coef, true, false, damageable, user); + Popup(Loc.GetString("cult-rites-after-heal", ("blood", cultist.RitesBloodAmount)), user); _audio.PlayPvs(comp.HealSound, target); - Speak(args.User, comp); + Speak(user, comp); } - private void OnStunHit(Entity ent, ref MeleeHitEvent args) + private void OnStunInteract(Entity ent, ref AfterInteractEvent args) { - if (args.HitEntities.Count == 0) + if (!args.CanReach || args.Target is not { } target) return; - var target = args.HitEntities[0]; var (uid, comp) = ent; + if (uid == target || !TryComp(target, out StatusEffectsComponent? status) || + HasComp(target) || HasComp(target)) + return; + QueueDel(uid); Spawn("CultStunFlashEffect", Transform(target).Coordinates); Speak(args.User, comp); @@ -241,8 +248,8 @@ public sealed class MagicHandSystem : EntitySystem var halo = HasComp(args.User); _statusEffects.TryAddStatusEffect(target, "Muted", halo ? comp.HaloMuteDuration : comp.MuteDuration, true, - "Muted"); - _stun.TryParalyze(target, halo ? comp.HaloDuration : comp.Duration, true); + "Muted", status); + _stun.TryParalyze(target, halo ? comp.HaloDuration : comp.Duration, true, status); } private void Popup(string msg, EntityUid user, PopupType type = PopupType.Small) diff --git a/Content.Server/_White/Cult/Pylon/CheckForStructure.cs b/Content.Server/_White/Cult/Pylon/CheckForStructure.cs new file mode 100644 index 0000000000..ce1bfb0d5b --- /dev/null +++ b/Content.Server/_White/Cult/Pylon/CheckForStructure.cs @@ -0,0 +1,29 @@ +using Content.Server.Popups; +using Content.Shared._White.Cult.Pylon; +using Content.Shared.Construction; +using Content.Shared.Popups; +using JetBrains.Annotations; + +namespace Content.Server._White.Cult.Pylon; + +[UsedImplicitly] +[DataDefinition] +public sealed partial class CheckForStructure : IGraphAction +{ + public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager) + { + var xform = entityManager.GetComponent(uid); + var coords = xform.Coordinates; + if (!SharedPylonComponent.CheckForStructure(coords, entityManager, 9f, uid)) + return; + + entityManager.QueueDeleteEntity(uid); + if (userUid != null) + { + entityManager.System() + .PopupEntity(Loc.GetString("cult-structure-craft-another-structure-nearby"), + userUid.Value, userUid.Value, PopupType.MediumCaution); + } + entityManager.SpawnEntity("CultRunicMetal4", coords); + } +} diff --git a/Content.Server/_White/Cult/Pylon/PylonSystem.cs b/Content.Server/_White/Cult/Pylon/PylonSystem.cs index 4f47481227..2c25383e13 100644 --- a/Content.Server/_White/Cult/Pylon/PylonSystem.cs +++ b/Content.Server/_White/Cult/Pylon/PylonSystem.cs @@ -61,15 +61,6 @@ public sealed class PylonSystem : EntitySystem private void OnInit(EntityUid uid, SharedPylonComponent component, ComponentInit args) { - var coords = Transform(uid).Coordinates; - if (SharedPylonComponent.CheckForStructure(coords, EntityManager, 9f, uid)) - { - QueueDel(uid); - _popupSystem.PopupCoordinates(Loc.GetString("cult-structure-craft-another-structure-nearby"), - coords, PopupType.MediumCaution); - Spawn("CultRunicMetal4", coords); - return; - } UpdateAppearance(uid, component); } diff --git a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs index b6c5b52081..1dbdb670c9 100644 --- a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs +++ b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs @@ -102,6 +102,8 @@ public partial class CultSystem { _popupSystem.PopupEntity("Цель обезмолвлена.", args.User, args.User); } + if (args.Speech != null) + _chat.TrySendInGameICMessage(args.User, args.Speech, InGameICChatType.Whisper, false); return; } @@ -369,8 +371,8 @@ public partial class CultSystem if (!TryComp(args.Target, out CuffableComponent? cuffs) || cuffs.Container.ContainedEntities.Count > 0) return; - var doAfterArgs = new DoAfterArgs(EntityManager, args.Performer, TimeSpan.FromSeconds(2), new ShacklesEvent(), - args.Performer, args.Target) + var doAfterArgs = new DoAfterArgs(EntityManager, args.Performer, TimeSpan.FromSeconds(2), + new ShacklesEvent(args.Speech), args.Performer, args.Target) { BreakOnMove = true, BreakOnDamage = true @@ -379,7 +381,6 @@ public partial class CultSystem if (!_doAfterSystem.TryStartDoAfter(doAfterArgs)) return; - Speak(args); args.Handled = true; } diff --git a/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs b/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs index 8db31715fc..8f330cb27a 100644 --- a/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs +++ b/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs @@ -7,7 +7,6 @@ using Content.Shared.Wieldable; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Robust.Shared.Network; -using Robust.Shared.Timing; namespace Content.Shared.Item.ItemToggle; /// @@ -23,7 +22,6 @@ public abstract class SharedItemToggleSystem : EntitySystem [Dependency] private readonly SharedPointLightSystem _light = default!; [Dependency] private readonly INetManager _netManager = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly IGameTiming _timing = default!; public override void Initialize() { @@ -242,17 +240,14 @@ public abstract class SharedItemToggleSystem : EntitySystem /// private void UpdateActiveSound(EntityUid uid, ItemToggleActiveSoundComponent activeSound, ref ItemToggledEvent args) { - if (!_timing.IsFirstTimePredicted) // WD + if (_netManager.IsClient) // WD EDIT, FUCK THIS (desword sound broken) return; if (args.Activated) { if (activeSound.ActiveSound != null && activeSound.PlayingStream == null) { - if (args.Predicted) - activeSound.PlayingStream = _audio.PlayPredicted(activeSound.ActiveSound, uid, args.User, AudioParams.Default.WithLoop(true)).Value.Entity; - else - activeSound.PlayingStream = _audio.PlayPvs(activeSound.ActiveSound, uid, AudioParams.Default.WithLoop(true)).Value.Entity; + activeSound.PlayingStream = _audio.PlayPvs(activeSound.ActiveSound, uid, AudioParams.Default.WithLoop(true)) .Value.Entity; } } else diff --git a/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs b/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs index c502bff8a1..2aaf40baa0 100644 --- a/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs +++ b/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs @@ -11,7 +11,6 @@ using Content.Shared._White.Wizard.Timestop; using Content.Shared.Buckle; using Content.Shared.Buckle.Components; using Content.Shared.Mobs; -using Content.Shared.Movement.Events; using Robust.Shared.Audio.Systems; using Robust.Shared.Input.Binding; using Robust.Shared.Physics; @@ -29,10 +28,8 @@ public abstract partial class SharedStandingStateSystem : EntitySystem [Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; // WD EDIT [Dependency] private readonly MovementSpeedModifierSystem _movement = default!; // WD EDIT - [Dependency] private readonly SharedStunSystem _stun = default!; // WD EDIT [Dependency] private readonly MobStateSystem _mobState = default!; // WD EDIT [Dependency] private readonly SharedBuckleSystem _buckle = default!; // WD EDIT - [Dependency] private readonly SharedTransformSystem _transform = default!; // WD EDIT [Dependency] private readonly SharedRotationVisualsSystem _rotation = default!; // WD EDIT // If StandingCollisionLayer value is ever changed to more than one layer, the logic needs to be edited. @@ -53,7 +50,6 @@ public abstract partial class SharedStandingStateSystem : EntitySystem SubscribeLocalEvent(OnStandingUpDoAfter); SubscribeLocalEvent(OnRefreshMovementSpeed); - SubscribeLocalEvent(OnTileFriction); SubscribeLocalEvent(OnSlipAttempt); InitializeColliding(); @@ -114,12 +110,6 @@ public abstract partial class SharedStandingStateSystem : EntitySystem args.ModifySpeed(1f, 1f); } - private void OnTileFriction(Entity ent, ref TileFrictionEvent args) - { - if (IsDown(ent)) - args.Modifier *= SharedStunSystem.KnockDownModifier; - } - private void OnSlipAttempt(EntityUid uid, StandingStateComponent component, SlipAttemptEvent args) { if (IsDown(uid)) @@ -171,7 +161,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem return true; } - public enum DropHeldItemsBehavior + public enum DropHeldItemsBehavior : byte { NoDrop, DropIfStanding, @@ -222,9 +212,6 @@ public abstract partial class SharedStandingStateSystem : EntitySystem if (TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT return false; - if (standingState.CurrentState is StandingState.Lying or StandingState.GettingUp) - return true; - // This is just to avoid most callers doing this manually saving boilerplate // 99% of the time you'll want to drop items but in some scenarios (e.g. buckling) you don't want to. // We do this BEFORE downing because something like buckle may be blocking downing but we want to drop hand items anyway @@ -234,6 +221,9 @@ public abstract partial class SharedStandingStateSystem : EntitySystem RaiseLocalEvent(uid, new DropHandItemsEvent()); } + if (standingState.CurrentState is StandingState.Lying or StandingState.GettingUp) + return true; + var msg = new DownAttemptEvent(); RaiseLocalEvent(uid, msg); diff --git a/Content.Shared/Stunnable/SharedStunSystem.cs b/Content.Shared/Stunnable/SharedStunSystem.cs index f97be06252..6053086196 100644 --- a/Content.Shared/Stunnable/SharedStunSystem.cs +++ b/Content.Shared/Stunnable/SharedStunSystem.cs @@ -107,7 +107,7 @@ public abstract class SharedStunSystem : EntitySystem private void OnKnockInit(EntityUid uid, KnockedDownComponent component, ComponentInit args) { RaiseNetworkEvent(new CheckAutoGetUpEvent()); // WD EDIT - _standingState.Down(uid); + _standingState.TryLieDown(uid, null, SharedStandingStateSystem.DropHeldItemsBehavior.DropIfStanding); } private void OnKnockShutdown(EntityUid uid, KnockedDownComponent component, ComponentShutdown args) @@ -207,6 +207,9 @@ public abstract class SharedStunSystem : EntitySystem if (_statusEffect.HasStatusEffect(uid, "Stun")) time = TimeSpan.FromSeconds(6); + if (_standingState.IsDown(uid)) // WD + RaiseLocalEvent(uid, new DropHandItemsEvent()); + return TryKnockdown(uid, time, refresh, status) && TryStun(uid, time, refresh, status); } diff --git a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs index 79ef8319e5..217d9879c6 100644 --- a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs +++ b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs @@ -129,7 +129,7 @@ public sealed partial class MeleeWeaponComponent : Component /// Nearest edge range to hit an entity. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] - public float Range = 1.2f; + public float Range = 1.5f; /// /// Total width of the angle for wide attacks. diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index e43e991fe3..96085ebfda 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -401,7 +401,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem if (lightTarget == null) { - if (weapon.CanMiss) + if (weapon.CanMiss || session == null) // NPCs can miss break; return false; } @@ -512,11 +512,6 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem animation = miss && weapon.Animation == "WeaponArcThrust" ? weapon.MissAnimation : weapon.Animation; - if (miss) - { - weapon.NextAttack -= fireRate / 2f; - weapon.NextMobAttack -= fireRate / 2f; - } // WD EDIT END break; case DisarmAttackEvent disarm: diff --git a/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs b/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs index a60cde55be..03f02ce782 100644 --- a/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs +++ b/Content.Shared/_White/BuffedFlashGrenade/FlashSoundSuppressionSystem.cs @@ -1,4 +1,5 @@ using Content.Shared.Inventory; +using Content.Shared.Standing; using Content.Shared.Stunnable; namespace Content.Shared._White.BuffedFlashGrenade; @@ -38,9 +39,12 @@ public sealed class FlashSoundSuppressionSystem : EntitySystem if (distance > range) return; - var knockdownTime = float.Lerp(knockdownDuration, 0f, distance / range); - if (knockdownTime > 0f) - _stunSystem.TryKnockdown(target, TimeSpan.FromSeconds(knockdownTime), true); + if (TryComp(target, out var standingState) && standingState.CanLieDown) + { + var knockdownTime = float.Lerp(knockdownDuration, 0f, distance / range); + if (knockdownTime > 0f) + _stunSystem.TryKnockdown(target, TimeSpan.FromSeconds(knockdownTime), true); + } var stunTime = float.Lerp(stunDuration, 0f, distance / range); if (stunTime > 0f) diff --git a/Content.Shared/_White/Cult/Actions/CultEvents.cs b/Content.Shared/_White/Cult/Actions/CultEvents.cs index 5f584db374..a8075a9eb8 100644 --- a/Content.Shared/_White/Cult/Actions/CultEvents.cs +++ b/Content.Shared/_White/Cult/Actions/CultEvents.cs @@ -6,8 +6,16 @@ using Robust.Shared.Serialization; namespace Content.Shared._White.Cult.Actions; [Serializable, NetSerializable] -public sealed partial class ShacklesEvent : SimpleDoAfterEvent +public sealed partial class ShacklesEvent : DoAfterEvent { + public string? Speech; + + public ShacklesEvent(string? speech) + { + Speech = speech; + } + + public override DoAfterEvent Clone() => this; } [Serializable, NetSerializable] diff --git a/Content.Shared/_White/Cult/Systems/BloodSpearSystem.cs b/Content.Shared/_White/Cult/Systems/BloodSpearSystem.cs index 523e8b576d..ff2620503a 100644 --- a/Content.Shared/_White/Cult/Systems/BloodSpearSystem.cs +++ b/Content.Shared/_White/Cult/Systems/BloodSpearSystem.cs @@ -49,7 +49,7 @@ public sealed class BloodSpearSystem : EntitySystem if (!_holy.IsHoldingHolyWeapon(args.Target)) { - if(!_stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(4), true, status)) + if(!_stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(5), true, status)) return; } diff --git a/Resources/Locale/ru-RU/_white/cult/entities.ftl b/Resources/Locale/ru-RU/_white/cult/entities.ftl index 6f0853d15c..3a61c35a89 100644 --- a/Resources/Locale/ru-RU/_white/cult/entities.ftl +++ b/Resources/Locale/ru-RU/_white/cult/entities.ftl @@ -6,10 +6,10 @@ ent-SoulShardGhost = камень душ .suffix = Роль призраков ent-StunHand = оглушающая аура - .desc = Оглушит и обезмолвит жертву при ударе. + .desc = Оглушит и обезмолвит жертву при контакте. ent-RitesHand = аура кровавых обрядов - .desc = Впитывает кровь из всего, к чему прикасается. При ударе по культистам и конструктам может исцелить их. Используйте в руке, чтобы провести продвинутый обряд. + .desc = Впитывает кровь из всего, к чему прикасается. При контакте с культистами или конструктами может исцелить их. Используйте в руке, чтобы провести продвинутый обряд. ent-ShadowShackles = теневые оковы .desc = Оковы, сковывающие запястья с помощью зловещей магии. diff --git a/Resources/Locale/ru-RU/_white/white-shit.ftl b/Resources/Locale/ru-RU/_white/white-shit.ftl index 5ca1b1e9be..03839476dc 100644 --- a/Resources/Locale/ru-RU/_white/white-shit.ftl +++ b/Resources/Locale/ru-RU/_white/white-shit.ftl @@ -22,3 +22,5 @@ melee-block-event-blocked = заблокировал! alerts-blocked-name = Атака заблокирована alerts-blocked-desc = Невозможно блокировать некоторое время. melee-block-component-delay = Может блокировать атаку ближнего боя каждые {$delay} секунд. + +context-menu-cant-interact = Невозможно взаимодействовать через контекстное меню! diff --git a/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml b/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml index e350504eaa..7066c205e7 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml @@ -112,12 +112,7 @@ components: - type: StorageFill contents: - - id: Crowbar - - id: Wrench - - id: Screwdriver - - id: Wirecutter - - id: Welder - - id: Multitool + - id: ClothingBeltUtilityEngineering - id: ClothingHandsGlovesCombat - id: ClothingMaskGasSyndicate diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index e7ff66d4d6..87c0800201 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -375,7 +375,8 @@ damageType: Blunt damage: 10 behaviors: - - !type:GibBehavior { } + - !type:GibBehavior + recursive: false - type: NonSpreaderZombie - type: entity @@ -529,7 +530,8 @@ damageType: Blunt damage: 60 behaviors: - - !type:GibBehavior { } + - !type:GibBehavior + recursive: false - type: FireVisuals sprite: Mobs/Effects/onfire.rsi normalState: Mouse_burning diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index 7af6f1c865..685b72c962 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -757,7 +757,7 @@ - type: FlashOnTrigger range: 7 stunTime: 2 # WD - knockdownTime: 20 # WD + knockdownTime: 10 # WD - type: SpawnOnTrigger proto: GrenadeFlashEffect - type: ActiveTimerTrigger diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml index 958cd0c854..d982243dfe 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml @@ -42,7 +42,7 @@ animation: WeaponArcThrust soundHit: path: /Audio/Weapons/bladeslice.ogg - range: 1.8 # Spears are long + range: 2 # Spears are long - type: DamageOtherOnHit damage: types: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml index 2823152405..0313a75868 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml @@ -68,7 +68,7 @@ - type: FlashOnTrigger range: 7 stunTime: 2 # WD - knockdownTime: 20 # WD + knockdownTime: 10 # WD - type: SoundOnTrigger sound: path: "/Audio/Effects/flash_bang.ogg" diff --git a/Resources/Prototypes/Entities/Structures/Walls/grille.yml b/Resources/Prototypes/Entities/Structures/Walls/grille.yml index c8092cff2f..cf25143c08 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/grille.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/grille.yml @@ -12,7 +12,7 @@ - type: RCDDeconstructable cost: 6 delay: 4 - fx: EffectRCDDeconstruct4 + fx: EffectRCDDeconstruct4 - type: Tag tags: - DeleteWithWindows @@ -200,7 +200,7 @@ mask: - FullTileMask layer: - - WallLayer + - GlassLayer - type: Construction graph: GrilleDiagonal node: grilleDiagonal @@ -235,8 +235,8 @@ mask: - FullTileMask layer: - - WallLayer + - GlassLayer - type: Construction graph: GrilleDiagonal node: clockworkGrilleDiagonal - + diff --git a/Resources/Prototypes/_White/Catalog/uplink.yml b/Resources/Prototypes/_White/Catalog/uplink.yml index 4eb6ad56db..fbf1470776 100644 --- a/Resources/Prototypes/_White/Catalog/uplink.yml +++ b/Resources/Prototypes/_White/Catalog/uplink.yml @@ -101,6 +101,7 @@ blacklist: tags: - NukeOpsUplink + saleLimit: 1 # Night Vision - type: listing diff --git a/Resources/Prototypes/_White/Construction/Cult/graphs.yml b/Resources/Prototypes/_White/Construction/Cult/graphs.yml index fafb578917..418dd85338 100644 --- a/Resources/Prototypes/_White/Construction/Cult/graphs.yml +++ b/Resources/Prototypes/_White/Construction/Cult/graphs.yml @@ -87,6 +87,7 @@ completed: - !type:SnapToGrid southRotation: true + - !type:CheckForStructure steps: - material: RunicMetalSheets amount: 4 diff --git a/Resources/Prototypes/_White/Entities/Cult/Items/hands.yml b/Resources/Prototypes/_White/Entities/Cult/Items/hands.yml index c98cd99bcf..1d217d0ed3 100644 --- a/Resources/Prototypes/_White/Entities/Cult/Items/hands.yml +++ b/Resources/Prototypes/_White/Entities/Cult/Items/hands.yml @@ -8,15 +8,6 @@ components: - type: Item size: Ginormous - - type: MeleeWeapon - canBeBlocked: false - canHeavyAttack: false - canMiss: false - attackRate: 2 - wideAnimationRotation: 180 - damage: - types: - Heat: 0 - type: DeleteOnDropAttempt message: cult-hand-component-extra-message - type: Unremoveable @@ -35,15 +26,6 @@ state: icon - type: Item sprite: White/Cult/Entities/stun.rsi - - type: MeleeWeapon - canAttackSelf: false - attackWhitelist: - components: - - StatusEffects - attackBlacklist: - components: - - Cultist - - Construct - type: CultStunHand speech: "Fuu ma'jin!" @@ -58,11 +40,6 @@ state: icon - type: Item sprite: White/Cult/Entities/rites.rsi - - type: MeleeWeapon - attackWhitelist: - components: - - Cultist - - Construct - type: CultRitesHand speech: "Fel'th Dol Ab'orod!" - type: ActivatableUI diff --git a/Resources/Prototypes/_White/Entities/Cult/Weapons/blood_spear.yml b/Resources/Prototypes/_White/Entities/Cult/Weapons/blood_spear.yml index 64acfccdf8..eb996150ef 100644 --- a/Resources/Prototypes/_White/Entities/Cult/Weapons/blood_spear.yml +++ b/Resources/Prototypes/_White/Entities/Cult/Weapons/blood_spear.yml @@ -35,7 +35,7 @@ animation: WeaponArcThrust soundHit: path: /Audio/Weapons/bladeslice.ogg - range: 1.8 + range: 2 - type: DamageOtherOnHit damage: types: diff --git a/Resources/Prototypes/_White/Entities/Cult/constructs.yml b/Resources/Prototypes/_White/Entities/Cult/constructs.yml index e28c658f3d..7ed5f7e01b 100644 --- a/Resources/Prototypes/_White/Entities/Cult/constructs.yml +++ b/Resources/Prototypes/_White/Entities/Cult/constructs.yml @@ -84,6 +84,7 @@ group: Construct - type: GlobalAntagonist antagonistPrototype: globalAntagonistCult + - type: ThermalBlocker - type: entity id: JuggernautConstruct diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Projectiles/shinanogrenades.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Projectiles/shinanogrenades.yml index 0cda7a6807..f73459d3dd 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Projectiles/shinanogrenades.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Projectiles/shinanogrenades.yml @@ -41,7 +41,7 @@ - type: FlashOnTrigger range: 5 stunTime: 2 # WD - knockdownTime: 20 # WD + knockdownTime: 10 # WD - type: SpawnOnTrigger proto: GrenadeFlashEffect - type: DeleteOnTrigger diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml index ab805ea879..3e0ab8c74b 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml @@ -265,7 +265,7 @@ - type: MeleeWeapon soundHit: path: /Audio/White/Items/hit/chainhit.ogg - range: 2.2 + range: 2.5 damage: types: Blunt: 18 diff --git a/Resources/Prototypes/game_presets.yml b/Resources/Prototypes/game_presets.yml index 0a48d7faae..9311b56a22 100644 --- a/Resources/Prototypes/game_presets.yml +++ b/Resources/Prototypes/game_presets.yml @@ -3,7 +3,7 @@ alias: - survival name: survival-title - showInVote: false # secret + showInVote: true description: survival-description rules: - RampingStationEventScheduler @@ -98,7 +98,7 @@ - traitor name: traitor-title description: traitor-description - showInVote: false + showInVote: true rules: - Traitor - SubGamemodesRule @@ -114,7 +114,7 @@ name: death-match-title description: death-match-description maxPlayers: 15 - showInVote: true + showInVote: false supportedMaps: DeathMatchMapPool rules: - DeathMatch31 @@ -141,7 +141,7 @@ - revolutionaries name: rev-title description: rev-description - showInVote: false + showInVote: true rules: - Revolutionary - SubGamemodesRule @@ -172,7 +172,7 @@ - pirates name: pirates-title description: pirates-description - showInVote: true + showInVote: false rules: - Pirates - BasicStationEventScheduler diff --git a/Resources/Prototypes/secret_weights.yml b/Resources/Prototypes/secret_weights.yml index 1e624b6b4e..95effa6e45 100644 --- a/Resources/Prototypes/secret_weights.yml +++ b/Resources/Prototypes/secret_weights.yml @@ -5,7 +5,7 @@ Changeling: 0.14 Nukeops: 0.14 Cult: 0.15 - Wizard: 0.15 - Revolutionary: 0.04 + Wizard: 0.09 + Revolutionary: 0.1 Zombie: 0.04 Survival: 0.04