MapManager warning cleanup shared edition (#36795)

* cleanup and reworking

* one of these days I'll merge a conflict without breaking shit.

* Update Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Tabletop/SharedTabletopSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* I'm gonna send this but... I'll be honest, I dunno what it does.

* fix coordinates

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Kyle Tyo
2025-05-14 19:24:44 -04:00
committed by GitHub
parent bb442d1234
commit c84d4753b9
4 changed files with 5 additions and 11 deletions

View File

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