From 5cec3395589d5e702edf9bfe57722751671a1468 Mon Sep 17 00:00:00 2001 From: Aviu00 Date: Sun, 28 Jan 2024 08:28:30 +0300 Subject: [PATCH] Fix cult door --- Content.Server/Doors/Systems/DoorSystem.cs | 3 +- .../_White/Cult/Structures/RunicDoorSystem.cs | 4 +- .../Entities/Structures/Walls/walls.yml | 20 ++- .../_White/Entities/Cult/other_structures.yml | 117 +++++++++++++----- 4 files changed, 102 insertions(+), 42 deletions(-) diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs index 560149f228..a6c665a28f 100644 --- a/Content.Server/Doors/Systems/DoorSystem.cs +++ b/Content.Server/Doors/Systems/DoorSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Administration.Logs; using Content.Server.Atmos.Components; using Content.Server.Atmos.EntitySystems; using Content.Server.Power.EntitySystems; +using Content.Server.White.Cult.Structures; using Content.Shared.Database; using Content.Shared.Doors.Components; using Content.Shared.Doors.Systems; @@ -156,7 +157,7 @@ public sealed class DoorSystem : SharedDoorSystem { if (TryComp(uid, out var airlockComponent)) { - if (_bolts.IsBolted(uid) || !this.IsPowered(uid, EntityManager)) + if (_bolts.IsBolted(uid) || !this.IsPowered(uid, EntityManager) && !HasComp(uid)) // WD EDIT return; if (door.State == DoorState.Closed) diff --git a/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs b/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs index 66ddb21e46..88d29f3a2b 100644 --- a/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs +++ b/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs @@ -64,11 +64,11 @@ public sealed class RunicDoorSystem : EntitySystem return false; var direction = Transform(user).MapPosition.Position - Transform(airlock).MapPosition.Position; - var impulseVector = direction * 7000; + var impulseVector = direction * 2000; _physics.ApplyLinearImpulse(user, impulseVector); _stunSystem.TryParalyze(user, TimeSpan.FromSeconds(3), true); return false; } -} \ No newline at end of file +} diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 45dd155635..02a59fde31 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -196,17 +196,25 @@ sprite: Structures/Walls/cult.rsi - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 1200 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] - trigger: !type:DamageTrigger damage: 600 behaviors: - - !type:SpawnEntitiesBehavior - spawn: - CultGirder: - min: 1 - max: 1 + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/metalbreak.ogg + - !type:ChangeConstructionNodeBehavior + node: girder - !type:DoActsBehavior - acts: [ "Destruction" ] + acts: ["Destruction"] + destroySound: + path: /Audio/Effects/metalbreak.ogg - type: IconSmooth key: walls base: cult diff --git a/Resources/Prototypes/_White/Entities/Cult/other_structures.yml b/Resources/Prototypes/_White/Entities/Cult/other_structures.yml index db8cdee528..753a9d39da 100644 --- a/Resources/Prototypes/_White/Entities/Cult/other_structures.yml +++ b/Resources/Prototypes/_White/Entities/Cult/other_structures.yml @@ -1,40 +1,91 @@ - type: entity id: AirlockGlassCult - parent: Airlock + parent: BaseStructure name: runic airlock description: Strange glass airlock with a rune. components: - - type: MeleeSound - soundGroups: - Brute: - path: - "/Audio/Effects/glass_hit.ogg" - - type: Door - occludes: false - - type: Occluder - enabled: false - - type: Sprite - sprite: /Textures/White/Cult/Structures/cult_airlock.rsi - - type: Fixtures - fixtures: - airlockFix: - shape: - !type:PhysShapeAabb - bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close - density: 100 - mask: - - FullTileMask - layer: #removed opaque from the layer, allowing lasers to pass through glass airlocks - - GlassAirlockLayer - - type: LayerChangeOnWeld - unWeldedLayer: GlassAirlockLayer - weldedLayer: GlassLayer - - type: RadiationBlocker - resistance: 2 - - type: RunicDoor - - type: Construction - graph: AirlockGlassCult - node: airlock + - type: MeleeSound + soundGroups: + Brute: + path: + "/Audio/Effects/glass_hit.ogg" + - type: InteractionOutline + - type: Sprite + sprite: /Textures/White/Cult/Structures/cult_airlock.rsi + layers: + - state: closed + map: ["enum.DoorVisualLayers.Base"] + - state: closed_unlit + shader: unshaded + map: ["enum.DoorVisualLayers.BaseUnlit"] + - state: welded + map: ["enum.WeldableLayers.BaseWelded"] + visible: false + - state: bolted_unlit + shader: unshaded + map: ["enum.DoorVisualLayers.BaseBolted"] + - state: emergency_unlit + map: ["enum.DoorVisualLayers.BaseEmergencyAccess"] + shader: unshaded + - state: panel_closed + map: ["enum.WiresVisualLayers.MaintenancePanel"] + visible: false + - type: AnimationPlayer + - type: Physics + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close + density: 100 + mask: + - FullTileMask + layer: + - GlassAirlockLayer + - type: Door + occludes: false + crushDamage: + types: + Blunt: 15 + openSound: + path: /Audio/Machines/airlock_open.ogg + closeSound: + path: /Audio/Machines/airlock_close.ogg + denySound: + path: /Audio/Machines/airlock_deny.ogg + - type: Airlock + openUnlitVisible: true + - type: DoorBolt + - type: Appearance + - type: Airtight + fixVacuum: true + noAirWhenFullyAirBlocked: false + - type: RadiationBlocker + resistance: 2 + - type: Occluder + enabled: false + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 500 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - type: RunicDoor + - type: ApcPowerReceiver + needsPower: false + - type: Construction + graph: AirlockGlassCult + node: airlock + - type: PlacementReplacement + key: walls + placement: + mode: SnapgridCenter - type: entity id: CultGirder @@ -79,7 +130,7 @@ behaviors: - !type:SpawnEntitiesBehavior spawn: - SheetSteel1: + CultRunicMetal1: min: 1 max: 1 - !type:DoActsBehavior