From 7f1825b71334cab838e443b16da4c44ebdebb40d Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Thu, 30 May 2024 12:12:24 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B=20(#314)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - fix: Fix surplus discount. * - fix: Fix clumsy bolt barrage. * - fix: Bookshelf fix error. * - fix: Fix lying. * - add: Monkeys can lie down. * Revert "- fix: Fix surplus discount." This reverts commit b89f9dc75fa7908198cfe054a7623d4effbe63d6. * - remove: No shuttle wall reflect. --- .../Standing/Systems/SharedStandingStateSystem.cs | 13 ++++++++++--- .../Systems/StandingStateSystem.Colliding.cs | 1 - Resources/Prototypes/Entities/Mobs/NPCs/animals.yml | 2 ++ .../Prototypes/Entities/Structures/Walls/walls.yml | 6 ------ .../_White/Entities/Cult/Items/blood_barrage.yml | 1 + .../Structures/Furniture/bookshelf.rsi/meta.json | 3 +++ 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs b/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs index d0384f7377..3ce16ff36e 100644 --- a/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs +++ b/Content.Shared/Standing/Systems/SharedStandingStateSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.DoAfter; using Content.Shared.Gravity; using Content.Shared.Hands.Components; using Content.Shared.Input; +using Content.Shared.Mobs.Systems; using Content.Shared.Movement.Systems; using Content.Shared.Physics; using Content.Shared.Rotation; @@ -24,6 +25,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem [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 // If StandingCollisionLayer value is ever changed to more than one layer, the logic needs to be edited. private const int StandingCollisionLayer = (int)CollisionGroup.MidImpassable; @@ -64,6 +66,11 @@ public abstract partial class SharedStandingStateSystem : EntitySystem return; } + if (!_mobState.IsAlive(uid)) + { + return; + } + if (IsDown(uid)) { TryStandUp(uid); @@ -123,13 +130,13 @@ public abstract partial class SharedStandingStateSystem : EntitySystem if (standingState.CurrentState is not StandingState.Lying) return false; - standingState.CurrentState = StandingState.GettingUp; var doargs = new DoAfterArgs(EntityManager, uid, standingState.StandingUpTime, new StandingUpDoAfterEvent(), uid) { BreakOnMove = false, BreakOnDamage = false, - BreakOnHandChange = false + BreakOnHandChange = false, + RequireCanInteract = false }; if (!_doAfter.TryStartDoAfter(doargs)) @@ -141,7 +148,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem public bool TryLieDown(EntityUid uid, StandingStateComponent? standingState = null, bool dropHeldItems = false) { - if (!Resolve(uid, ref standingState, false)) + if (!Resolve(uid, ref standingState, false) || !standingState.CanLieDown) return false; if (standingState.CurrentState is not StandingState.Standing) diff --git a/Content.Shared/Standing/Systems/StandingStateSystem.Colliding.cs b/Content.Shared/Standing/Systems/StandingStateSystem.Colliding.cs index af9c07f2bb..c70afa32a1 100644 --- a/Content.Shared/Standing/Systems/StandingStateSystem.Colliding.cs +++ b/Content.Shared/Standing/Systems/StandingStateSystem.Colliding.cs @@ -11,7 +11,6 @@ namespace Content.Shared.Standing.Systems; public abstract partial class SharedStandingStateSystem { [Dependency] protected readonly IRobustRandom Random = default!; - [Dependency] private readonly MobStateSystem _mobState = default!; private void InitializeColliding() { diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 8a64ecf232..a864ee8684 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -1253,6 +1253,8 @@ tags: - VimPilot - DoorBumpOpener + - type: StandingState + canLieDown: true - type: entity name: monkey diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 3974a70fdb..44ffa057aa 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -782,8 +782,6 @@ damageModifierSet: StructuralMetallic - type: Physics bodyType: Static - - type: Reflect - reflectProb: 1 - type: Pullable - type: Airtight noAirWhenFullyAirBlocked: false @@ -858,8 +856,6 @@ 3: { state: shuttle_construct-3, visible: true} 4: { state: shuttle_construct-4, visible: true} 5: { state: shuttle_construct-5, visible: true} - - type: Reflect - reflectProb: 1 - type: entity parent: WallSolid @@ -877,8 +873,6 @@ - type: IconSmooth key: walls base: state - - type: Reflect - reflectProb: 1 - type: entity parent: BaseWall diff --git a/Resources/Prototypes/_White/Entities/Cult/Items/blood_barrage.yml b/Resources/Prototypes/_White/Entities/Cult/Items/blood_barrage.yml index 2e0c5d4452..ef84377f52 100644 --- a/Resources/Prototypes/_White/Entities/Cult/Items/blood_barrage.yml +++ b/Resources/Prototypes/_White/Entities/Cult/Items/blood_barrage.yml @@ -19,6 +19,7 @@ soundEmpty: null soundGunshot: path: /Audio/White/Cult/wand_teleport.ogg + clumsyProof: true - type: BasicEntityAmmoProvider proto: BloodBolt capacity: 25 diff --git a/Resources/Textures/White/Structures/Furniture/bookshelf.rsi/meta.json b/Resources/Textures/White/Structures/Furniture/bookshelf.rsi/meta.json index 094d971fb0..51295ddec8 100644 --- a/Resources/Textures/White/Structures/Furniture/bookshelf.rsi/meta.json +++ b/Resources/Textures/White/Structures/Furniture/bookshelf.rsi/meta.json @@ -76,6 +76,9 @@ }, { "name": "book-19" + }, + { + "name": "book-20" } ] }