Fix airlocks being opened by anything that bumps into them.
- Adds DoorBumpOpener component.
This commit is contained in:
10
Content.Server/Doors/Components/DoorBumpOpenerComponent.cs
Normal file
10
Content.Server/Doors/Components/DoorBumpOpenerComponent.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
|
||||||
|
namespace Content.Server.Doors.Components
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
public class DoorBumpOpenerComponent : Component
|
||||||
|
{
|
||||||
|
public override string Name => "DoorBumpOpener";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,6 +45,11 @@ namespace Content.Server.Doors
|
|||||||
|
|
||||||
private void HandleCollide(EntityUid uid, ServerDoorComponent component, StartCollideEvent args)
|
private void HandleCollide(EntityUid uid, ServerDoorComponent component, StartCollideEvent args)
|
||||||
{
|
{
|
||||||
|
if (!args.OtherFixture.Body.Owner.HasComponent<DoorBumpOpenerComponent>())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (component.State != SharedDoorComponent.DoorState.Closed)
|
if (component.State != SharedDoorComponent.DoorState.Closed)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
4
Resources/Changelog/Parts/airlock.yml
Normal file
4
Resources/Changelog/Parts/airlock.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
author: Zumorica
|
||||||
|
changes:
|
||||||
|
- type: Fix # One of the following: Add, Remove, Tweak, Fix
|
||||||
|
message: Fix airlocks being opened by bullets and any thrown items. They can still be opened by thrown IDs and PDAs though!
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Blunt: 5
|
Blunt: 5
|
||||||
soundHit:
|
soundHit:
|
||||||
path: /Audio/Effects/hit_kick.ogg
|
path: /Audio/Effects/hit_kick.ogg
|
||||||
- type: Hunger
|
- type: Hunger
|
||||||
damage:
|
damage:
|
||||||
@@ -209,10 +209,10 @@
|
|||||||
CarbonDioxide: 0.00015190972
|
CarbonDioxide: 0.00015190972
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Asphyxiation: 1
|
Asphyxiation: 1
|
||||||
damageRecovery:
|
damageRecovery:
|
||||||
types:
|
types:
|
||||||
Asphyxiation: -1
|
Asphyxiation: -1
|
||||||
- type: Internals
|
- type: Internals
|
||||||
- type: MobState
|
- type: MobState
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -273,6 +273,7 @@
|
|||||||
attributes:
|
attributes:
|
||||||
proper: true
|
proper: true
|
||||||
- type: StandingState
|
- type: StandingState
|
||||||
|
- type: DoorBumpOpener
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
save: false
|
save: false
|
||||||
|
|||||||
@@ -93,3 +93,4 @@
|
|||||||
- type: Body
|
- type: Body
|
||||||
template: HumanoidTemplate
|
template: HumanoidTemplate
|
||||||
preset: SlimePreset
|
preset: SlimePreset
|
||||||
|
- type: DoorBumpOpener
|
||||||
|
|||||||
@@ -92,10 +92,10 @@
|
|||||||
CarbonDioxide: 0.00015190972
|
CarbonDioxide: 0.00015190972
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Asphyxiation: 1
|
Asphyxiation: 1
|
||||||
damageRecovery:
|
damageRecovery:
|
||||||
types:
|
types:
|
||||||
Asphyxiation: -1
|
Asphyxiation: -1
|
||||||
# - type: Appearance
|
# - type: Appearance
|
||||||
# visuals:
|
# visuals:
|
||||||
# - type: RotationVisualizer
|
# - type: RotationVisualizer
|
||||||
@@ -114,3 +114,4 @@
|
|||||||
categoriesFacialHair: VoxFacialHair
|
categoriesFacialHair: VoxFacialHair
|
||||||
- type: Inventory
|
- type: Inventory
|
||||||
speciesId: vox
|
speciesId: vox
|
||||||
|
- type: DoorBumpOpener
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
interfaces:
|
interfaces:
|
||||||
- key: enum.PDAUiKey.Key
|
- key: enum.PDAUiKey.Key
|
||||||
type: PDABoundUserInterface
|
type: PDABoundUserInterface
|
||||||
|
- type: DoorBumpOpener
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: BasePDA
|
parent: BasePDA
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
HeldPrefix: default
|
HeldPrefix: default
|
||||||
- type: Access
|
- type: Access
|
||||||
- type: IdCard
|
- type: IdCard
|
||||||
|
- type: DoorBumpOpener
|
||||||
|
|
||||||
#IDs with layers
|
#IDs with layers
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user