diff --git a/Content.Shared/Weather/IgnoreWeatherComponent.cs b/Content.Shared/Weather/BlockWeatherComponent.cs similarity index 51% rename from Content.Shared/Weather/IgnoreWeatherComponent.cs rename to Content.Shared/Weather/BlockWeatherComponent.cs index 8b8d004ee2..2ca8ba1aaa 100644 --- a/Content.Shared/Weather/IgnoreWeatherComponent.cs +++ b/Content.Shared/Weather/BlockWeatherComponent.cs @@ -3,10 +3,10 @@ using Robust.Shared.GameStates; namespace Content.Shared.Weather; /// -/// This entity will be ignored for considering weather on a tile +/// This entity will block the weather if it's anchored to the floor. /// [RegisterComponent, NetworkedComponent] -public sealed partial class IgnoreWeatherComponent : Component +public sealed partial class BlockWeatherComponent : Component { } diff --git a/Content.Shared/Weather/SharedWeatherSystem.cs b/Content.Shared/Weather/SharedWeatherSystem.cs index c907137d84..45a2afe7cd 100644 --- a/Content.Shared/Weather/SharedWeatherSystem.cs +++ b/Content.Shared/Weather/SharedWeatherSystem.cs @@ -19,13 +19,13 @@ public abstract class SharedWeatherSystem : EntitySystem [Dependency] private readonly MetaDataSystem _metadata = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - private EntityQuery _ignoreQuery; + private EntityQuery _blockQuery; private EntityQuery _physicsQuery; public override void Initialize() { base.Initialize(); - _ignoreQuery = GetEntityQuery(); + _blockQuery = GetEntityQuery(); _physicsQuery = GetEntityQuery(); SubscribeLocalEvent(OnWeatherUnpaused); } @@ -57,13 +57,8 @@ public abstract class SharedWeatherSystem : EntitySystem while (anchoredEnts.MoveNext(out var ent)) { - if (!_ignoreQuery.HasComponent(ent.Value) && - _physicsQuery.TryGetComponent(ent, out var body) && - body.Hard && - body.CanCollide) - { + if (_blockQuery.HasComponent(ent.Value)) return false; - } } return true; diff --git a/Resources/Prototypes/Entities/Objects/Decoration/flora.yml b/Resources/Prototypes/Entities/Objects/Decoration/flora.yml index a2dda827be..f35d222d39 100644 --- a/Resources/Prototypes/Entities/Objects/Decoration/flora.yml +++ b/Resources/Prototypes/Entities/Objects/Decoration/flora.yml @@ -38,7 +38,6 @@ description: Yep, it's a tree. abstract: true components: - - type: IgnoreWeather - type: SpriteFade - type: Clickable - type: Sprite diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml index a185d45353..5fca081998 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml @@ -147,6 +147,7 @@ - Airlock # This tag is used to nagivate the Airlock construction graph. It's needed because the construction graph is shared between Airlock, AirlockGlass, and HighSecDoor - type: PryUnpowered + - type: BlockWeather placement: mode: SnapgridCenter diff --git a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml index d3b8521a9b..4b6f72de93 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml @@ -56,6 +56,7 @@ key: walls mode: NoSprite - type: Occluder + - type: BlockWeather - type: entity parent: BaseMaterialDoor diff --git a/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml b/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml index 154467213a..2c54d3cd41 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml @@ -64,6 +64,7 @@ - type: ContainerContainer containers: battery-container: !type:Container + - type: BlockWeather - type: entity id: BaseSecretDoorAssembly diff --git a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml index 87fd8ef010..e38ba1fd66 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml @@ -97,6 +97,7 @@ messagePerceivedByOthers: comp-window-knock interactSuccessSound: path: /Audio/Effects/glass_knock.ogg + - type: BlockWeather - type: entity id: ShuttersNormal diff --git a/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml b/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml index 86f6719f77..792f076679 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml @@ -68,3 +68,4 @@ - type: Construction graph: Bookshelf node: bookshelf + - type: BlockWeather diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 3add206295..f06c0fc424 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -49,6 +49,7 @@ price: 75 - type: RadiationBlocker resistance: 2 + - type: BlockWeather - type: entity parent: BaseWall diff --git a/Resources/Prototypes/Entities/Structures/Windows/window.yml b/Resources/Prototypes/Entities/Structures/Windows/window.yml index 750a26bcf1..375d0c16ae 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/window.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/window.yml @@ -88,6 +88,7 @@ sprite: Structures/Windows/cracks.rsi - type: StaticPrice price: 100 + - type: BlockWeather - type: entity id: WindowDirectional