From d8291ed9c4f37d76b264a639142d1b82dde92c01 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 23 Feb 2020 17:30:45 +0100 Subject: [PATCH] Shadow & FOV stuff (#735) * Content fixes for shadow/occluder stuff. * Observers don't have FOV. * Update submodule --- .../GameObjects/Components/Doors/ServerDoorComponent.cs | 8 ++++++++ Resources/Prototypes/Entities/buildings/airlock_base.yml | 5 +++++ Resources/Prototypes/Entities/buildings/lighting.yml | 3 ++- Resources/Prototypes/Entities/mobs/observer.yml | 1 + RobustToolbox | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index 6a0ab1c569..e4b6202f45 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -136,6 +136,10 @@ namespace Content.Server.GameObjects State = DoorState.Opening; SetAppearance(DoorVisualState.Opening); + if (Owner.TryGetComponent(out OccluderComponent occluder)) + { + occluder.Enabled = false; + } Timer.Spawn(OpenTimeOne, async () => { @@ -190,6 +194,10 @@ namespace Content.Server.GameObjects { State = DoorState.Closed; SetAppearance(DoorVisualState.Closed); + if (Owner.TryGetComponent(out OccluderComponent occluder)) + { + occluder.Enabled = true; + } }, _cancellationTokenSource.Token); return true; } diff --git a/Resources/Prototypes/Entities/buildings/airlock_base.yml b/Resources/Prototypes/Entities/buildings/airlock_base.yml index 01a4770024..e7b361ec8a 100644 --- a/Resources/Prototypes/Entities/buildings/airlock_base.yml +++ b/Resources/Prototypes/Entities/buildings/airlock_base.yml @@ -43,5 +43,10 @@ interfaces: - key: enum.WiresUiKey.Key type: WiresBoundUserInterface + + - type: Occluder + - type: SnapGrid + offset: Center + placement: mode: SnapgridCenter diff --git a/Resources/Prototypes/Entities/buildings/lighting.yml b/Resources/Prototypes/Entities/buildings/lighting.yml index 866cfbee5a..5f2ab8bd04 100644 --- a/Resources/Prototypes/Entities/buildings/lighting.yml +++ b/Resources/Prototypes/Entities/buildings/lighting.yml @@ -17,7 +17,7 @@ - type: PointLight radius: 8 energy: 1.2 - #offset: "0, -16" + offset: "0.5, 0" color: "#DCDCC6" placement: @@ -67,6 +67,7 @@ - type: PointLight energy: 1.0 enabled: false + offset: "-0.5, 0" - type: PowerDevice priority: Low diff --git a/Resources/Prototypes/Entities/mobs/observer.yml b/Resources/Prototypes/Entities/mobs/observer.yml index 8064887837..81ea97f64f 100644 --- a/Resources/Prototypes/Entities/mobs/observer.yml +++ b/Resources/Prototypes/Entities/mobs/observer.yml @@ -8,6 +8,7 @@ mass: 5 - type: Eye zoom: 0.5, 0.5 + drawFov: false - type: Input context: "ghost" - type: Examiner diff --git a/RobustToolbox b/RobustToolbox index 5f4cd8f98a..32bafb66a8 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 5f4cd8f98a548b69872b1de66af82853782e6c69 +Subproject commit 32bafb66a8ebc815b43bffbc968c242560c3066b