diff --git a/NewHorizons/Builder/Props/ProjectionBuilder.cs b/NewHorizons/Builder/Props/ProjectionBuilder.cs index 32876489..de4060bd 100644 --- a/NewHorizons/Builder/Props/ProjectionBuilder.cs +++ b/NewHorizons/Builder/Props/ProjectionBuilder.cs @@ -130,8 +130,7 @@ namespace NewHorizons.Builder.Props slideCollectionContainer.slideCollection = slideCollection; - // Idk why but it wants reveals to be comma delimited not a list - if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals); + LinkShipLogFacts(info, slideCollectionContainer); StreamingHandler.SetUpStreaming(slideReelObj, sector); @@ -245,8 +244,7 @@ namespace NewHorizons.Builder.Props target.slideCollection = g.AddComponent(); target.slideCollection._slideCollectionContainer = slideCollectionContainer; - // Idk why but it wants reveals to be comma delimited not a list - if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals); + LinkShipLogFacts(info, slideCollectionContainer); return g; } @@ -323,13 +321,10 @@ namespace NewHorizons.Builder.Props var mindSlideCollection = standingTorch.AddComponent(); mindSlideCollection._slideCollectionContainer = slideCollectionContainer; - // Make sure that these slides play when the player wanders into the beam + LinkShipLogFacts(info, slideCollectionContainer); + mindSlideProjector.SetMindSlideCollection(mindSlideCollection); - - // Idk why but it wants reveals to be comma delimited not a list - if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals); - return standingTorch; } @@ -405,6 +400,14 @@ namespace NewHorizons.Builder.Props Slide.WriteModules(modules, ref slide._modulesList, ref slide._modulesData, ref slide.lengths); } + + private static void LinkShipLogFacts(ProjectionInfo info, SlideCollectionContainer slideCollectionContainer) + { + // Idk why but it wants reveals to be comma delimited not a list + if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals); + // Don't use null value, NRE in SlideCollectionContainer.Initialize + slideCollectionContainer._playWithShipLogFacts = info.playWithShipLogFacts ?? Array.Empty(); + } } public class VisionTorchTarget : MonoBehaviour diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs index fa81ebf0..7bea17a7 100644 --- a/NewHorizons/External/Modules/PropModule.cs +++ b/NewHorizons/External/Modules/PropModule.cs @@ -617,10 +617,18 @@ namespace NewHorizons.External.Modules public MVector3 position; /// - /// The ship log entries revealed after finishing this slide reel. + /// The ship log facts revealed after finishing this slide reel. /// public string[] reveals; + /// + /// The ship log facts that make the reel play when they are displayed in the computer (by selecting entries or arrows). + /// You should probably include facts from `reveals` here. + /// If you only specify a rumor fact, then it would only play in its ship log entry if this has revealed only + /// rumor facts because an entry with revealed explore facts doesn't display rumor facts. + /// + public string[] playWithShipLogFacts; + /// /// The rotation of this slideshow. /// @@ -712,7 +720,7 @@ namespace NewHorizons.External.Modules // SlideShipLogEntryModule /// - /// Ship log entry revealed when viewing this slide + /// Ship log fact revealed when viewing this slide /// public string reveal; diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index cbd0b20d..328185fe 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -1425,7 +1425,14 @@ }, "reveals": { "type": "array", - "description": "The ship log entries revealed after finishing this slide reel.", + "description": "The ship log facts revealed after finishing this slide reel.", + "items": { + "type": "string" + } + }, + "playWithShipLogFacts": { + "type": "array", + "description": "The ship log facts that make the reel play when they are displayed in the computer (by selecting entries or arrows).\nYou should probably include facts from `reveals` here.\nIf you only specify a rumor fact, then it would only play in its ship log entry if this has revealed only\nrumor facts because an entry with revealed explore facts doesn't display rumor facts.", "items": { "type": "string" } @@ -1504,7 +1511,7 @@ }, "reveal": { "type": "string", - "description": "Ship log entry revealed when viewing this slide" + "description": "Ship log fact revealed when viewing this slide" }, "spotIntensityMod": { "type": "number",