diff --git a/SCHIZO/Items/PDAJournal.cs b/SCHIZO/Items/PDAJournal.cs index f518150b..317ef912 100644 --- a/SCHIZO/Items/PDAJournal.cs +++ b/SCHIZO/Items/PDAJournal.cs @@ -10,8 +10,14 @@ partial class PDAJournal { protected override void Register() { + if (!encyData) + { + LOGGER.LogWarning($"{nameof(PDAJournal)} has no encyData, skipping registration"); + return; + } encyData.Register(key); - Subtitles.SubtitlesHandler.RegisterMetadata(subtitles, encyData.description.text); + if (subtitles) + Subtitles.SubtitlesHandler.RegisterMetadata(subtitles, encyData.description.text); PDAJournalPrefab.Register(this); } diff --git a/Unity/Assets/Scripts/SCHIZO/Items/PDAJournal.cs b/Unity/Assets/Scripts/SCHIZO/Items/PDAJournal.cs index 9cb42350..111fe116 100644 --- a/Unity/Assets/Scripts/SCHIZO/Items/PDAJournal.cs +++ b/Unity/Assets/Scripts/SCHIZO/Items/PDAJournal.cs @@ -12,12 +12,13 @@ namespace SCHIZO.Items [DeclareBoxGroup("Below Zero")] public sealed partial class PDAJournal : ModRegistryItem { - [Careful] + [Careful, Required] public string key; [LabelText("PDA Hover Text")] public string pdaHandTargetText; [LabelText("PDA Hover Subtext")] public string pdaHandTargetSubtext; + [Required] public PDAEncyclopediaInfo encyData; public Subtitles.SubtitlesData subtitles;