Various system spring cleaning (#36206)

* Various systems warnings cleanup

* Last changes before submitting PR

* Add guard for transform component, fix failing test

* Small corrections

* Audio params to specifiers datafields

* Using audio params on components and configs
This commit is contained in:
J
2025-04-16 11:08:22 +00:00
committed by GitHub
parent 2a80540b70
commit b1c08582d5
27 changed files with 101 additions and 46 deletions

View File

@@ -59,14 +59,14 @@ public sealed class FloorTileSystem : EntitySystem
// this looks a bit sussy but it might be because it needs to be able to place off of grids and expand them
var location = args.ClickLocation.AlignWithClosestGridTile();
var locationMap = location.ToMap(EntityManager, _transform);
var locationMap = _transform.ToMapCoordinates(location);
if (locationMap.MapId == MapId.Nullspace)
return;
var physicQuery = GetEntityQuery<PhysicsComponent>();
var transformQuery = GetEntityQuery<TransformComponent>();
var map = location.ToMap(EntityManager, _transform);
var map = _transform.ToMapCoordinates(location);
// Disallow placement close to grids.
// FTLing close is okay but this makes alignment too finnicky.
@@ -92,7 +92,7 @@ public sealed class FloorTileSystem : EntitySystem
return;
}
var userPos = transformQuery.GetComponent(args.User).Coordinates.ToMapPos(EntityManager, _transform);
var userPos = _transform.ToMapCoordinates(transformQuery.GetComponent(args.User).Coordinates).Position;
var dir = userPos - map.Position;
var canAccessCenter = false;
if (dir.LengthSquared() > 0.01)