Skip to content

Commit

Permalink
and more
Browse files Browse the repository at this point in the history
  • Loading branch information
Just-a-Unity-Dev committed Nov 9, 2023
1 parent 886a399 commit c70133f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
11 changes: 7 additions & 4 deletions Content.Client/Shuttles/UI/RadarControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,20 @@ protected override void Draw(DrawingHandleScreen handle)
DrawDocks(handle, ourGridId.Value, matrix);
}

var invertedPosition = _coordinates.Value.Position - offset;
invertedPosition.Y = -invertedPosition.Y;
var padPosition = _coordinates.Value.Position;
var consolePosition = _coordinates.Value.Position - padPosition;
padPosition.Y = -padPosition.Y;
consolePosition.Y = -consolePosition.Y;
// Don't need to transform the InvWorldMatrix again as it's already offset to its position.

// Draw radar position on the station
handle.DrawCircle(ScalePosition(invertedPosition), 5f, Color.Lime);
handle.DrawCircle(ScalePosition(padPosition), 5f, Color.Blue);
handle.DrawCircle(ScalePosition(consolePosition), 5f, Color.BlueViolet);
if (_clickedCoordinates.HasValue)
{
var cc = _clickedCoordinates.Value.Position - offset;
cc.Y = -cc.Y;
handle.DrawCircle(ScalePosition(cc), 5f, Color.Lime);
handle.DrawCircle(ScalePosition(cc), 5f, Color.Orange);
}

var shown = new HashSet<EntityUid>();
Expand Down
7 changes: 6 additions & 1 deletion Content.Client/_FTL/ShipWeapons/GunnerConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public void SetMatrix(EntityCoordinates? coordinates, Angle? angle)
public void UpdateState(GunnerConsoleBoundInterfaceState scc)
{
// update the radar
var radarState = new RadarConsoleBoundInterfaceState(scc.MaxRange, scc.Coordinates, scc.Angle, scc.Weapons);
var radarState = new RadarConsoleBoundInterfaceState(
scc.MaxRange,
scc.Coordinates,
scc.Angle,
scc.Weapons
);
RadarScreen.UpdateState(radarState);

// update ammo text
Expand Down
2 changes: 0 additions & 2 deletions Content.Server/_FTL/ShipWeapons/ShipWeaponsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ private void OnPerformActionWeapon(EntityUid uid, GunnerConsoleComponent compone
case ShipWeaponAction.Chamber:
break;
}

}
}
UpdateUserInterface(uid, component);
Expand Down Expand Up @@ -115,7 +114,6 @@ private void UpdateUserInterface(EntityUid uid, GunnerConsoleComponent? componen
return;

var consoleTransform = Transform(uid);
Log.Info(consoleTransform.Coordinates.Position.ToString());
TryComp<RadarConsoleComponent>(uid, out var radar);

var totalAmmo = 0;
Expand Down
4 changes: 2 additions & 2 deletions Resources/Locale/en-US/_ftl/ship-weapons.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ gunner-console-button-fire-text = Fire
gunner-console-button-chamber-text = Chamber Guns
gunner-console-button-eject-text = Eject Mags
signal-port-name-weapons-output = Weapon Output Port
signal-port-name-weapons-output = Pad Control Port
signal-port-name-weapons-output-description = Link the output port to the input port here.
signal-port-name-weapons-input = Weapon Input Port
signal-port-name-weapons-input = Weapon Control Port
signal-port-name-weapons-input-description = Link the input port to the output port here.

0 comments on commit c70133f

Please sign in to comment.