mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Set dialogue for TravelerEyeControllers
This commit is contained in:
parent
2511ca2a1f
commit
6dba33f256
@ -161,6 +161,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
var nomaiController = character.GetComponent<SolanumAnimController>();
|
var nomaiController = character.GetComponent<SolanumAnimController>();
|
||||||
var controller = character.GetComponent<CharacterAnimController>();
|
var controller = character.GetComponent<CharacterAnimController>();
|
||||||
var traveler = character.GetComponent<TravelerController>();
|
var traveler = character.GetComponent<TravelerController>();
|
||||||
|
var travelerEye = character.GetComponent<TravelerEyeController>();
|
||||||
|
|
||||||
var lookOnlyWhenTalking = info.lookAtRadius <= 0;
|
var lookOnlyWhenTalking = info.lookAtRadius <= 0;
|
||||||
|
|
||||||
@ -190,6 +191,18 @@ namespace NewHorizons.Builder.Props
|
|||||||
traveler._dialogueSystem.OnStartConversation += traveler.OnStartConversation;
|
traveler._dialogueSystem.OnStartConversation += traveler.OnStartConversation;
|
||||||
traveler._dialogueSystem.OnEndConversation += traveler.OnEndConversation;
|
traveler._dialogueSystem.OnEndConversation += traveler.OnEndConversation;
|
||||||
}
|
}
|
||||||
|
else if (travelerEye != null)
|
||||||
|
{
|
||||||
|
if (travelerEye._dialogueTree != null)
|
||||||
|
{
|
||||||
|
travelerEye._dialogueTree.OnStartConversation -= travelerEye.OnStartConversation;
|
||||||
|
travelerEye._dialogueTree.OnEndConversation -= travelerEye.OnEndConversation;
|
||||||
|
}
|
||||||
|
|
||||||
|
travelerEye._dialogueTree = dialogue;
|
||||||
|
travelerEye._dialogueTree.OnStartConversation += travelerEye.OnStartConversation;
|
||||||
|
travelerEye._dialogueTree.OnEndConversation += travelerEye.OnEndConversation;
|
||||||
|
}
|
||||||
else if (nomaiController != null)
|
else if (nomaiController != null)
|
||||||
{
|
{
|
||||||
if (lookOnlyWhenTalking)
|
if (lookOnlyWhenTalking)
|
||||||
|
|||||||
2
NewHorizons/External/Modules/PropModule.cs
vendored
2
NewHorizons/External/Modules/PropModule.cs
vendored
@ -421,7 +421,7 @@ namespace NewHorizons.External.Modules
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this dialogue is meant for a character, this is the relative path from the planet to that character's
|
/// If this dialogue is meant for a character, this is the relative path from the planet to that character's
|
||||||
/// CharacterAnimController, TravelerController, or SolanumAnimController.
|
/// CharacterAnimController, TravelerController, TravelerEyeController (eye of the universe), or SolanumAnimController.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string pathToAnimController;
|
public string pathToAnimController;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user