public bool ShowIFF { get; set; } = true;
public bool ShowDocks { get; set; } = true;
+ public bool RotateWithEntity { get; set; } = true;
/// <summary>
/// Raised if the user left-clicks on the radar control with the relevant entitycoordinates.
ActualRadarRange = Math.Clamp(ActualRadarRange, WorldMinRange, WorldMaxRange);
+ RotateWithEntity = state.RotateWithEntity;
+
_docks = state.Docks;
}
var mapPos = _transform.ToMapCoordinates(_coordinates.Value);
var offset = _coordinates.Value.Position;
var posMatrix = Matrix3Helpers.CreateTransform(offset, _rotation.Value);
- var (_, ourEntRot, ourEntMatrix) = _transform.GetWorldPositionRotationMatrix(_coordinates.Value.EntityId);
+ var ourEntRot = RotateWithEntity ? _transform.GetWorldRotation(xform) : _rotation.Value;
+ var ourEntMatrix = Matrix3Helpers.CreateTransform(_transform.GetWorldPosition(xform), ourEntRot);
var ourWorldMatrix = Matrix3x2.Multiply(posMatrix, ourEntMatrix);
Matrix3x2.Invert(ourWorldMatrix, out var ourWorldMatrixInvert);
state = _console.GetNavState(uid, docks);
}
+ state.RotateWithEntity = !component.FollowEntity;
+
_uiSystem.SetUiState(uid, RadarConsoleUiKey.Key, new NavBoundUserInterfaceState(state));
}
}
public Dictionary<NetEntity, List<DockingPortState>> Docks;
+ public bool RotateWithEntity = true;
+
public NavInterfaceState(
float maxRange,
NetCoordinates? coordinates,
visible: true
map: [ "enum.PowerDeviceVisualLayers.Powered" ]
- type: RadarConsole
- maxRange: 64
+ maxRange: 256
followEntity: true
- type: Appearance
- type: GenericVisualizer
True: { visible: true }
False: { visible: false }
- type: PowerCellDraw
- drawRate: 3
- useRate: 100
+ drawRate: 1.5
- type: ActivatableUI
key: enum.RadarConsoleUiKey.Key
inHandsOnly: true