Skip to content

Commit

Permalink
Everything works!
Browse files Browse the repository at this point in the history
  • Loading branch information
Just-a-Unity-Dev committed Jul 9, 2024
1 parent e8bbf2b commit a0a27a5
Show file tree
Hide file tree
Showing 38 changed files with 1,981 additions and 180 deletions.
1 change: 0 additions & 1 deletion Content.Client/Humanoid/HumanoidAppearanceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ public override void LoadProfile(EntityUid uid, HumanoidCharacterProfile? profil
humanoid.Sex = profile.Sex;
humanoid.Gender = profile.Gender;
humanoid.Age = profile.Age;
humanoid.Height = profile.Height;
humanoid.Species = profile.Species;
humanoid.SkinColor = profile.Appearance.SkinColor;
humanoid.EyeColor = profile.Appearance.EyeColor;
Expand Down
22 changes: 11 additions & 11 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,16 +327,16 @@ public HumanoidProfileEditor(

#region SpawnPriority

foreach (var value in Enum.GetValues<SpawnPriorityPreference>())
{
SpawnPriorityButton.AddItem(Loc.GetString($"humanoid-profile-editor-preference-spawn-priority-{value.ToString().ToLower()}"), (int) value);
}

SpawnPriorityButton.OnItemSelected += args =>
{
SpawnPriorityButton.SelectId(args.Id);
SetSpawnPriority((SpawnPriorityPreference) args.Id);
};
// foreach (var value in Enum.GetValues<SpawnPriorityPreference>())
// {
// SpawnPriorityButton.AddItem(Loc.GetString($"humanoid-profile-editor-preference-spawn-priority-{value.ToString().ToLower()}"), (int) value);
// }
//
// SpawnPriorityButton.OnItemSelected += args =>
// {
// SpawnPriorityButton.SelectId(args.Id);
// SetSpawnPriority((SpawnPriorityPreference) args.Id);
// };

#endregion SpawnPriority

Expand Down Expand Up @@ -1367,7 +1367,7 @@ private void UpdateSpawnPriorityControls()
return;
}

SpawnPriorityButton.SelectId((int) Profile.SpawnPriority);
// SpawnPriorityButton.SelectId((int) Profile.SpawnPriority);
}

private void UpdateHairPickers()
Expand Down
2 changes: 2 additions & 0 deletions Content.Client/Lobby/UI/LobbyGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@
<Label Name="StationTime" Access="Public" FontColorOverride="{x:Static maths:Color.LightGray}"
Margin="3 3 3 3" HorizontalAlignment="Left" />
<controls:HSpacer Spacing="5" />
<lobbyUi:LobbyCharacterPreviewPanel Name="CharacterPreview" Access="Public" />
<controls:HSpacer Spacing="5" />
<BoxContainer MinHeight="10" />
<!-- Gold line -->
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" Access="Public" />
Expand Down
1 change: 1 addition & 0 deletions Content.Client/_FTL/FtlPoints/StarmapConsole.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void UpdateState(StarmapConsoleBoundUserInterfaceState state)
{
UpdateStars(state.Stars);
Stars.Range = state.Range;

var currentStar = state.Stars.Find(star => star.Position == Vector2.Zero);
CurrentStarName.Text = currentStar.Name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected override void UpdateState(BoundUserInterfaceState state)
if (state is not GunnerConsoleBoundInterfaceState cState)
return;

_window?.SetMatrix(_entityManager.GetCoordinates(cState.Coordinates), cState.Angle);
_window?.SetMatrix(_entityManager.GetCoordinates(cState.State.Coordinates), cState.State.Angle);
_window?.UpdateState(cState);
}
}
2 changes: 1 addition & 1 deletion Content.Client/_FTL/ShipWeapons/GunnerConsoleWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
HorizontalAlignment = "Stretch"
HorizontalExpand = "True"
VerticalExpand = "True">
<ui:RadarControl Name="RadarScreen"
<ui:ShuttleNavControl Name="RadarScreen"
MouseFilter="Stop"
Margin="4"
HorizontalExpand = "True"
Expand Down
10 changes: 2 additions & 8 deletions Content.Client/_FTL/ShipWeapons/GunnerConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,10 @@ 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
);
RadarScreen.UpdateState(radarState);
RadarScreen.UpdateState(scc.State);

// update ammo text
AmmoCounter.Text = scc.CurrentAmmo <= 0 ? Loc.GetString("gunner-console-no-ammo") : $"{scc.CurrentAmmo}/{scc.MaxAmmo}";
MaxRadarRange.Text = $"{scc.MaxRange:0}";
// MaxRadarRange.Text = $"{scc.MaxRange:0}";
}
}
Loading

0 comments on commit a0a27a5

Please sign in to comment.