diff --git a/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs b/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs index cec4a0b38c..0069a49971 100644 --- a/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs @@ -88,7 +88,7 @@ namespace Content.Server.GameObjects.Components.Atmos Owner.EntityManager.EventBus.SubscribeEvent(EventSource.Local, this, RotateEvent); if(_fixAirBlockedDirectionInitialize) - RotateEvent(new RotateEvent(Owner, Angle.Zero, Owner.Transform.LocalRotation)); + RotateEvent(new RotateEvent(Owner, Angle.South, Owner.Transform.LocalRotation)); UpdatePosition(); } diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index 5bf56df8a8..8d9cb7df08 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -84,6 +84,7 @@ namespace Content.Server.GameObjects.Components.Doors private bool _isWeldedShut; private bool _canWeldShut = true; + private bool _canCrush = true; public override void ExposeData(ObjectSerializer serializer) { @@ -91,6 +92,7 @@ namespace Content.Server.GameObjects.Components.Doors serializer.DataField(ref _occludes, "occludes", true); serializer.DataField(ref _isWeldedShut, "welded", false); + serializer.DataField(ref _canCrush, "canCrush", true); } public override void OnRemove() @@ -367,7 +369,7 @@ namespace Content.Server.GameObjects.Components.Doors { bool shouldCheckCrush = false; - if (Owner.TryGetComponent(out ICollidableComponent? collidable) && collidable.IsColliding(Vector2.Zero, false)) + if (_canCrush && Owner.TryGetComponent(out ICollidableComponent? collidable) && collidable.IsColliding(Vector2.Zero, false)) { if (Safety) return false; @@ -386,7 +388,7 @@ namespace Content.Server.GameObjects.Components.Doors Timer.Spawn(CloseTimeOne, async () => { - if (shouldCheckCrush) + if (shouldCheckCrush && _canCrush) { CheckCrush(); } diff --git a/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml b/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml index a4abf989ee..e7bf98f41c 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml @@ -74,3 +74,35 @@ sprite: Constructible/Structures/Doors/firelock_glass.rsi - type: Icon sprite: Constructible/Structures/Doors/firelock_glass.rsi + +- type: entity + id: FirelockEdge + parent: Firelock + name: firelock + prefix: south + components: + - type: Firelock + occludes: false + canCrush: false + - type: Occluder + enabled: false + - type: Sprite + sprite: Constructible/Structures/Doors/edge_door_hazard.rsi + - type: Icon + sprite: Constructible/Structures/Doors/edge_door_hazard.rsi + - type: Airtight + fixVacuum: true + airBlockedDirection: + - South + - type: Collidable + shapes: + - !type:PhysShapeAabb + bounds: "-0.49,-0.49,-0.2,0.49" # don't want this colliding with walls or they won't close + mask: + - MobImpassable + layer: + - Opaque + - Impassable + - MobImpassable + - VaultImpassable + - SmallImpassable diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/alert_cold.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/alert_cold.png new file mode 100644 index 0000000000..c18f592c9f Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/alert_cold.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/alert_hot.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/alert_hot.png new file mode 100644 index 0000000000..3a572356dc Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/alert_hot.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/bolted.png new file mode 100644 index 0000000000..0858c19f05 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/bolted.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closed.png new file mode 100644 index 0000000000..8968f68da9 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closed.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closed_unlit.png new file mode 100644 index 0000000000..0858c19f05 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closed_unlit.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closing.png new file mode 100644 index 0000000000..689f02afa2 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closing.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closing_unlit.png new file mode 100644 index 0000000000..92b5018fb9 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/closing_unlit.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/deny.png new file mode 100644 index 0000000000..8968f68da9 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/deny.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/deny_unlit.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/deny_unlit.png new file mode 100644 index 0000000000..0858c19f05 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/deny_unlit.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/door_spark.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/door_spark.png new file mode 100644 index 0000000000..59ff3aed71 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/door_spark.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/locked.png new file mode 100644 index 0000000000..8968f68da9 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/locked.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/meta.json new file mode 100644 index 0000000000..8ad6942753 --- /dev/null +++ b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/meta.json @@ -0,0 +1,430 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA 3.0", + "copyright": "Taken from https://github.com/vgstation-coders/vgstation13/ at 38b65a605df7ae2907d6bf0d4aebc5faa1bbc561", + "states": [ + { + "name": "alert_cold", + "directions": 4, + "delays": [ + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ] + ] + }, + { + "name": "alert_hot", + "directions": 4, + "delays": [ + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ] + ] + }, + { + "name": "bolted", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "closed", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "closed_unlit", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "closing", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "closing_unlit", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "deny", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "deny_unlit", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "locked", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "open", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "opening", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "opening_unlit", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "palert", + "directions": 4, + "delays": [ + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ], + [ + 0.5, + 0.5 + ] + ] + }, + { + "name": "panel_closing", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.07, + 0.07, + 0.07, + 0.07, + 0.27 + ] + ] + }, + { + "name": "panel_open", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "panel_opening", + "directions": 1, + "delays": [ + [ + 0.2, + 0.07, + 0.07, + 0.07, + 0.07, + 0.07, + 0.2 + ] + ] + }, + { + "name": "welded", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + }, + { + "name": "welded_open", + "directions": 4, + "delays": [ + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ], + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/open.png new file mode 100644 index 0000000000..3f0b3ef549 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/open.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/opening.png new file mode 100644 index 0000000000..7cf50771cd Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/opening.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/opening_unlit.png new file mode 100644 index 0000000000..92b5018fb9 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/opening_unlit.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/palert.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/palert.png new file mode 100644 index 0000000000..3d6343358e Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/palert.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_closing.png new file mode 100644 index 0000000000..ae69b8aded Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_closing.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_open.png new file mode 100644 index 0000000000..5f3bfeae15 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_open.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_opening.png new file mode 100644 index 0000000000..8271b80b11 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/panel_opening.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/welded.png new file mode 100644 index 0000000000..e6bd2ff64f Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/welded.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/welded_open.png b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/welded_open.png new file mode 100644 index 0000000000..f0d674692d Binary files /dev/null and b/Resources/Textures/Constructible/Structures/Doors/edge_door_hazard.rsi/welded_open.png differ