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,7 +64,7 @@ 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);

View File

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

View File

@@ -1,6 +1,6 @@
- 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:
@@ -9,32 +9,83 @@
Brute: Brute:
path: path:
"/Audio/Effects/glass_hit.ogg" "/Audio/Effects/glass_hit.ogg"
- type: Door - type: InteractionOutline
occludes: false
- type: Occluder
enabled: false
- type: Sprite - type: Sprite
sprite: /Textures/White/Cult/Structures/cult_airlock.rsi 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 - type: Fixtures
fixtures: fixtures:
airlockFix: fix1:
shape: shape:
!type:PhysShapeAabb !type:PhysShapeAabb
bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close
density: 100 density: 100
mask: mask:
- FullTileMask - FullTileMask
layer: #removed opaque from the layer, allowing lasers to pass through glass airlocks layer:
- GlassAirlockLayer - GlassAirlockLayer
- type: LayerChangeOnWeld - type: Door
unWeldedLayer: GlassAirlockLayer occludes: false
weldedLayer: GlassLayer 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 - type: RadiationBlocker
resistance: 2 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: RunicDoor
- type: ApcPowerReceiver
needsPower: false
- type: Construction - type: Construction
graph: AirlockGlassCult graph: AirlockGlassCult
node: airlock 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