Skip to content

Commit

Permalink
better clarify what's required for PDA logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Govorunb committed Apr 22, 2024
1 parent c60ce8d commit cbbc264
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion SCHIZO/Items/PDAJournal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
3 changes: 2 additions & 1 deletion Unity/Assets/Scripts/SCHIZO/Items/PDAJournal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cbbc264

Please sign in to comment.