fixrotations fixes rotations properly again (#5292)
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
using Content.Server.Administration;
|
using Content.Server.Administration;
|
||||||
using Content.Server.Window;
|
using Content.Server.Window;
|
||||||
|
using Content.Server.Power.Components;
|
||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Content.Shared.Construction;
|
using Content.Shared.Construction;
|
||||||
|
using Content.Shared.Tag;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -74,9 +76,20 @@ namespace Content.Server.Construction.Commands
|
|||||||
|
|
||||||
var valid = false;
|
var valid = false;
|
||||||
|
|
||||||
valid |= childEntity.HasComponent<OccluderComponent>();
|
// Occluders should only count if the state of it right now is enabled.
|
||||||
|
// This prevents issues with edge firelocks.
|
||||||
|
if (entityManager.TryGetComponent<OccluderComponent>(childUid, out var occluder))
|
||||||
|
{
|
||||||
|
valid |= occluder.Enabled;
|
||||||
|
}
|
||||||
|
// low walls & grilles
|
||||||
valid |= childEntity.HasComponent<SharedCanBuildWindowOnTopComponent>();
|
valid |= childEntity.HasComponent<SharedCanBuildWindowOnTopComponent>();
|
||||||
valid |= childEntity.HasComponent<WindowComponent>();
|
// cables
|
||||||
|
valid |= childEntity.HasComponent<CableComponent>();
|
||||||
|
// anything else that might need this forced
|
||||||
|
valid |= childEntity.HasTag("ForceFixRotations");
|
||||||
|
// override
|
||||||
|
valid &= !childEntity.HasTag("ForceNoFixRotations");
|
||||||
|
|
||||||
if (!valid)
|
if (!valid)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- RCDDeconstructWhitelist
|
- RCDDeconstructWhitelist
|
||||||
|
- ForceFixRotations
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
netsync: false
|
netsync: false
|
||||||
drawdepth: WallTops
|
drawdepth: WallTops
|
||||||
@@ -76,6 +77,8 @@
|
|||||||
snap:
|
snap:
|
||||||
- Window
|
- Window
|
||||||
components:
|
components:
|
||||||
|
# Attention! If adding tags here:
|
||||||
|
# Keep WindowTintedDirectional in mind
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
netsync: false
|
netsync: false
|
||||||
drawdepth: WallTops
|
drawdepth: WallTops
|
||||||
@@ -141,6 +144,9 @@
|
|||||||
drawdepth: WallTops
|
drawdepth: WallTops
|
||||||
sprite: Structures/Windows/directional.rsi
|
sprite: Structures/Windows/directional.rsi
|
||||||
state: tinted_window
|
state: tinted_window
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- ForceNoFixRotations
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Structures/Windows/directional.rsi
|
sprite: Structures/Windows/directional.rsi
|
||||||
state: tinted_window
|
state: tinted_window
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Alphabetical order is now apparently required.
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Baguette
|
id: Baguette
|
||||||
|
|
||||||
@@ -88,6 +90,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: Egg
|
id: Egg
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: EmitterBolt
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: ExplosivePassable
|
id: ExplosivePassable
|
||||||
|
|
||||||
@@ -106,6 +111,12 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: FootstepSound
|
id: FootstepSound
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: ForceFixRotations # fixrotations command WILL target this
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: ForceNoFixRotations # fixrotations command WON'T target this
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Gauze
|
id: Gauze
|
||||||
|
|
||||||
@@ -115,6 +126,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: Handcuffs
|
id: Handcuffs
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: HideContextMenu
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Hoe
|
id: Hoe
|
||||||
|
|
||||||
@@ -142,6 +156,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: NoSpinOnThrow
|
id: NoSpinOnThrow
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: NukeDisk
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Ointment
|
id: Ointment
|
||||||
|
|
||||||
@@ -169,6 +186,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: Powerdrill
|
id: Powerdrill
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: RCDDeconstructWhitelist
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: RodMetal1
|
id: RodMetal1
|
||||||
|
|
||||||
@@ -205,23 +225,12 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: Wirecutter
|
id: Wirecutter
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: Wooden # just like our atmos
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Wrench
|
id: Wrench
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Write
|
id: Write
|
||||||
|
|
||||||
- type: Tag
|
|
||||||
id: RCDDeconstructWhitelist
|
|
||||||
|
|
||||||
- type: Tag
|
|
||||||
id: Wooden # just like our atmos
|
|
||||||
|
|
||||||
- type: Tag
|
|
||||||
id: EmitterBolt
|
|
||||||
|
|
||||||
- type: Tag
|
|
||||||
id: HideContextMenu
|
|
||||||
|
|
||||||
- type: Tag
|
|
||||||
id: NukeDisk
|
|
||||||
|
|||||||
Reference in New Issue
Block a user