From f9224ea2f5a4a8058c6d2aba46aec0d3b50edcec Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Thu, 25 Jul 2024 13:32:56 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B=20=D0=B2=20?= =?UTF-8?q?=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D0=BE=D0=BC=20(#495)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - fix: No concealed rune interaction. * - fix: Wizard rule min players. * - add: Holosign stuff. * - add: Don't despawn dragon. * - tweak: Implants. * - fix: Hijack. * - remove: Hardsuit objective. * - fix: Holosigns. * - fix: Fix chair rotation. * - fix: No shooting while delayed. * - fix: Changeling felinid polymorph. * - fix: Fix stuck in container in container. * - fix: Fix flash in containers. * - fix: Whistle chameleon. * - fix: Loc. * - fix: No shooting in body bags. * - fix: Error. * - fix: Ling felinid fix attempt 2. --- .../Changeling/ChangelingSystem.Abilities.cs | 7 +++++++ Content.Server/Dragon/DragonSystem.cs | 2 ++ Content.Server/Flash/FlashSystem.cs | 21 +++++++++++++++++++ .../Holosign/HolosignProjectorComponent.cs | 2 +- Content.Server/Holosign/HolosignSystem.cs | 7 ++++++- Content.Server/Implants/ImplanterSystem.cs | 2 ++ .../Systems/HijackShuttleConditionSystem.cs | 2 +- .../_White/Wizard/WizardRuleSystem.cs | 7 +++++++ Content.Shared/Buckle/SharedBuckleSystem.cs | 4 ++-- .../Systems/SharedStandingStateSystem.cs | 8 ++++--- .../SharedEntityStorageSystem.cs | 2 +- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 8 ++++++- Content.Shared/Whistle/WhistleSystem.cs | 4 ++++ .../ShootBlockerContainerComponent.cs | 6 ++++++ .../_White/Cult/Systems/ConcealableSystem.cs | 4 ++-- .../Locale/en-US/game-ticking/game-ticker.ftl | 2 +- .../Objects/Devices/holoprojectors.yml | 1 + .../Objects/Specific/Medical/morgue.yml | 1 + .../Prototypes/Objectives/objectiveGroups.yml | 4 ++-- .../_White/Wizard/objective_groups.yml | 2 +- 20 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 Content.Shared/_White/Containers/ShootBlockerContainerComponent.cs diff --git a/Content.Server/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/Changeling/ChangelingSystem.Abilities.cs index b9e765d626..ea95e97736 100644 --- a/Content.Server/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/Changeling/ChangelingSystem.Abilities.cs @@ -4,6 +4,7 @@ using Content.Server._White.Cult.GameRule; using Content.Server._White.Mood; using Content.Server._White.Other.FastAndFuriousSystem; using Content.Server._White.Wizard; +using Content.Server.Abilities.Felinid; using Content.Server.Administration.Systems; using Content.Server.Bible.Components; using Content.Server.Body.Components; @@ -1008,6 +1009,12 @@ public sealed partial class ChangelingSystem _actionContainerSystem.TransferAllActionsFiltered(target, polymorphEntity.Value, polymorphEntity.Value); _action.GrantContainedActions(polymorphEntity.Value, polymorphEntity.Value); + if (!TryComp(polymorphEntity.Value, out FelinidComponent? felinid)) + return polymorphEntity; + + _action.SetCharges(felinid.HairballAction, 0); + _action.SetEnabled(felinid.HairballAction, false); + return polymorphEntity; } diff --git a/Content.Server/Dragon/DragonSystem.cs b/Content.Server/Dragon/DragonSystem.cs index d33e6f3bef..69cd8c3b97 100644 --- a/Content.Server/Dragon/DragonSystem.cs +++ b/Content.Server/Dragon/DragonSystem.cs @@ -78,6 +78,8 @@ public sealed partial class DragonSystem : EntitySystem } } + continue; // WD EDIT, Don't despawn dragon + // At max rifts if (comp.Rifts.Count >= RiftsAllowed) continue; diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index 9dbc9c76ff..13dfaca6bf 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -17,7 +17,9 @@ using Content.Shared.Traits.Assorted; using Content.Shared.Weapons.Melee.Events; using Content.Shared.StatusEffect; using Content.Shared.Examine; +using Content.Shared.Hands.Components; using Robust.Server.Audio; +using Robust.Server.Containers; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Random; @@ -40,6 +42,7 @@ namespace Content.Server.Flash [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!; [Dependency] private readonly FlashSoundSuppressionSystem _flashSoundSuppressionSystem = default!; + [Dependency] private readonly ContainerSystem _container = default!; public override void Initialize() { @@ -162,6 +165,14 @@ namespace Content.Server.Flash var statusEffectsQuery = GetEntityQuery(); var damagedByFlashingQuery = GetEntityQuery(); + // WD START + var flashInContainer = + _container.TryGetOuterContainer(source.Owner, transform, out var flashContainer); + + if (flashInContainer && HasComp(flashContainer!.Owner)) + flashInContainer = false; + // WD END + foreach (var entity in _entityLookup.GetEntitiesInRange(transform.Coordinates, range)) { if (!_random.Prob(probability)) @@ -171,6 +182,16 @@ namespace Content.Server.Flash if (!statusEffectsQuery.HasComponent(entity) && !damagedByFlashingQuery.HasComponent(entity)) continue; + // WD START + var entityInContainer = _container.TryGetContainingContainer(entity, out var entityContainer); + + if (flashInContainer != entityInContainer) + continue; + + if (flashInContainer && flashContainer != entityContainer) + continue; + // WD END + // Check for entites in view // put damagedByFlashingComponent in the predicate because shadow anomalies block vision. if (!_examine.InRangeUnOccluded(entity, mapPosition, range, predicate: (e) => damagedByFlashingQuery.HasComponent(e))) diff --git a/Content.Server/Holosign/HolosignProjectorComponent.cs b/Content.Server/Holosign/HolosignProjectorComponent.cs index 8cc5aa517f..fa0e1b886d 100644 --- a/Content.Server/Holosign/HolosignProjectorComponent.cs +++ b/Content.Server/Holosign/HolosignProjectorComponent.cs @@ -14,7 +14,7 @@ namespace Content.Server.Holosign /// How much charge a single use expends. /// [ViewVariables(VVAccess.ReadWrite), DataField] - public int Uses = 10; + public int Uses = 6; [ViewVariables(VVAccess.ReadWrite), DataField] public List Signs = new(); diff --git a/Content.Server/Holosign/HolosignSystem.cs b/Content.Server/Holosign/HolosignSystem.cs index e8a1d87101..e138a04b60 100644 --- a/Content.Server/Holosign/HolosignSystem.cs +++ b/Content.Server/Holosign/HolosignSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Interaction; using Content.Shared.Interaction.Events; using Content.Shared.Popups; using Content.Shared.Storage; +using Content.Shared.Timing; using Robust.Shared.Utility; namespace Content.Server.Holosign; @@ -13,6 +14,7 @@ public sealed class HolosignSystem : EntitySystem { [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly UseDelaySystem _useDelay = default!; public override void Initialize() { @@ -61,7 +63,10 @@ public sealed class HolosignSystem : EntitySystem return; } - if (args.Handled || !args.CanReach || HasComp(args.Target)) + if (args.Handled || !args.CanReach || args.Target != null) + return; + + if (TryComp(uid, out UseDelayComponent? useDelay) && !_useDelay.TryResetDelay((uid, useDelay), true)) return; if (component.Signs.Count >= component.Uses) // wd edit diff --git a/Content.Server/Implants/ImplanterSystem.cs b/Content.Server/Implants/ImplanterSystem.cs index e441574213..125a62107a 100644 --- a/Content.Server/Implants/ImplanterSystem.cs +++ b/Content.Server/Implants/ImplanterSystem.cs @@ -102,6 +102,8 @@ public sealed partial class ImplanterSystem : SharedImplanterSystem BreakOnDamage = true, BreakOnMove = true, NeedHand = true, + BreakOnHandChange = true, // WD EDIT + MovementThreshold = 0.01f, }; if (!_doAfter.TryStartDoAfter(args)) diff --git a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs index 9e0d2c3d5b..e353df7ba8 100644 --- a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs +++ b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs @@ -82,7 +82,7 @@ public sealed class HijackShuttleConditionSystem : EntitySystem if (!isHumanoid) // Only humanoids count as enemies continue; - var isAntagonist = _role.MindIsAntagonist(mindId); + var isAntagonist = _role.MindIsAntagonist(crewMindId); if (isAntagonist) // Allow antagonist continue; diff --git a/Content.Server/_White/Wizard/WizardRuleSystem.cs b/Content.Server/_White/Wizard/WizardRuleSystem.cs index ad21269529..f7a87762e5 100644 --- a/Content.Server/_White/Wizard/WizardRuleSystem.cs +++ b/Content.Server/_White/Wizard/WizardRuleSystem.cs @@ -75,6 +75,13 @@ public sealed class WizardRuleSystem : GameRuleSystem _sawmill = _logManager.GetSawmill("Wizard"); } + protected override void Added(EntityUid uid, WizardRuleComponent component, GameRuleComponent gameRule, GameRuleAddedEvent args) + { + base.Added(uid, component, gameRule, args); + + gameRule.MinPlayers = component.MinPlayers; + } + private void OnObjectivesTextGetInfo(Entity ent, ref ObjectivesTextGetInfoEvent args) { args.Minds = ent.Comp.WizardMinds; diff --git a/Content.Shared/Buckle/SharedBuckleSystem.cs b/Content.Shared/Buckle/SharedBuckleSystem.cs index c221de61d3..bb39c31dbe 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.cs @@ -86,10 +86,10 @@ public abstract partial class SharedBuckleSystem : EntitySystem case StrapPosition.None: break; case StrapPosition.Stand: - _standing.Stand(buckleUid); + _standing.Stand(buckleUid, unbuckle: false); break; case StrapPosition.Down: - _standing.Down(buckleUid, false, false); + _standing.Down(buckleUid, false, false, false); break; } } diff --git a/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs b/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs index 3c0fa89e5b..de8b9f0cca 100644 --- a/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs +++ b/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs @@ -186,7 +186,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem return false; } - Down(uid, true, behavior != DropHeldItemsBehavior.NoDrop, standingState); + Down(uid, true, behavior != DropHeldItemsBehavior.NoDrop, true, standingState); return true; } // WD EDIT END @@ -203,6 +203,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem EntityUid uid, bool playSound = true, bool dropHeldItems = true, + bool unbuckle = true, // WD EDIT StandingStateComponent? standingState = null, AppearanceComponent? appearance = null, HandsComponent? hands = null) @@ -292,7 +293,8 @@ public abstract partial class SharedStandingStateSystem : EntitySystem EntityUid uid, StandingStateComponent? standingState = null, AppearanceComponent? appearance = null, - bool force = false) + bool force = false, + bool unbuckle = true) // WD EDIT { if (!Resolve(uid, ref standingState, false)) return false; @@ -300,7 +302,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem // Optional component. Resolve(uid, ref appearance, false); - if (TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT + if (unbuckle && TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT return false; if (standingState.CurrentState is StandingState.Standing) diff --git a/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs index 702117e5ca..3b8021d3f9 100644 --- a/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs @@ -361,7 +361,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem return false; } - if (_container.IsEntityInContainer(target)) + if (_container.IsEntityInContainer(target) && !_container.ContainsEntity(target, user)) // WD EDIT { if (_container.TryGetOuterContainer(target,Transform(target) ,out var container) && !HasComp(container.Owner)) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 3b7e48548b..c760b400ae 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -1,5 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; +using Content.Shared._White.Containers; using Content.Shared._White.Events; using Content.Shared._White.WeaponModules; using Content.Shared.ActionBlocker; @@ -230,7 +231,12 @@ public abstract partial class SharedGunSystem : EntitySystem private void AttemptShoot(EntityUid user, EntityUid gunUid, GunComponent gun) { if (gun.FireRateModified <= 0f || - !_actionBlockerSystem.CanAttack(user)) + !_actionBlockerSystem.CanAttack(user) || TryComp(gunUid, out UseDelayComponent? useDelay) && + _useDelay.IsDelayed((gunUid, useDelay))) // WD EDIT + return; + + if (Containers.TryGetOuterContainer(user, Transform(user), out var container) && + HasComp(container.Owner)) // WD return; var toCoordinates = gun.ShootCoordinates; diff --git a/Content.Shared/Whistle/WhistleSystem.cs b/Content.Shared/Whistle/WhistleSystem.cs index 9db7ffa0bf..29e334fd0f 100644 --- a/Content.Shared/Whistle/WhistleSystem.cs +++ b/Content.Shared/Whistle/WhistleSystem.cs @@ -1,6 +1,7 @@ using Content.Shared.Coordinates; using Content.Shared.Humanoid; using Content.Shared.Interaction.Events; +using Content.Shared.Polymorph.Components; using Content.Shared.Stealth.Components; using JetBrains.Annotations; using Robust.Shared.Timing; @@ -54,6 +55,9 @@ public sealed class WhistleSystem : EntitySystem if (TryComp(iterator, out stealth) && stealth.Enabled) continue; + if (HasComp(iterator)) // WD + continue; + //We don't want to ping user of whistle if (iterator.Owner == owner) continue; diff --git a/Content.Shared/_White/Containers/ShootBlockerContainerComponent.cs b/Content.Shared/_White/Containers/ShootBlockerContainerComponent.cs new file mode 100644 index 0000000000..96efb4af1e --- /dev/null +++ b/Content.Shared/_White/Containers/ShootBlockerContainerComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Shared._White.Containers; + +[RegisterComponent] +public sealed partial class ShootBlockerContainerComponent : Component +{ +} diff --git a/Content.Shared/_White/Cult/Systems/ConcealableSystem.cs b/Content.Shared/_White/Cult/Systems/ConcealableSystem.cs index 68d4122178..5e3eaa8792 100644 --- a/Content.Shared/_White/Cult/Systems/ConcealableSystem.cs +++ b/Content.Shared/_White/Cult/Systems/ConcealableSystem.cs @@ -11,10 +11,10 @@ public sealed class ConcealableSystem : EntitySystem base.Initialize(); SubscribeLocalEvent(OnExamine); - SubscribeLocalEvent(OnInteract); + SubscribeLocalEvent(OnInteract); } - private void OnInteract(Entity ent, ref InteractionAttemptEvent args) + private void OnInteract(Entity ent, ref GettingInteractedWithAttemptEvent args) { if (ent.Comp is {Concealed: true, ExaminableWhileConcealed: false}) args.Cancel(); diff --git a/Resources/Locale/en-US/game-ticking/game-ticker.ftl b/Resources/Locale/en-US/game-ticking/game-ticker.ftl index 9527ecb57d..fbcf86a3a7 100644 --- a/Resources/Locale/en-US/game-ticking/game-ticker.ftl +++ b/Resources/Locale/en-US/game-ticking/game-ticker.ftl @@ -39,4 +39,4 @@ latejoin-arrivals-direction = A shuttle transferring you to your station will ar latejoin-arrivals-direction-time = A shuttle transferring you to your station will arrive in {$time}. preset-not-enough-ready-players = Can't start {$presetName}. Requires {$minimumPlayers} players but we have {$readyPlayersCount}. -preset-no-one-ready = Can't start {$presetName}. No players are ready. \ No newline at end of file +preset-no-one-ready = Can't start. No players are ready. diff --git a/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml b/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml index f670a69385..d63803c9e3 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml @@ -8,6 +8,7 @@ storedRotation: -90 - type: HolosignProjector - type: UseDelay + delay: 0.5 - type: ContainerContainer containers: cell_slot: !type:ContainerSlot diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml index 0630cb3cfd..792309268f 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml @@ -86,6 +86,7 @@ paper_label: !type:ContainerSlot - type: StaticPrice price: 50 + - type: ShootBlockerContainer - type: entity id: BodyBagFolded diff --git a/Resources/Prototypes/Objectives/objectiveGroups.yml b/Resources/Prototypes/Objectives/objectiveGroups.yml index 26d324fa0f..00340be276 100644 --- a/Resources/Prototypes/Objectives/objectiveGroups.yml +++ b/Resources/Prototypes/Objectives/objectiveGroups.yml @@ -13,7 +13,7 @@ CaptainIDStealObjective: 1 CMOHyposprayStealObjective: 1 #CMOCrewMonitorStealObjective: 1 - RDHardsuitStealObjective: 1 + #RDHardsuitStealObjective: 1 NukeDiskStealObjective: 1 MagbootsStealObjective: 1 CorgiMeatStealObjective: 1 @@ -137,7 +137,7 @@ weights: CaptainIDStealObjectiveCh: 1 CMOHyposprayStealObjectiveCh: 1 - RDHardsuitStealObjectiveCh: 1 + #RDHardsuitStealObjectiveCh: 1 NukeDiskStealObjectiveCh: 1 MagbootsStealObjectiveCh: 1 CorgiMeatStealObjectiveCh: 1 diff --git a/Resources/Prototypes/_White/Wizard/objective_groups.yml b/Resources/Prototypes/_White/Wizard/objective_groups.yml index d8cd746c7d..c292795c6a 100644 --- a/Resources/Prototypes/_White/Wizard/objective_groups.yml +++ b/Resources/Prototypes/_White/Wizard/objective_groups.yml @@ -9,7 +9,7 @@ weights: CaptainIDStealObjectiveWiz: 1 CMOHyposprayStealObjectiveWiz: 1 - RDHardsuitStealObjectiveWiz: 1 + #RDHardsuitStealObjectiveWiz: 1 NukeDiskStealObjectiveWiz: 1 MagbootsStealObjectiveWiz: 1 CorgiMeatStealObjectiveWiz: 1