diff --git a/Content.Client/Guidebook/Controls/GuidebookWindow.xaml b/Content.Client/Guidebook/Controls/GuidebookWindow.xaml index b52eacfa72..69534af7f6 100644 --- a/Content.Client/Guidebook/Controls/GuidebookWindow.xaml +++ b/Content.Client/Guidebook/Controls/GuidebookWindow.xaml @@ -2,7 +2,7 @@ xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls" xmlns:fancyTree="clr-namespace:Content.Client.UserInterface.Controls.FancyTree" xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" - SetSize="850 700" + SetSize="900 700" MinSize="100 200" Resizable="True" Title="{Loc 'guidebook-window-title'}"> diff --git a/Content.Client/Guidebook/Controls/GuidebookWindow.xaml.cs b/Content.Client/Guidebook/Controls/GuidebookWindow.xaml.cs index 9ff189e790..c904a9c789 100644 --- a/Content.Client/Guidebook/Controls/GuidebookWindow.xaml.cs +++ b/Content.Client/Guidebook/Controls/GuidebookWindow.xaml.cs @@ -18,8 +18,6 @@ namespace Content.Client.Guidebook.Controls; [GenerateTypedNameReferences] public sealed partial class GuidebookWindow : FancyWindow, ILinkClickHandler { - [Dependency] private readonly IConfigurationManager _configuration = default!; - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IResourceManager _resourceManager = default!; [Dependency] private readonly DocumentParsingManager _parsingMan = default!; @@ -38,20 +36,6 @@ public sealed partial class GuidebookWindow : FancyWindow, ILinkClickHandler }; } - protected override void Opened() - { - base.Opened(); - - var guideProto = _configuration.GetCVar(CCVars.DefaultGuide); - if (_prototypeManager.TryIndex(guideProto, out var guideEntry)) - { - if (Tree.Items.FirstOrDefault(x => x.Metadata is GuideEntry entry && entry.Id == guideProto) is { } item) - Tree.SetSelectedIndex(item.Index); - else - ShowGuide(guideEntry); - } - } - private void OnSelectionChanged(TreeItem? item) { if (item != null && item.Metadata is GuideEntry entry) diff --git a/Content.Client/UserInterface/Systems/Guidebook/GuidebookUIController.cs b/Content.Client/UserInterface/Systems/Guidebook/GuidebookUIController.cs index 61195f3a9a..03ea47827f 100644 --- a/Content.Client/UserInterface/Systems/Guidebook/GuidebookUIController.cs +++ b/Content.Client/UserInterface/Systems/Guidebook/GuidebookUIController.cs @@ -3,11 +3,15 @@ using Content.Client.Gameplay; using Content.Client.Guidebook; using Content.Client.Guidebook.Controls; using Content.Client.Lobby; +using Content.Client.Players.PlayTimeTracking; using Content.Client.UserInterface.Controls; +using Content.Shared.CCVar; using Content.Shared.Guidebook; using Content.Shared.Input; +using Robust.Client.State; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controllers; +using Robust.Shared.Configuration; using static Robust.Client.UserInterface.Controls.BaseButton; using Robust.Shared.Input.Binding; using Robust.Shared.Prototypes; @@ -19,21 +23,25 @@ public sealed class GuidebookUIController : UIController, IOnStateEntered UIManager.GetActiveUIWidgetOrNull()?.GuidebookButton; public void OnStateEntered(LobbyState state) { - HandleStateEntered(); + HandleStateEntered(state); } public void OnStateEntered(GameplayState state) { - HandleStateEntered(); + HandleStateEntered(state); } - private void HandleStateEntered() + private void HandleStateEntered(State state) { DebugTools.Assert(_guideWindow == null); @@ -42,6 +50,14 @@ public sealed class GuidebookUIController : UIController, IOnStateEntered() diff --git a/Resources/Locale/en-US/guidebook/guides.ftl b/Resources/Locale/en-US/guidebook/guides.ftl index 838d2ce4a6..4bef8970b4 100644 --- a/Resources/Locale/en-US/guidebook/guides.ftl +++ b/Resources/Locale/en-US/guidebook/guides.ftl @@ -56,7 +56,7 @@ guide-entry-yourfirstcharacter = Your First Character guide-entry-controls = Controls guide-entry-radio = Radio and Speech -guide-entry-references = Tables and References +guide-entry-references = Tables & References guide-entry-drinks = Drinks guide-entry-foodrecipes = Food Recipes guide-entry-chemicals = Chemicals diff --git a/Resources/Prototypes/Guidebook/station.yml b/Resources/Prototypes/Guidebook/station.yml index 9570b617c0..d868a6b58f 100644 --- a/Resources/Prototypes/Guidebook/station.yml +++ b/Resources/Prototypes/Guidebook/station.yml @@ -3,7 +3,6 @@ name: guide-entry-ss14 text: "/ServerInfo/Guidebook/SpaceStation14.xml" children: - - Controls - Jobs - Survival - Antagonists