55using Content . Client . UserInterface . Controls ;
66using Content . Client . UserInterface . Controls . FancyTree ;
77using Content . Client . UserInterface . Systems . Info ;
8+ using Content . Shared . CCVar ;
89using Content . Shared . Guidebook ;
910using Robust . Client . AutoGenerated ;
1011using Robust . Client . UserInterface ;
1112using Robust . Client . UserInterface . Controls ;
1213using Robust . Client . UserInterface . XAML ;
14+ using Robust . Shared . Configuration ;
1315using Robust . Shared . ContentPack ;
1416using Robust . Shared . Prototypes ;
1517
@@ -20,6 +22,7 @@ public sealed partial class GuidebookWindow : FancyWindow, ILinkClickHandler, IA
2022{
2123 [ Dependency ] private readonly DocumentParsingManager _parsingMan = default ! ;
2224 [ Dependency ] private readonly IResourceManager _resourceManager = default ! ;
25+ [ Dependency ] private readonly IConfigurationManager _cfg = default ! ; //Baseline
2326
2427 private Dictionary < ProtoId < GuideEntryPrototype > , GuideEntry > _entries = new ( ) ;
2528
@@ -208,6 +211,10 @@ private void RepopulateTree(List<ProtoId<GuideEntryPrototype>>? roots = null,
208211 var parent = forcedRoot == null ? null : AddEntry ( forcedRoot . Value , null , addedEntries ) ;
209212 foreach ( var entry in GetSortedEntries ( roots ) )
210213 {
214+ //Baseline start
215+ if ( entry . Hidden ) continue ;
216+ if ( entry . LocFilter is not null && entry . LocFilter != _cfg . GetCVar ( CCVars . ServerLanguage ) ) continue ;
217+ //Baseline end
211218 AddEntry ( entry . Id , parent , addedEntries ) ;
212219 }
213220
0 commit comments