diff --git a/Content.Client/Decals/DecalOverlay.cs b/Content.Client/Decals/DecalOverlay.cs index d786885e5c..43f441d8ae 100644 --- a/Content.Client/Decals/DecalOverlay.cs +++ b/Content.Client/Decals/DecalOverlay.cs @@ -11,7 +11,6 @@ namespace Content.Client.Decals public sealed class DecalOverlay : Overlay { private readonly DecalSystem _decals; - private readonly SharedTransformSystem _transform; private readonly SpriteSystem _sprites; private readonly IEntityManager _entManager; private readonly IPrototypeManager _prototypeManager; @@ -22,13 +21,11 @@ namespace Content.Client.Decals public DecalOverlay( DecalSystem decals, - SharedTransformSystem transforms, SpriteSystem sprites, IEntityManager entManager, IPrototypeManager prototypeManager) { _decals = decals; - _transform = transforms; _sprites = sprites; _entManager = entManager; _prototypeManager = prototypeManager; @@ -39,10 +36,12 @@ namespace Content.Client.Decals // Shouldn't need to clear cached textures unless the prototypes get reloaded. var handle = args.WorldHandle; var xformQuery = _entManager.GetEntityQuery(); + var eyeAngle = args.Viewport.Eye?.Rotation ?? Angle.Zero; foreach (var (gridId, zIndexDictionary) in _decals.DecalRenderIndex) { - if (zIndexDictionary.Count == 0) continue; + if (zIndexDictionary.Count == 0) + continue; if (!xformQuery.TryGetComponent(gridId, out var xform)) { @@ -53,7 +52,9 @@ namespace Content.Client.Decals if (xform.MapID != args.MapId) continue; - handle.SetTransform(_transform.GetWorldMatrix(xform, xformQuery)); + var (_, worldRot, worldMatrix) = xform.GetWorldPositionRotationMatrix(xformQuery); + + handle.SetTransform(worldMatrix); foreach (var (_, decals) in zIndexDictionary) { @@ -66,10 +67,23 @@ namespace Content.Client.Decals _cachedTextures[decal.Id] = texture; } - if (decal.Angle.Equals(Angle.Zero)) + if (!_prototypeManager.TryIndex(decal.Id, out var decalProto)) + continue; + + var cardinal = Angle.Zero; + + if (decalProto.SnapCardinals) + { + var worldAngle = eyeAngle + worldRot; + cardinal = worldAngle.GetCardinalDir().ToAngle(); + } + + var angle = decal.Angle - cardinal; + + if (angle.Equals(Angle.Zero)) handle.DrawTexture(texture, decal.Coordinates, decal.Color); else - handle.DrawTexture(texture, decal.Coordinates, decal.Angle, decal.Color); + handle.DrawTexture(texture, decal.Coordinates, angle, decal.Color); } } } @@ -81,11 +95,9 @@ namespace Content.Client.Decals { if (_prototypeManager.TryIndex(id, out var proto)) return proto.Sprite; - else - { - Logger.Error($"Unknown decal prototype: {id}"); - return new SpriteSpecifier.Texture(new ResourcePath("/Textures/noSprite.png")); - } + + Logger.Error($"Unknown decal prototype: {id}"); + return new SpriteSpecifier.Texture(new ResourcePath("/Textures/noSprite.png")); } } } diff --git a/Content.Client/Decals/DecalSystem.cs b/Content.Client/Decals/DecalSystem.cs index 47d5399761..72ffd12179 100644 --- a/Content.Client/Decals/DecalSystem.cs +++ b/Content.Client/Decals/DecalSystem.cs @@ -8,18 +8,17 @@ namespace Content.Client.Decals public sealed class DecalSystem : SharedDecalSystem { [Dependency] private readonly IOverlayManager _overlayManager = default!; - [Dependency] private readonly SharedTransformSystem _transforms = default!; [Dependency] private readonly SpriteSystem _sprites = default!; private DecalOverlay _overlay = default!; - public Dictionary>> DecalRenderIndex = new(); - private Dictionary> _decalZIndexIndex = new(); + public readonly Dictionary>> DecalRenderIndex = new(); + private readonly Dictionary> _decalZIndexIndex = new(); public override void Initialize() { base.Initialize(); - _overlay = new DecalOverlay(this, _transforms, _sprites, EntityManager, PrototypeManager); + _overlay = new DecalOverlay(this, _sprites, EntityManager, PrototypeManager); _overlayManager.AddOverlay(_overlay); SubscribeNetworkEvent(OnChunkUpdate); @@ -108,7 +107,7 @@ namespace Content.Client.Decals chunkCollection[indices] = newChunkData; foreach (var (uid, decal) in newChunkData) - { + { if (zIndexIndex.TryGetValue(uid, out var zIndex)) renderIndex[zIndex].Remove(uid); diff --git a/Content.Server/Movement/LockEyesCommand.cs b/Content.Server/Movement/LockEyesCommand.cs new file mode 100644 index 0000000000..fd9854041e --- /dev/null +++ b/Content.Server/Movement/LockEyesCommand.cs @@ -0,0 +1,31 @@ +using Content.Server.Administration; +using Content.Shared.Administration; +using Content.Shared.Movement.Systems; +using Robust.Shared.Console; + +namespace Content.Server.Movement; + +[AdminCommand(AdminFlags.Fun)] +public sealed class LockEyesCommand : IConsoleCommand +{ + public string Command => $"lockeyes"; + public string Description => Loc.GetString("lockeyes-command-description"); + public string Help => Loc.GetString("lockeyes-command-help"); + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + if (args.Length != 1) + { + shell.WriteError(Loc.GetString("shell-wrong-arguments-number")); + return; + } + + if (!bool.TryParse(args[0], out var value)) + { + shell.WriteError(Loc.GetString("parse-bool-fail", ("args", args[0]))); + return; + } + + var system = IoCManager.Resolve().GetEntitySystem(); + system.CameraRotationLocked = value; + } +} diff --git a/Content.Server/Movement/RotateEyesCommand.cs b/Content.Server/Movement/RotateEyesCommand.cs new file mode 100644 index 0000000000..6395b93cab --- /dev/null +++ b/Content.Server/Movement/RotateEyesCommand.cs @@ -0,0 +1,44 @@ +using Content.Server.Administration; +using Content.Shared.Administration; +using Content.Shared.Movement.Components; +using Robust.Shared.Console; + +namespace Content.Server.Movement; + +[AdminCommand(AdminFlags.Fun)] +public sealed class RotateEyesCommand : IConsoleCommand +{ + public string Command => "rotateeyes"; + public string Description => Loc.GetString("rotateeyes-command-description"); + public string Help => Loc.GetString("rotateeyes-command-help"); + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + var entManager = IoCManager.Resolve(); + var rotation = Angle.Zero; + + if (args.Length == 1) + { + if (!float.TryParse(args[0], out var degrees)) + { + shell.WriteError(Loc.GetString("parse-float-fail", ("arg", args[0]))); + return; + } + + rotation = Angle.FromDegrees(degrees); + } + + var count = 0; + + foreach (var mover in entManager.EntityQuery(true)) + { + if (mover.TargetRelativeRotation.Equals(rotation)) + continue; + + mover.TargetRelativeRotation = rotation; + entManager.Dirty(mover); + count++; + } + + shell.WriteLine(Loc.GetString("rotateeyes-command-count", ("count", count))); + } +} diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 1b866afb3c..92fe38ee89 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -916,7 +916,7 @@ namespace Content.Shared.CCVar /// - When traversing grids it will snap to the nearest cardinal which will generally be imperceptible. /// public static readonly CVarDef CameraRotationLocked = - CVarDef.Create("shuttle.camera_rotation_locked", true, CVar.REPLICATED); + CVarDef.Create("shuttle.camera_rotation_locked", false, CVar.REPLICATED); /// /// Whether cargo shuttles are enabled. diff --git a/Content.Shared/Decals/DecalPrototype.cs b/Content.Shared/Decals/DecalPrototype.cs index 2de7468922..20f21aa512 100644 --- a/Content.Shared/Decals/DecalPrototype.cs +++ b/Content.Shared/Decals/DecalPrototype.cs @@ -10,5 +10,10 @@ namespace Content.Shared.Decals [DataField("sprite")] public SpriteSpecifier Sprite { get; } = SpriteSpecifier.Invalid; [DataField("tags")] public List Tags = new(); [DataField("showMenu")] public bool ShowMenu = true; + + /// + /// If the decal is rotated compared to our eye should we snap it to south. + /// + [DataField("snapCardinals")] public bool SnapCardinals = false; } } diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index 07edf947ef..e518a67506 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -10,6 +10,7 @@ using Content.Shared.Input; using Content.Shared.Interaction.Components; using Content.Shared.Interaction.Events; using Content.Shared.Item; +using Content.Shared.Movement.Components; using Content.Shared.Physics; using Content.Shared.Popups; using Content.Shared.Throwing; @@ -797,7 +798,16 @@ namespace Content.Shared.Interaction RaiseLocalEvent(item, dropMsg, true); if (dropMsg.Handled) _adminLogger.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}"); - Transform(item).LocalRotation = Angle.Zero; + + // If the dropper is rotated then use their targetrelativerotation as the drop rotation + var rotation = Angle.Zero; + + if (TryComp(user, out var mover)) + { + rotation = mover.TargetRelativeRotation; + } + + Transform(item).LocalRotation = rotation; } #endregion diff --git a/Content.Shared/Movement/Systems/SharedMoverController.Input.cs b/Content.Shared/Movement/Systems/SharedMoverController.Input.cs index 181c0fa5bb..8ebd0d6d04 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.Input.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.Input.cs @@ -17,7 +17,7 @@ namespace Content.Shared.Movement.Systems /// public abstract partial class SharedMoverController { - public bool CameraRotationLocked { get; private set; } + public bool CameraRotationLocked { get; set; } private void InitializeInput() { diff --git a/Content.Shared/Movement/Systems/SharedMoverController.cs b/Content.Shared/Movement/Systems/SharedMoverController.cs index f99b19a780..22022f7fee 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.cs @@ -202,7 +202,7 @@ namespace Content.Shared.Movement.Systems var angleDiff = Angle.ShortestDistance(mover.RelativeRotation, mover.TargetRelativeRotation); // if we've just traversed then lerp to our target rotation. - if (!angleDiff.EqualsApprox(Angle.Zero, 0.005)) + if (!angleDiff.EqualsApprox(Angle.Zero, 0.001)) { var adjustment = angleDiff * 5f * frameTime; var minAdjustment = 0.005 * frameTime; diff --git a/Resources/Locale/en-US/movement/eye.ftl b/Resources/Locale/en-US/movement/eye.ftl new file mode 100644 index 0000000000..fd3f1117b6 --- /dev/null +++ b/Resources/Locale/en-US/movement/eye.ftl @@ -0,0 +1,10 @@ +parse-bool-fail = Unable to parse {$arg} as a bool +parse-float-fail = Unable to parse {$arg} as a float + +lockeyes-command-description = Prevents eyes from being rotated any further +lockeyes-command-help = lockeyes + +rotateeyes-command-description = Rotates every player's current eye to the specified rotation +rotateeyes-command-help = rotateeyes +rotateeyes-command-count = Set {$count} eye rotations + diff --git a/Resources/Prototypes/Entities/Objects/Devices/nuke.yml b/Resources/Prototypes/Entities/Objects/Devices/nuke.yml index 4be867b7be..586f3d3ec0 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/nuke.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/nuke.yml @@ -9,6 +9,7 @@ - type: Sprite sprite: Objects/Devices/nuke.rsi netsync: false + noRot: true state: nuclearbomb_base - type: Physics bodyType: Dynamic diff --git a/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml b/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml index 3060df4e29..9edc1aeb31 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/bedsheets.yml @@ -12,6 +12,7 @@ - type: Sprite sprite: Objects/Misc/bedsheets.rsi netsync: false + noRot: true - type: Item size: 10 - type: Clothing diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml index 39a6eef8b1..ef85bca9d1 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml @@ -30,6 +30,7 @@ - type: Clickable - type: Sprite sprite: Objects/Specific/Janitorial/janitorial.rsi + noRot: true layers: - state: mopbucket - state: mopbucket_water-1 diff --git a/Resources/Prototypes/Entities/Structures/Decoration/banners.yml b/Resources/Prototypes/Entities/Structures/Decoration/banners.yml index d0346c8445..6d22cfbd91 100644 --- a/Resources/Prototypes/Entities/Structures/Decoration/banners.yml +++ b/Resources/Prototypes/Entities/Structures/Decoration/banners.yml @@ -9,6 +9,7 @@ sprite: Structures/Decoration/banner.rsi state: banner netsync: false + noRot: true - type: Transform noRot: true - type: Fixtures diff --git a/Resources/Prototypes/Entities/Structures/Decoration/curtains.yml b/Resources/Prototypes/Entities/Structures/Decoration/curtains.yml index 976061d6d0..f24eeba118 100644 --- a/Resources/Prototypes/Entities/Structures/Decoration/curtains.yml +++ b/Resources/Prototypes/Entities/Structures/Decoration/curtains.yml @@ -7,6 +7,7 @@ - type: Occluder - type: Sprite netsync: false + snapCardinals: true sprite: Structures/Decoration/curtains.rsi layers: - state: closed diff --git a/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml b/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml index 9596a58ead..8cef071ec2 100644 --- a/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml +++ b/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml @@ -7,6 +7,8 @@ - type: Sprite sprite: Structures/dispensers.rsi state: industrial-working + netsync: false + snapCardinals: true - type: ReagentDispenser pack: ChemDispenserStandardInventory emagPack: ChemDispenserEmaggedInventory diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml index 7ac55d69a6..b35a58bd21 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml @@ -13,6 +13,7 @@ - type: Sprite netsync: false sprite: Structures/Doors/Airlocks/Standard/basic.rsi + snapCardinals: true layers: - state: closed map: ["enum.DoorVisualLayers.Base"] diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/shuttle.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/shuttle.yml index 7b1bda79bc..65db4363e3 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/shuttle.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/shuttle.yml @@ -64,6 +64,7 @@ - type: Sprite netsync: false sprite: Structures/Doors/Airlocks/Glass/shuttle.rsi + snapCardinals: false layers: - state: closed map: ["enum.DoorVisualLayers.Base"] @@ -85,4 +86,4 @@ - type: PaintableAirlock group: ShuttleGlass - type: Door - occludes: false \ No newline at end of file + occludes: false diff --git a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml index 3ddafe00bc..9785f1387a 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml @@ -28,6 +28,7 @@ - type: Sprite netsync: false sprite: Structures/Doors/Airlocks/Standard/firelock.rsi + snapCardinals: true layers: - state: closed map: ["enum.DoorVisualLayers.Base"] @@ -128,6 +129,7 @@ components: - type: Sprite sprite: Structures/Doors/edge_door_hazard.rsi + snapCardinals: false - type: Airtight fixVacuum: true airBlocked: false diff --git a/Resources/Prototypes/Entities/Structures/Furniture/altar.yml b/Resources/Prototypes/Entities/Structures/Furniture/altar.yml index 81f396141f..8d0cbd0d3a 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/altar.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/altar.yml @@ -24,6 +24,7 @@ - TableLayer - type: Sprite netsync: false + snapCardinals: true - type: Climbable - type: Clickable diff --git a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml index cee6de01c9..ecd91397c0 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml @@ -25,6 +25,7 @@ sprite: Structures/Furniture/furniture.rsi state: bed netsync: false + noRot: true - type: Strap position: Down rotation: -90 diff --git a/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml b/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml index 15dc71d097..461e1b5bda 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml @@ -6,6 +6,8 @@ components: - type: Sprite sprite: Structures/Furniture/bookshelf.rsi + snapCardinals: true + netsync: false layers: - state: base - state: book-0 diff --git a/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml b/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml index 86efb68868..74199f7b69 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml @@ -22,6 +22,7 @@ drawdepth: Overdoors offset: "0.0,0.3" sprite: Structures/Furniture/potted_plants.rsi + noRot: true - type: PottedPlantHide - type: SecretStash secretPartName: the plant @@ -263,4 +264,4 @@ parent: PottedPlant26 components: - type: Sprite - state: plant-29 \ No newline at end of file + state: plant-29 diff --git a/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml b/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml index a35585fddd..9a2d72133b 100644 --- a/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml @@ -49,6 +49,7 @@ node: tubeLight - type: Sprite sprite: Structures/Lighting/LightPosts/small_light_post.rsi + snapCardinals: true layers: - state: on map: ["enum.PoweredLightLayers.Base"] diff --git a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml index 08509f13bd..8facf9e58c 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/chem_master.yml @@ -9,6 +9,7 @@ - type: Sprite sprite: Structures/Machines/mixer.rsi netsync: false + snapCardinals: true layers: - state: mixer_empty - state: mixer_screens diff --git a/Resources/Prototypes/Entities/Structures/Machines/cloning_machine.yml b/Resources/Prototypes/Entities/Structures/Machines/cloning_machine.yml index 7784117f29..69bd8d8848 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/cloning_machine.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/cloning_machine.yml @@ -11,6 +11,7 @@ - type: Sprite netsync: false sprite: Structures/Machines/cloning.rsi + snapCardinals: true layers: - state: pod_0 - type: Physics diff --git a/Resources/Prototypes/Entities/Structures/Machines/gravity_generator.yml b/Resources/Prototypes/Entities/Structures/Machines/gravity_generator.yml index 0df364159b..44626fd10b 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/gravity_generator.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/gravity_generator.yml @@ -14,6 +14,7 @@ - type: Sprite netsync: false sprite: Structures/Machines/gravity_generator.rsi + snapCardinals: true layers: - state: on map: ["enum.GravityGeneratorVisualLayers.Base"] @@ -80,6 +81,7 @@ - type: Sprite netsync: false sprite: Structures/Machines/gravity_generator_mini.rsi + snapCardinals: true layers: - state: on map: ["enum.GravityGeneratorVisualLayers.Base"] diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 978c107e75..f94cd2b9b3 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -6,6 +6,7 @@ components: - type: Sprite sprite: Structures/Machines/autolathe.rsi + snapCardinals: true netsync: false layers: - state: icon @@ -90,6 +91,7 @@ components: - type: Sprite sprite: Structures/Machines/protolathe.rsi + snapCardinals: true netsync: false layers: - state: icon @@ -458,6 +460,7 @@ - type: Sprite sprite: Structures/Machines/uniform_printer.rsi netsync: false + snapCardinals: false layers: - state: icon map: ["enum.LatheVisualLayers.IsRunning"] diff --git a/Resources/Prototypes/Entities/Structures/Machines/medical_scanner.yml b/Resources/Prototypes/Entities/Structures/Machines/medical_scanner.yml index a0822036fa..8982f9350f 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/medical_scanner.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/medical_scanner.yml @@ -11,6 +11,7 @@ - type: Sprite netsync: false sprite: Structures/Machines/scanner.rsi + snapCardinals: true layers: - state: open map: ["enum.MedicalScannerVisualLayers.Machine"] diff --git a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml index e8c21ac699..a70082c31f 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml @@ -42,6 +42,7 @@ netsync: false sprite: Structures/Machines/microwave.rsi drawdepth: SmallObjects + snapCardinals: true layers: - state: mw0 map: ["enum.MicrowaveVisualizerLayers.Base"] diff --git a/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml b/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml index 0853198298..e362615bd4 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml @@ -40,6 +40,7 @@ sprite: Structures/Machines/juicer.rsi state: juicer0 drawdepth: SmallObjects + snapCardinals: true - type: ApcPowerReceiver powerLoad: 300 - type: ItemSlots diff --git a/Resources/Prototypes/Entities/Structures/Machines/research.yml b/Resources/Prototypes/Entities/Structures/Machines/research.yml index 3bca06eed1..851619e1f4 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/research.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/research.yml @@ -44,6 +44,7 @@ components: - type: Sprite sprite: Structures/Machines/rndpointsource.rsi + netsync: false layers: - state: rndpointsource-off - state: rndpointsource diff --git a/Resources/Prototypes/Entities/Structures/Machines/seed_extractor.yml b/Resources/Prototypes/Entities/Structures/Machines/seed_extractor.yml index 4adeebbbb4..aa09bbd988 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/seed_extractor.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/seed_extractor.yml @@ -6,6 +6,7 @@ components: - type: Sprite sprite: Structures/Machines/seed_extractor.rsi + snapCardinals: true layers: - state: seedextractor-off - state: seedextractor-unlit diff --git a/Resources/Prototypes/Entities/Structures/Machines/stasisbed.yml b/Resources/Prototypes/Entities/Structures/Machines/stasisbed.yml index ea03640c3c..692b187ff0 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/stasisbed.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/stasisbed.yml @@ -9,6 +9,7 @@ - type: Sprite sprite: Structures/Machines/stasis_bed.rsi netsync: false + noRot: true layers: - state: icon - state: unlit diff --git a/Resources/Prototypes/Entities/Structures/Machines/surveillance_camera_routers.yml b/Resources/Prototypes/Entities/Structures/Machines/surveillance_camera_routers.yml index 70491adbd8..a02e455e1d 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/surveillance_camera_routers.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/surveillance_camera_routers.yml @@ -18,6 +18,7 @@ board: SurveillanceCameraRouterCircuitboard - type: Sprite sprite: Structures/Machines/server.rsi + snapCardinals: true layers: - state: server diff --git a/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml b/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml index ddd8eac90c..94b9a4b1fe 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml @@ -15,6 +15,7 @@ - type: Sprite sprite: Structures/Machines/VendingMachines/empty.rsi netsync: false + snapCardinals: true - type: Physics bodyType: Static - type: Transform @@ -574,7 +575,7 @@ radius: 1.5 energy: 1.6 color: "#326e3f" - + - type: entity parent: VendingMachineSeedsUnlocked id: VendingMachineSeeds diff --git a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml index 367aed5c44..eaf6ed9658 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/portable.yml @@ -22,6 +22,7 @@ - type: Sprite netsync: false sprite: Structures/Piping/Atmospherics/Portable/portable_scrubber.rsi + noRot: true layers: - state: icon map: ["enum.PortableScrubberVisualLayers.IsRunning"] diff --git a/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml b/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml index b00409dd87..00ea4dddf2 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml @@ -11,6 +11,7 @@ - type: Sprite netsync: false sprite: Structures/Piping/disposal.rsi + snapCardinals: true layers: - state: condisposal map: ["enum.DisposalUnitVisualLayers.Base"] diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/collector.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/collector.yml index 08e3bf0530..3757a62844 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/collector.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/collector.yml @@ -25,6 +25,7 @@ - type: Sprite sprite: Structures/Power/Generation/Singularity/collector.rsi netsync: false + snapCardinals: true layers: - state: ca_on map: ["enum.RadiationCollectorVisualLayers.Main"] diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml index ea9fed28b3..d5a88c43c9 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml @@ -9,6 +9,7 @@ - type: InteractionOutline - type: Sprite netsync: false + snapCardinals: true sprite: Structures/Power/Generation/ame.rsi state: control - type: Physics diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml index 1b0d6f6673..4c7c175e96 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml @@ -32,6 +32,8 @@ - type: Sprite sprite: Structures/Power/power.rsi state: generator + netsync: false + snapCardinals: true - type: NodeContainer examinable: true nodes: diff --git a/Resources/Prototypes/Entities/Structures/Power/chargers.yml b/Resources/Prototypes/Entities/Structures/Power/chargers.yml index eb4c8d8195..dc8d7ef23e 100644 --- a/Resources/Prototypes/Entities/Structures/Power/chargers.yml +++ b/Resources/Prototypes/Entities/Structures/Power/chargers.yml @@ -10,6 +10,7 @@ netsync: false sprite: Structures/Power/cell_recharger.rsi drawdepth: SmallObjects + snapCardinals: true - type: Charger chargerSlot: ejectOnInteract: true diff --git a/Resources/Prototypes/Entities/Structures/Power/smes.yml b/Resources/Prototypes/Entities/Structures/Power/smes.yml index 7376574210..39db24851c 100644 --- a/Resources/Prototypes/Entities/Structures/Power/smes.yml +++ b/Resources/Prototypes/Entities/Structures/Power/smes.yml @@ -16,6 +16,7 @@ - type: Sprite netsync: false sprite: Structures/Power/smes.rsi + snapCardinals: true layers: - state: smes - type: Smes diff --git a/Resources/Prototypes/Entities/Structures/Power/substation.yml b/Resources/Prototypes/Entities/Structures/Power/substation.yml index 4b00ff4c6c..42bee61ae8 100644 --- a/Resources/Prototypes/Entities/Structures/Power/substation.yml +++ b/Resources/Prototypes/Entities/Structures/Power/substation.yml @@ -10,6 +10,7 @@ components: - type: Sprite # TODO: add sprite for maintenance panel open sprite: Structures/Power/substation.rsi + snapCardinals: true layers: - state: substation - state: screen diff --git a/Resources/Prototypes/Entities/Structures/Shuttles/thrusters.yml b/Resources/Prototypes/Entities/Structures/Shuttles/thrusters.yml index 5faeae05b9..688dbd3931 100644 --- a/Resources/Prototypes/Entities/Structures/Shuttles/thrusters.yml +++ b/Resources/Prototypes/Entities/Structures/Shuttles/thrusters.yml @@ -91,6 +91,7 @@ - type: Sprite # Listen I'm not the biggest fan of the sprite but it was the most appropriate thing I could find. sprite: Structures/Shuttles/gyroscope.rsi + snapCardinals: true layers: - state: base map: ["enum.ThrusterVisualLayers.Base"] @@ -122,7 +123,7 @@ needsPower: false powerLoad: 0 - type: Sprite - sprite: Structures/Shuttles/thruster.rsi + sprite: Structures/Shuttles/gyroscope.rsi layers: - state: base map: ["enum.ThrusterVisualLayers.Base"] diff --git a/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml b/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml index 6654e76c62..70fdee7797 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Canisters/gas_canisters.yml @@ -9,6 +9,7 @@ - type: Sprite netsync: false sprite: Structures/Storage/canister.rsi + noRot: true layers: - state: grey - type: Appearance diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml index 7c774a9948..92694a535f 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml @@ -10,6 +10,7 @@ noRot: true - type: Sprite netsync: false + noRot: true sprite: Structures/Storage/Crates/generic.rsi layers: - state: crate @@ -76,6 +77,7 @@ - type: Sprite netsync: false sprite: Structures/Storage/Crates/generic.rsi + snapCardinals: true layers: - state: crate - state: crate_door diff --git a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml index f32496baf8..f29c361ee0 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml @@ -7,6 +7,7 @@ components: - type: Sprite netsync: false + snapCardinals: true - type: InteractionOutline - type: Physics - type: Fixtures diff --git a/Resources/Prototypes/Entities/Structures/Storage/storage.yml b/Resources/Prototypes/Entities/Structures/Storage/storage.yml index 229986682a..04c69ba15d 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/storage.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/storage.yml @@ -19,6 +19,7 @@ sprite: Structures/Furniture/furniture.rsi state: rack netsync: false + snapCardinals: true - type: Fixtures fixtures: - shape: diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml index 5eecb71569..e1a0aa1e84 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/base_structuresigns.yml @@ -32,3 +32,4 @@ drawdepth: WallTops sprite: Structures/Wallmounts/signs.rsi netsync: false + snapCardinals: true diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml index 3d43354bb8..3d31899410 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/posters.yml @@ -8,6 +8,7 @@ - type: Sprite drawdepth: WallTops sprite: Structures/Wallmounts/posters.rsi + snapCardinals: true - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/signs.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/signs.yml index 4b755897e8..2e39016ed1 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/signs.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/Signs/signs.yml @@ -8,9 +8,16 @@ state: monkey_painting # Directional Station Guide Signs - - type: entity parent: BaseSign + id: BaseSignDirectional + abstract: true + components: + - type: Sprite + snapCardinals: false + +- type: entity + parent: BaseSignDirectional id: SignDirectionalBar name: bar sign description: A direction sign, pointing out which way the bar is. @@ -19,7 +26,7 @@ state: direction_bar - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalBridge name: bridge sign description: A direction sign, pointing out which way the Bridge is. @@ -28,7 +35,7 @@ state: direction_bridge - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalBrig name: brig sign description: A direction sign, pointing out which way the Brig is. @@ -37,7 +44,7 @@ state: direction_brig - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalChapel name: chapel sign description: A direction sign, pointing out which way the Chapel is. @@ -46,7 +53,7 @@ state: direction_chapel - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalChemistry name: chemistry sign description: A direction sign, pointing out which way the chemistry lab is. @@ -55,7 +62,7 @@ state: direction_chemistry - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalCryo name: cryo sign description: A direction sign, pointing out the way to cryogenics. @@ -64,7 +71,7 @@ state: direction_cryo - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalDorms name: dorms sign description: A direction sign, pointing out which way the Dorms are. @@ -73,7 +80,7 @@ state: direction_dorms - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalEng name: engineering sign description: A direction sign, pointing out which way the Engineering department is. @@ -82,7 +89,7 @@ state: direction_eng - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalEvac name: evac sign description: A direction sign, pointing out which way evac is. @@ -91,7 +98,7 @@ state: direction_evac - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalFood name: food sign description: A direction sign, pointing out which way the kitchen is. @@ -100,7 +107,7 @@ state: direction_food - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalGravity name: gravity sign description: A direction sign, pointing out which way the gravity generator is. @@ -109,7 +116,7 @@ state: direction_gravity - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalHop name: hop sign description: A direction sign, pointing out which way Head of Personnel's office is. @@ -118,7 +125,7 @@ state: direction_hop - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalHydro name: hydro sign description: A direction sign, pointing out which way hydroponics is. @@ -127,7 +134,7 @@ state: direction_hydro - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalJanitor name: janitor sign description: A direction sign, pointing out which way the janitor's closet is. @@ -136,7 +143,7 @@ state: direction_janitor - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalLibrary name: library sign description: A direction sign, pointing out which way the library is. @@ -145,7 +152,7 @@ state: direction_library - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalMed name: medical sign description: A direction sign, pointing out which way the Medical department is. @@ -154,7 +161,7 @@ state: direction_med - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalSalvage name: salvage sign description: A direction sign, pointing out which way the Salvage department is. @@ -163,7 +170,7 @@ state: direction_salvage - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalSci name: science sign description: A direction sign, pointing out which way the Science department is. @@ -172,7 +179,7 @@ state: direction_sci - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalSec name: sec sign description: A direction sign, pointing out which way Security is. @@ -181,7 +188,7 @@ state: direction_sec - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalSolar name: solars sign description: A direction sign, pointing out which way solars are. @@ -190,7 +197,7 @@ state: direction_solar - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalSupply name: supply sign description: A direction sign, pointing to some supplies. @@ -199,7 +206,7 @@ state: direction_supply - type: entity - parent: BaseSign + parent: BaseSignDirectional id: SignDirectionalWash name: washroom sign description: A direction sign, pointing to the way to a washroom. @@ -793,6 +800,7 @@ components: - type: Sprite state: securearea + snapCardinals: true - type: entity parent: BaseSign diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/extinguisher_cabinet.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/extinguisher_cabinet.yml index 47440c409f..9e13e15f26 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/extinguisher_cabinet.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/extinguisher_cabinet.yml @@ -12,6 +12,7 @@ - type: Sprite sprite: Structures/Wallmounts/extinguisher_cabinet.rsi netsync: false + snapCardinals: true layers: - state: frame - state: extinguisher diff --git a/Resources/Textures/Structures/Shuttles/gyroscope.rsi/meta.json b/Resources/Textures/Structures/Shuttles/gyroscope.rsi/meta.json index a92125f840..31ef28fa6b 100644 --- a/Resources/Textures/Structures/Shuttles/gyroscope.rsi/meta.json +++ b/Resources/Textures/Structures/Shuttles/gyroscope.rsi/meta.json @@ -8,13 +8,16 @@ "license": "CC-BY-SA-3.0", "states": [ { - "name": "base" + "name": "base", + "directions": 1 }, { - "name": "thrust" + "name": "thrust", + "directions": 1 }, { "name": "thrust_burn", + "directions": 1, "delays": [ [ 0.1, @@ -26,6 +29,7 @@ }, { "name": "thrust_burn_unshaded", + "directions": 1, "delays": [ [ 0.1,