Fix airlocks being opened by anything that bumps into them.

- Adds DoorBumpOpener component.
This commit is contained in:
Vera Aguilera Puerto
2021-10-01 13:47:38 +02:00
parent e3139ef41b
commit 883cbf40b2
8 changed files with 29 additions and 5 deletions

View File

@@ -0,0 +1,10 @@
using Robust.Shared.GameObjects;
namespace Content.Server.Doors.Components
{
[RegisterComponent]
public class DoorBumpOpenerComponent : Component
{
public override string Name => "DoorBumpOpener";
}
}

View File

@@ -45,6 +45,11 @@ namespace Content.Server.Doors
private void HandleCollide(EntityUid uid, ServerDoorComponent component, StartCollideEvent args)
{
if (!args.OtherFixture.Body.Owner.HasComponent<DoorBumpOpenerComponent>())
{
return;
}
if (component.State != SharedDoorComponent.DoorState.Closed)
{
return;

View 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!

View File

@@ -41,7 +41,7 @@
damage:
types:
Blunt: 5
soundHit:
soundHit:
path: /Audio/Effects/hit_kick.ogg
- type: Hunger
damage:
@@ -209,10 +209,10 @@
CarbonDioxide: 0.00015190972
damage:
types:
Asphyxiation: 1
Asphyxiation: 1
damageRecovery:
types:
Asphyxiation: -1
Asphyxiation: -1
- type: Internals
- type: MobState
thresholds:
@@ -273,6 +273,7 @@
attributes:
proper: true
- type: StandingState
- type: DoorBumpOpener
- type: entity
save: false

View File

@@ -93,3 +93,4 @@
- type: Body
template: HumanoidTemplate
preset: SlimePreset
- type: DoorBumpOpener

View File

@@ -92,10 +92,10 @@
CarbonDioxide: 0.00015190972
damage:
types:
Asphyxiation: 1
Asphyxiation: 1
damageRecovery:
types:
Asphyxiation: -1
Asphyxiation: -1
# - type: Appearance
# visuals:
# - type: RotationVisualizer
@@ -114,3 +114,4 @@
categoriesFacialHair: VoxFacialHair
- type: Inventory
speciesId: vox
- type: DoorBumpOpener

View File

@@ -28,6 +28,7 @@
interfaces:
- key: enum.PDAUiKey.Key
type: PDABoundUserInterface
- type: DoorBumpOpener
- type: entity
parent: BasePDA

View File

@@ -14,6 +14,7 @@
HeldPrefix: default
- type: Access
- type: IdCard
- type: DoorBumpOpener
#IDs with layers