Фиксы (#314)

* - 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.
This commit is contained in:
Aviu00
2024-05-30 12:12:24 +00:00
committed by GitHub
parent c0ad651f7c
commit 7f1825b713
6 changed files with 16 additions and 10 deletions

View File

@@ -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)

View File

@@ -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()
{

View File

@@ -1253,6 +1253,8 @@
tags:
- VimPilot
- DoorBumpOpener
- type: StandingState
canLieDown: true
- type: entity
name: monkey

View File

@@ -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

View File

@@ -19,6 +19,7 @@
soundEmpty: null
soundGunshot:
path: /Audio/White/Cult/wand_teleport.ogg
clumsyProof: true
- type: BasicEntityAmmoProvider
proto: BloodBolt
capacity: 25

View File

@@ -76,6 +76,9 @@
},
{
"name": "book-19"
},
{
"name": "book-20"
}
]
}