in-game chemical book (#17213)
This commit is contained in:
@@ -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;
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
prob: 0.4
|
||||
amount: 1
|
||||
maxAmount: 4
|
||||
- id: BookChemicalCompendium
|
||||
prob: 0.2
|
||||
- id: BookNarsieLegend
|
||||
prob: 0.1
|
||||
- id: BookTruth
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user