diff --git a/Content.Client/Guidebook/GuidebookSystem.cs b/Content.Client/Guidebook/GuidebookSystem.cs index a3c55a0f0e..6ed38ddef0 100644 --- a/Content.Client/Guidebook/GuidebookSystem.cs +++ b/Content.Client/Guidebook/GuidebookSystem.cs @@ -11,6 +11,7 @@ using Robust.Client.GameObjects; using Robust.Client.Player; using Robust.Shared.Map; using Robust.Shared.Player; +using Robust.Shared.Timing; using Robust.Shared.Utility; namespace Content.Client.Guidebook; @@ -20,6 +21,7 @@ namespace Content.Client.Guidebook; /// public sealed class GuidebookSystem : EntitySystem { + [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly SharedAudioSystem _audioSystem = default!; [Dependency] private readonly VerbSystem _verbSystem = default!; @@ -78,6 +80,9 @@ public sealed class GuidebookSystem : EntitySystem private void OnInteract(EntityUid uid, GuideHelpComponent component, ActivateInWorldEvent args) { + if (!_timing.IsFirstTimePredicted) + return; + if (!component.OpenOnActivation || component.Guides.Count == 0 || _tags.HasTag(uid, GuideEmbedTag)) return; diff --git a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml index af363cf374..fc876f6791 100644 --- a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml +++ b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml @@ -9,6 +9,8 @@ prob: 0.4 amount: 1 maxAmount: 4 + - id: BookChemicalCompendium + prob: 0.2 - id: BookNarsieLegend prob: 0.1 - id: BookTruth diff --git a/Resources/Prototypes/Entities/Objects/Misc/books.yml b/Resources/Prototypes/Entities/Objects/Misc/books.yml index 539e53c637..eafd00d674 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/books.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/books.yml @@ -27,6 +27,21 @@ backgroundPatchMargin: 23.0, 16.0, 14.0, 15.0 contentMargin: 20.0, 20.0, 20.0, 20.0 +- type: entity + id: BookChemicalCompendium + parent: BaseItem + name: chemical compendium + description: A comprehensive guide written by some old skeleton of a professor about chemical synthesis. + components: + - type: Sprite + sprite: Objects/Misc/books.rsi + layers: + - state: book_chemistry + - type: GuideHelp + openOnActivation: true + guides: + - Chemicals + - type: entity parent: BookBase id: BookRandom