mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
## Major features - Added `playWithShipLogFacts ` to `slideShows` to make reels play in ship log computer.. #389 ## Bug fixes - Fix NRE errors caused by visions (`visionTorchTarget` and `standingVisionTorch`) initialization. #392 - Fix reels (`slideReel`) showing up in Echoes of the Eye entries replacing the vanilla reel: 
This commit is contained in:
commit
b3c7d30f5f
@ -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<MindSlideCollection>();
|
||||
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>();
|
||||
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<string>();
|
||||
}
|
||||
}
|
||||
|
||||
public class VisionTorchTarget : MonoBehaviour
|
||||
|
||||
12
NewHorizons/External/Modules/PropModule.cs
vendored
12
NewHorizons/External/Modules/PropModule.cs
vendored
@ -617,10 +617,18 @@ namespace NewHorizons.External.Modules
|
||||
public MVector3 position;
|
||||
|
||||
/// <summary>
|
||||
/// The ship log entries revealed after finishing this slide reel.
|
||||
/// The ship log facts revealed after finishing this slide reel.
|
||||
/// </summary>
|
||||
public string[] reveals;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public string[] playWithShipLogFacts;
|
||||
|
||||
/// <summary>
|
||||
/// The rotation of this slideshow.
|
||||
/// </summary>
|
||||
@ -712,7 +720,7 @@ namespace NewHorizons.External.Modules
|
||||
// SlideShipLogEntryModule
|
||||
|
||||
/// <summary>
|
||||
/// Ship log entry revealed when viewing this slide
|
||||
/// Ship log fact revealed when viewing this slide
|
||||
/// </summary>
|
||||
public string reveal;
|
||||
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user