From 26cc329b2f8162e53843795a6f793081a6fb6e48 Mon Sep 17 00:00:00 2001 From: Aviu00 Date: Sun, 28 Jan 2024 11:06:48 +0300 Subject: [PATCH] Final? fixes --- .../White/Overlays/NightVisionSystem.cs | 6 ++++++ .../White/Overlays/SaturationScaleSystem.cs | 20 +++++++++++++------ .../_White/Cult/GameRule/CultRuleSystem.cs | 2 +- .../Runes/Systems/CultSystem.Constructs.cs | 8 +++++--- .../Cult/Runes/Systems/CultSystem.Rune.cs | 2 +- .../Systems/ClothingGrantingSystem.cs | 5 +++++ .../Prototypes/Entities/Mobs/Species/moth.yml | 3 +++ .../Weapons/Guns/Projectiles/magic.yml | 2 +- .../_White/Entities/Cult/constructs.yml | 16 ++++++++------- 9 files changed, 45 insertions(+), 19 deletions(-) diff --git a/Content.Client/White/Overlays/NightVisionSystem.cs b/Content.Client/White/Overlays/NightVisionSystem.cs index eea89161a5..8736e25a56 100644 --- a/Content.Client/White/Overlays/NightVisionSystem.cs +++ b/Content.Client/White/Overlays/NightVisionSystem.cs @@ -30,12 +30,18 @@ public sealed class NightVisionSystem : EntitySystem private void OnPlayerAttached(EntityUid uid, NightVisionComponent component, PlayerAttachedEvent args) { + if (_player.LocalSession != args.Player) + return; + _overlayMan.AddOverlay(_overlay); _lightManager.DrawLighting = false; } private void OnPlayerDetached(EntityUid uid, NightVisionComponent component, PlayerDetachedEvent args) { + if (_player.LocalSession != args.Player) + return; + _overlayMan.RemoveOverlay(_overlay); _lightManager.DrawLighting = true; } diff --git a/Content.Client/White/Overlays/SaturationScaleSystem.cs b/Content.Client/White/Overlays/SaturationScaleSystem.cs index 543ba53ff5..0f58aa37c3 100644 --- a/Content.Client/White/Overlays/SaturationScaleSystem.cs +++ b/Content.Client/White/Overlays/SaturationScaleSystem.cs @@ -37,25 +37,33 @@ public sealed class SaturationScaleSystem : EntitySystem private void OnPlayerDetached(EntityUid uid, SaturationScaleComponent component, PlayerDetachedEvent args) { + if (_player.LocalSession != args.Player) + return; + _overlayMan.RemoveOverlay(_overlay); } private void OnPlayerAttached(EntityUid uid, SaturationScaleComponent component, PlayerAttachedEvent args) { + if (_player.LocalSession != args.Player) + return; + _overlayMan.AddOverlay(_overlay); } private void OnShutdown(EntityUid uid, SaturationScaleComponent component, ComponentShutdown args) { - if (_player.LocalPlayer?.ControlledEntity == uid) - { - _overlayMan.RemoveOverlay(_overlay); - } + if (_player.LocalSession?.AttachedEntity != uid) + return; + + _overlayMan.RemoveOverlay(_overlay); } private void OnInit(EntityUid uid, SaturationScaleComponent component, ComponentInit args) { - if (_player.LocalPlayer?.ControlledEntity == uid) - _overlayMan.AddOverlay(_overlay); + if (_player.LocalSession?.AttachedEntity != uid) + return; + + _overlayMan.AddOverlay(_overlay); } } diff --git a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs index e2960ba212..eae5c29126 100644 --- a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs +++ b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs @@ -480,7 +480,7 @@ public sealed class CultRuleSystem : GameRuleSystem { rule.WinCondition = CultWinCondition.CultWin; } - + _roundEndSystem.EndRound(); var query = EntityQuery().ToList(); diff --git a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Constructs.cs b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Constructs.cs index a78cc819c7..a19781fb7b 100644 --- a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Constructs.cs +++ b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Constructs.cs @@ -26,9 +26,11 @@ public partial class CultSystem private void OnShellSelected(EntityUid uid, ConstructShellComponent component, ConstructFormSelectedEvent args) { - if (args.Session.AttachedEntity != null) + var ent = args.Session.AttachedEntity; + + if (ent != null) { - var construct = Spawn(args.SelectedForm, Transform(args.Session.AttachedEntity.Value).MapPosition); + var construct = Spawn(args.SelectedForm, Transform(ent.Value).MapPosition); var mind = Comp(args.Session.AttachedEntity!.Value); if(!mind.HasMind) @@ -37,7 +39,7 @@ public partial class CultSystem _mindSystem.TransferTo(mind.Mind.Value, construct); } - Del(args.Session.AttachedEntity); + Del(uid); } private void OnShellInit(EntityUid uid, ConstructShellComponent component, ComponentInit args) diff --git a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs index 9e399e51aa..0fdd24ae06 100644 --- a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs +++ b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs @@ -454,7 +454,7 @@ public sealed partial class CultSystem : EntitySystem if (cultists.Count < offering.SacrificeMinCount) { - _popupSystem.PopupEntity(Loc.GetString("cult-convert-not-enough-cultists"), user, user); + _popupSystem.PopupEntity(Loc.GetString("cult-sacrifice-not-enough-cultists"), user, user); return false; } diff --git a/Content.Shared/White/ClothingGrant/Systems/ClothingGrantingSystem.cs b/Content.Shared/White/ClothingGrant/Systems/ClothingGrantingSystem.cs index 7411c84fca..0378da3caf 100644 --- a/Content.Shared/White/ClothingGrant/Systems/ClothingGrantingSystem.cs +++ b/Content.Shared/White/ClothingGrant/Systems/ClothingGrantingSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Inventory.Events; using Robust.Shared.Serialization.Manager; using Content.Shared.Tag; using Content.Shared.White.ClothingGrant.Components; +using Robust.Shared.Timing; namespace Content.Shared.White.ClothingGrant.Systems; @@ -10,6 +11,7 @@ public sealed class ClothingGrantingSystem : EntitySystem { [Dependency] private readonly IComponentFactory _componentFactory = default!; [Dependency] private readonly ISerializationManager _serializationManager = default!; + [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly TagSystem _tagSystem = default!; public override void Initialize() @@ -23,6 +25,9 @@ public sealed class ClothingGrantingSystem : EntitySystem private void OnCompEquip(EntityUid uid, ClothingGrantComponentComponent component, GotEquippedEvent args) { + if (_timing.ApplyingState) + return; + if (!TryComp(uid, out var clothing)) return; if (!clothing.Slots.HasFlag(args.SlotFlags)) return; diff --git a/Resources/Prototypes/Entities/Mobs/Species/moth.yml b/Resources/Prototypes/Entities/Mobs/Species/moth.yml index 2d4f9b109f..38acd567dd 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/moth.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/moth.yml @@ -77,6 +77,8 @@ - map: [ "enum.HumanoidVisualLayers.LArm" ] - map: [ "enum.HumanoidVisualLayers.RLeg" ] - map: [ "enum.HumanoidVisualLayers.LLeg" ] + - map: [ "underwearb" ] #White + - map: [ "underweart" ] #White - shader: StencilClear sprite: Mobs/Species/Human/parts.rsi #PJB on stencil clear being on the left leg: "...this is 'fine'" -https://github.com/space-wizards/space-station-14/pull/12217#issuecomment-1291677115 # its fine, but its still very stupid that it has to be done like this instead of allowing sprites to just directly insert a stencil clear. @@ -92,6 +94,7 @@ - map: [ "enum.HumanoidVisualLayers.RHand" ] - map: [ "enum.HumanoidVisualLayers.LFoot" ] - map: [ "enum.HumanoidVisualLayers.RFoot" ] + - map: [ "socks" ] #White - map: [ "enum.HumanoidVisualLayers.Handcuffs" ] color: "#ffffff" sprite: Objects/Misc/handcuffs.rsi diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/magic.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/magic.yml index c7e2c968d6..75bf4e3db0 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/magic.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/magic.yml @@ -156,7 +156,7 @@ - type: entity id: ProjectileCult - parent: BaseBulletHighVelocity + parent: BaseBullet name: Blood description: FUCK. noSpawn: true diff --git a/Resources/Prototypes/_White/Entities/Cult/constructs.yml b/Resources/Prototypes/_White/Entities/Cult/constructs.yml index c06ef38716..18742e5717 100644 --- a/Resources/Prototypes/_White/Entities/Cult/constructs.yml +++ b/Resources/Prototypes/_White/Entities/Cult/constructs.yml @@ -54,6 +54,7 @@ - type: TypingIndicator proto: guardian - type: Pullable + - type: ContentEye - type: Actions - type: Tag tags: @@ -76,7 +77,7 @@ baseWalkSpeed: 2 baseSprintSpeed: 2 - type: Construct - actions: [JuggernautCreateWall] + actions: [InstantActionJuggernautCreateWall] - type: MeleeWeapon hidden: true angle: 30 @@ -102,11 +103,11 @@ - type: Construct actions: [ - ArtificerCreateSoulStone, - ArtificerCreateConstructShell, - ArtificerConvertCultistFloor, - ArtificerCreateCultistWall, - ArtificerCreateCultistAirlock, + InstantActionArtificerCreateSoulStone, + InstantActionArtificerCreateConstructShell, + InstantActionArtificerConvertCultistFloor, + InstantActionArtificerCreateCultistWall, + InstantActionArtificerCreateCultistAirlock, ] - type: Puller needsHands: false @@ -139,7 +140,7 @@ allowed: - Incorporeal - type: Construct - actions: [WraithPhase] + actions: [InstantActionWraithPhase] - type: MovementIgnoreGravity - type: MeleeWeapon hidden: true @@ -157,6 +158,7 @@ name: reaper description: run... components: + - type: MovementIgnoreGravity - type: MovementSpeedModifier baseWalkSpeed: 3.0 baseSprintSpeed: 3.0