]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Try fix click sorting & other misc changes. (#15686)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sun, 23 Apr 2023 07:44:27 +0000 (19:44 +1200)
committerGitHub <noreply@github.com>
Sun, 23 Apr 2023 07:44:27 +0000 (17:44 +1000)
Content.Client/Clickable/ClickableComponent.cs
Content.Client/Gameplay/GameplayStateBase.cs
Content.Server/Administration/Commands/ExplosionCommand.cs
Content.Server/Station/Systems/StationSystem.cs

index 56d562bd13f2f39eb9670f82a0c58b90140fe1a6..3a1f9be44f728523b92a8c8916d022b7bbd4163b 100644 (file)
@@ -35,7 +35,7 @@ namespace Content.Client.Clickable
             renderOrder = sprite.RenderOrder;
             var (spritePos, spriteRot) = transform.GetWorldPositionRotation(xformQuery);
             var spriteBB = sprite.CalculateRotatedBoundingBox(spritePos, spriteRot, eye.Rotation);
-            bottom = spriteBB.CalcBoundingBox().Bottom;
+            bottom = Matrix3.CreateRotation(eye.Rotation).TransformBox(spriteBB).Bottom;
 
             var invSpriteMatrix = Matrix3.Invert(sprite.GetLocalMatrix());
 
index e1ca614f91ea48d5d96f7dcba257fadf17be84dd..555cde1a57cef762dd86f0033102c3d7543c9fe0 100644 (file)
@@ -136,7 +136,7 @@ namespace Content.Client.Gameplay
                     return cmp;
                 }
 
-                cmp = y.bottom.CompareTo(x.bottom);
+                cmp = -y.bottom.CompareTo(x.bottom);
 
                 if (cmp != 0)
                 {
index 449d534efdd3253edc1a62267405313b4eb04de6..9a509f7fa32b807523712097ea18fb8466e64278 100644 (file)
@@ -56,7 +56,7 @@ public sealed class ExplosionCommand : IConsoleCommand
             shell.WriteError($"Failed to parse intensity: {args[0]}");
             return;
         }
+
         float slope = 5;
         if (args.Length > 1 && !float.TryParse(args[1], out slope))
         {
@@ -118,7 +118,7 @@ public sealed class ExplosionCommand : IConsoleCommand
                 return;
             }
         }
-        else
+        else if (!protoMan.TryIndex(ExplosionSystem.DefaultExplosionPrototypeId, out type))
         {
             // no prototype was specified, so lets default to whichever one was defined first
             type = protoMan.EnumeratePrototypes<ExplosionPrototype>().FirstOrDefault();
index 2eb8e8d54ffa979069d8040c63ddb9996d09bc58..1828e53c6a3c16e2960afeea44b43cc0ba735c37 100644 (file)
@@ -345,11 +345,10 @@ public sealed class StationSystem : EntitySystem
     /// <returns>The initialized station.</returns>
     public EntityUid InitializeNewStation(StationConfig? stationConfig, IEnumerable<EntityUid>? gridIds, string? name = null)
     {
-        var station = Spawn(null, new MapCoordinates(0, 0, _gameTicker.DefaultMap));
+        var station = Spawn(null, MapCoordinates.Nullspace);
 
         // TODO SERIALIZATION The station data needs to be saveable somehow, but when a map gets saved, this entity
         // won't be included because its in null-space. Also, what happens to shuttles on other maps?
-        _transform.DetachParentToNull(station, Transform(station));
 
         var data = AddComp<StationDataComponent>(station);
         var metaData = MetaData(station);