Various sharedsystem spring cleaning (#36200)

* Various shared system warnings cleanup

* More shared system warnings cleanup

* Rearranging changes

* Using correct transform for unbuckle

* Small changes

* Revert buckle change

* Update Content.Shared/Ghost/SharedGhostSystem.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
J
2025-04-21 18:40:31 +00:00
committed by GitHub
parent dd308c6d2d
commit ded94ebc3d
8 changed files with 14 additions and 17 deletions

View File

@@ -279,14 +279,14 @@ public abstract class SharedMagicSystem : EntitySystem
var userVelocity = _physics.GetMapLinearVelocity(ev.Performer);
// If applicable, this ensures the projectile is parented to grid on spawn, instead of the map.
var fromMap = fromCoords.ToMap(EntityManager, _transform);
var fromMap = _transform.ToMapCoordinates(fromCoords);
var spawnCoords = _mapManager.TryFindGridAt(fromMap, out var gridUid, out _)
? fromCoords.WithEntityId(gridUid, EntityManager)
? _transform.WithEntityId(fromCoords, gridUid)
: new(_mapManager.GetMapEntityId(fromMap.MapId), fromMap.Position);
var ent = Spawn(ev.Prototype, spawnCoords);
var direction = toCoords.ToMapPos(EntityManager, _transform) -
spawnCoords.ToMapPos(EntityManager, _transform);
var direction = _transform.ToMapCoordinates(toCoords).Position -
_transform.ToMapCoordinates(spawnCoords).Position;
_gunSystem.ShootProjectile(ent, direction, userVelocity, ev.Performer, ev.Performer);
}
// End Projectile Spells