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)
|
||||
{
|
||||
if (!args.OtherFixture.Body.Owner.HasComponent<DoorBumpOpenerComponent>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.State != SharedDoorComponent.DoorState.Closed)
|
||||
{
|
||||
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!
|
||||
@@ -273,6 +273,7 @@
|
||||
attributes:
|
||||
proper: true
|
||||
- type: StandingState
|
||||
- type: DoorBumpOpener
|
||||
|
||||
- type: entity
|
||||
save: false
|
||||
|
||||
@@ -93,3 +93,4 @@
|
||||
- type: Body
|
||||
template: HumanoidTemplate
|
||||
preset: SlimePreset
|
||||
- type: DoorBumpOpener
|
||||
|
||||
@@ -114,3 +114,4 @@
|
||||
categoriesFacialHair: VoxFacialHair
|
||||
- type: Inventory
|
||||
speciesId: vox
|
||||
- type: DoorBumpOpener
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
interfaces:
|
||||
- key: enum.PDAUiKey.Key
|
||||
type: PDABoundUserInterface
|
||||
- type: DoorBumpOpener
|
||||
|
||||
- type: entity
|
||||
parent: BasePDA
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
HeldPrefix: default
|
||||
- type: Access
|
||||
- type: IdCard
|
||||
- type: DoorBumpOpener
|
||||
|
||||
#IDs with layers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user