diff --git a/Content.Client/Construction/ConstructionPlacementHijack.cs b/Content.Client/Construction/ConstructionPlacementHijack.cs
index f601ba5927..e84f3949fe 100644
--- a/Content.Client/Construction/ConstructionPlacementHijack.cs
+++ b/Content.Client/Construction/ConstructionPlacementHijack.cs
@@ -8,15 +8,18 @@ using Robust.Shared.Map;
namespace Content.Client.Construction
{
- public class ConstructionPlacementHijack : PlacementHijack
+ public sealed class ConstructionPlacementHijack : PlacementHijack
{
private readonly ConstructionSystem _constructionSystem;
private readonly ConstructionPrototype _prototype;
+ public override bool CanRotate { get; }
+
public ConstructionPlacementHijack(ConstructionSystem constructionSystem, ConstructionPrototype prototype)
{
_constructionSystem = constructionSystem;
_prototype = prototype;
+ CanRotate = prototype.CanRotate;
}
///
diff --git a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs
index 60e9722ffb..96520441b8 100644
--- a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs
+++ b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs
@@ -448,7 +448,7 @@ namespace Content.Server.GameObjects.EntitySystems
}
structure.Transform.Coordinates = ev.Location;
- structure.Transform.LocalRotation = ev.Angle;
+ structure.Transform.LocalRotation = constructionPrototype.CanRotate ? ev.Angle : Angle.South;
RaiseNetworkEvent(new AckStructureConstructionMessage(ev.Ack));
diff --git a/Content.Shared/Construction/ConstructionPrototype.cs b/Content.Shared/Construction/ConstructionPrototype.cs
index 5ab7119169..17d88a7f9e 100644
--- a/Content.Shared/Construction/ConstructionPrototype.cs
+++ b/Content.Shared/Construction/ConstructionPrototype.cs
@@ -54,6 +54,11 @@ namespace Content.Shared.Construction
public string PlacementMode { get; private set; }
+ ///
+ /// Whether this construction can be constructed rotated or not.
+ ///
+ public bool CanRotate { get; private set; }
+
public IReadOnlyList Conditions => _conditions;
public void LoadFrom(YamlMappingNode mapping)
@@ -71,6 +76,7 @@ namespace Content.Shared.Construction
ser.DataField(this, x => x.PlacementMode, "placementMode", "PlaceFree");
ser.DataField(this, x => x.CanBuildInImpassable, "canBuildInImpassable", false);
ser.DataField(this, x => x.Category, "category", string.Empty);
+ ser.DataField(this, x => x.CanRotate, "canRotate", true);
ser.DataField(ref _conditions, "conditions", new List());
}
}
diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml
index c1c17bbeef..5cb4f76115 100644
--- a/Resources/Prototypes/Recipes/Construction/structures.yml
+++ b/Resources/Prototypes/Recipes/Construction/structures.yml
@@ -11,6 +11,7 @@
state: wall_girder
objectType: Structure
placementMode: SnapgridCenter
+ canRotate: false
- type: construction
name: wall
@@ -25,6 +26,7 @@
state: full
objectType: Structure
placementMode: SnapgridCenter
+ canRotate: false
- type: construction
name: reinforced wall
@@ -39,6 +41,7 @@
state: rgeneric
objectType: Structure
placementMode: SnapgridCenter
+ canRotate: false
- type: construction
name: low wall
@@ -55,6 +58,7 @@
state: metal
objectType: Structure
placementMode: SnapgridCenter
+ canRotate: false
- type: construction
name: window
@@ -71,6 +75,7 @@
state: full
objectType: Structure
placementMode: SnapgridCenter
+ canRotate: false
- type: construction
name: reinforced window
@@ -87,6 +92,7 @@
state: full
objectType: Structure
placementMode: SnapgridCenter
+ canRotate: false
- type: construction
name: phoron window
@@ -103,3 +109,4 @@
state: full
objectType: Structure
placementMode: SnapgridCenter
+ canRotate: false