mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 05:50:54 +01:00
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user