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!
|
||||
@@ -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
|
||||
|
||||
@@ -93,3 +93,4 @@
|
||||
- type: Body
|
||||
template: HumanoidTemplate
|
||||
preset: SlimePreset
|
||||
- type: DoorBumpOpener
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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