Fix cult door

This commit is contained in:
Aviu00
2024-01-28 08:28:30 +03:00
parent 6781a6c350
commit 5cec339558
4 changed files with 102 additions and 42 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.Administration.Logs;
using Content.Server.Atmos.Components; using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems; using Content.Server.Atmos.EntitySystems;
using Content.Server.Power.EntitySystems; using Content.Server.Power.EntitySystems;
using Content.Server.White.Cult.Structures;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.Doors.Components; using Content.Shared.Doors.Components;
using Content.Shared.Doors.Systems; using Content.Shared.Doors.Systems;
@@ -156,7 +157,7 @@ public sealed class DoorSystem : SharedDoorSystem
{ {
if (TryComp<AirlockComponent>(uid, out var airlockComponent)) if (TryComp<AirlockComponent>(uid, out var airlockComponent))
{ {
if (_bolts.IsBolted(uid) || !this.IsPowered(uid, EntityManager)) if (_bolts.IsBolted(uid) || !this.IsPowered(uid, EntityManager) && !HasComp<RunicDoorComponent>(uid)) // WD EDIT
return; return;
if (door.State == DoorState.Closed) if (door.State == DoorState.Closed)

View File

@@ -64,11 +64,11 @@ public sealed class RunicDoorSystem : EntitySystem
return false; return false;
var direction = Transform(user).MapPosition.Position - Transform(airlock).MapPosition.Position; var direction = Transform(user).MapPosition.Position - Transform(airlock).MapPosition.Position;
var impulseVector = direction * 7000; var impulseVector = direction * 2000;
_physics.ApplyLinearImpulse(user, impulseVector); _physics.ApplyLinearImpulse(user, impulseVector);
_stunSystem.TryParalyze(user, TimeSpan.FromSeconds(3), true); _stunSystem.TryParalyze(user, TimeSpan.FromSeconds(3), true);
return false; return false;
} }
} }

View File

@@ -196,17 +196,25 @@
sprite: Structures/Walls/cult.rsi sprite: Structures/Walls/cult.rsi
- type: Destructible - type: Destructible
thresholds: thresholds:
- trigger:
!type:DamageTrigger
damage: 1200
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- trigger: - trigger:
!type:DamageTrigger !type:DamageTrigger
damage: 600 damage: 600
behaviors: behaviors:
- !type:SpawnEntitiesBehavior - !type:PlaySoundBehavior
spawn: sound:
CultGirder: path: /Audio/Effects/metalbreak.ogg
min: 1 - !type:ChangeConstructionNodeBehavior
max: 1 node: girder
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: ["Destruction"]
destroySound:
path: /Audio/Effects/metalbreak.ogg
- type: IconSmooth - type: IconSmooth
key: walls key: walls
base: cult base: cult

View File

@@ -1,40 +1,91 @@
- type: entity - type: entity
id: AirlockGlassCult id: AirlockGlassCult
parent: Airlock parent: BaseStructure
name: runic airlock name: runic airlock
description: Strange glass airlock with a rune. description: Strange glass airlock with a rune.
components: components:
- type: MeleeSound - type: MeleeSound
soundGroups: soundGroups:
Brute: Brute:
path: path:
"/Audio/Effects/glass_hit.ogg" "/Audio/Effects/glass_hit.ogg"
- type: Door - type: InteractionOutline
occludes: false - type: Sprite
- type: Occluder sprite: /Textures/White/Cult/Structures/cult_airlock.rsi
enabled: false layers:
- type: Sprite - state: closed
sprite: /Textures/White/Cult/Structures/cult_airlock.rsi map: ["enum.DoorVisualLayers.Base"]
- type: Fixtures - state: closed_unlit
fixtures: shader: unshaded
airlockFix: map: ["enum.DoorVisualLayers.BaseUnlit"]
shape: - state: welded
!type:PhysShapeAabb map: ["enum.WeldableLayers.BaseWelded"]
bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close visible: false
density: 100 - state: bolted_unlit
mask: shader: unshaded
- FullTileMask map: ["enum.DoorVisualLayers.BaseBolted"]
layer: #removed opaque from the layer, allowing lasers to pass through glass airlocks - state: emergency_unlit
- GlassAirlockLayer map: ["enum.DoorVisualLayers.BaseEmergencyAccess"]
- type: LayerChangeOnWeld shader: unshaded
unWeldedLayer: GlassAirlockLayer - state: panel_closed
weldedLayer: GlassLayer map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: RadiationBlocker visible: false
resistance: 2 - type: AnimationPlayer
- type: RunicDoor - type: Physics
- type: Construction - type: Fixtures
graph: AirlockGlassCult fixtures:
node: airlock 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 - type: entity
id: CultGirder id: CultGirder
@@ -79,7 +130,7 @@
behaviors: behaviors:
- !type:SpawnEntitiesBehavior - !type:SpawnEntitiesBehavior
spawn: spawn:
SheetSteel1: CultRunicMetal1:
min: 1 min: 1
max: 1 max: 1
- !type:DoActsBehavior - !type:DoActsBehavior