// don't spawn inside of solid objects
var physQuery = GetEntityQuery<PhysicsComponent>();
var valid = true;
+
+ // TODO: This should be using static lookup.
foreach (var ent in gridComp.GetAnchoredEntities(tile))
{
if (!physQuery.TryGetComponent(ent, out var body))
if (antiXform.MapID != mapPos.MapId)
continue;
- var antiCoordinates = _transform.GetMapCoordinates(antiXform);
+ var antiCoordinates = _transform.GetWorldPosition(antiXform);
- var delta = antiCoordinates.Position - mapPos.Position;
+ var delta = antiCoordinates - mapPos.Position;
if (delta.LengthSquared() < zone.ZoneRadius * zone.ZoneRadius)
{
valid = false;
+++ /dev/null
-- type: entity
- name: anti anomaly zone
- description: Anomalies will not be able to appear within a 10 block radius of this point.
- id: AntiAnomalyZone
- suffix: "range 10"
- parent: MarkerBase
- components:
- - type: Sprite
- sprite: Structures/Specific/Anomalies/ice_anom.rsi
- layers:
- - state: anom
- - sprite: Markers/cross.rsi
- state: pink
- - type: AntiAnomalyZone
- zoneRadius: 10
-
-- type: entity
- parent: AntiAnomalyZone
- id: AntiAnomalyZone20
- suffix: "range 20"
- description: Anomalies will not be able to appear within a 20 block radius of this point.
- components:
- - type: AntiAnomalyZone
- zoneRadius: 20
-
-- type: entity
- parent: AntiAnomalyZone
- id: AntiAnomalyZone50
- suffix: "range 50"
- description: Anomalies will not be able to appear within a 50 block radius of this point.
- components:
- - type: AntiAnomalyZone
- zoneRadius: 50
\ No newline at end of file