Фиксы (#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.Gravity;
using Content.Shared.Hands.Components; using Content.Shared.Hands.Components;
using Content.Shared.Input; using Content.Shared.Input;
using Content.Shared.Mobs.Systems;
using Content.Shared.Movement.Systems; using Content.Shared.Movement.Systems;
using Content.Shared.Physics; using Content.Shared.Physics;
using Content.Shared.Rotation; 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 SharedDoAfterSystem _doAfter = default!; // WD EDIT
[Dependency] private readonly MovementSpeedModifierSystem _movement = default!; // WD EDIT [Dependency] private readonly MovementSpeedModifierSystem _movement = default!; // WD EDIT
[Dependency] private readonly SharedStunSystem _stun = 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. // If StandingCollisionLayer value is ever changed to more than one layer, the logic needs to be edited.
private const int StandingCollisionLayer = (int)CollisionGroup.MidImpassable; private const int StandingCollisionLayer = (int)CollisionGroup.MidImpassable;
@@ -64,6 +66,11 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
return; return;
} }
if (!_mobState.IsAlive(uid))
{
return;
}
if (IsDown(uid)) if (IsDown(uid))
{ {
TryStandUp(uid); TryStandUp(uid);
@@ -123,13 +130,13 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
if (standingState.CurrentState is not StandingState.Lying) if (standingState.CurrentState is not StandingState.Lying)
return false; return false;
standingState.CurrentState = StandingState.GettingUp;
var doargs = new DoAfterArgs(EntityManager, uid, standingState.StandingUpTime, var doargs = new DoAfterArgs(EntityManager, uid, standingState.StandingUpTime,
new StandingUpDoAfterEvent(), uid) new StandingUpDoAfterEvent(), uid)
{ {
BreakOnMove = false, BreakOnMove = false,
BreakOnDamage = false, BreakOnDamage = false,
BreakOnHandChange = false BreakOnHandChange = false,
RequireCanInteract = false
}; };
if (!_doAfter.TryStartDoAfter(doargs)) 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) 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; return false;
if (standingState.CurrentState is not StandingState.Standing) if (standingState.CurrentState is not StandingState.Standing)

View File

@@ -11,7 +11,6 @@ namespace Content.Shared.Standing.Systems;
public abstract partial class SharedStandingStateSystem public abstract partial class SharedStandingStateSystem
{ {
[Dependency] protected readonly IRobustRandom Random = default!; [Dependency] protected readonly IRobustRandom Random = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
private void InitializeColliding() private void InitializeColliding()
{ {

View File

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

View File

@@ -782,8 +782,6 @@
damageModifierSet: StructuralMetallic damageModifierSet: StructuralMetallic
- type: Physics - type: Physics
bodyType: Static bodyType: Static
- type: Reflect
reflectProb: 1
- type: Pullable - type: Pullable
- type: Airtight - type: Airtight
noAirWhenFullyAirBlocked: false noAirWhenFullyAirBlocked: false
@@ -858,8 +856,6 @@
3: { state: shuttle_construct-3, visible: true} 3: { state: shuttle_construct-3, visible: true}
4: { state: shuttle_construct-4, visible: true} 4: { state: shuttle_construct-4, visible: true}
5: { state: shuttle_construct-5, visible: true} 5: { state: shuttle_construct-5, visible: true}
- type: Reflect
reflectProb: 1
- type: entity - type: entity
parent: WallSolid parent: WallSolid
@@ -877,8 +873,6 @@
- type: IconSmooth - type: IconSmooth
key: walls key: walls
base: state base: state
- type: Reflect
reflectProb: 1
- type: entity - type: entity
parent: BaseWall parent: BaseWall

View File

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

View File

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