mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Set dialogue for TravelerControllers
This commit is contained in:
parent
81255a5e1e
commit
5581a71727
@ -160,14 +160,35 @@ namespace NewHorizons.Builder.Props
|
||||
// At most one of these should ever not be null
|
||||
var nomaiController = character.GetComponent<SolanumAnimController>();
|
||||
var controller = character.GetComponent<CharacterAnimController>();
|
||||
var traveler = character.GetComponent<TravelerController>();
|
||||
|
||||
var lookOnlyWhenTalking = info.lookAtRadius <= 0;
|
||||
|
||||
// To have them look when you start talking
|
||||
if (controller != null)
|
||||
{
|
||||
if (controller._dialogueTree != null)
|
||||
{
|
||||
controller._dialogueTree.OnStartConversation -= controller.OnStartConversation;
|
||||
controller._dialogueTree.OnEndConversation -= controller.OnEndConversation;
|
||||
}
|
||||
|
||||
controller._dialogueTree = dialogue;
|
||||
controller.lookOnlyWhenTalking = lookOnlyWhenTalking;
|
||||
controller._dialogueTree.OnStartConversation += controller.OnStartConversation;
|
||||
controller._dialogueTree.OnEndConversation += controller.OnEndConversation;
|
||||
}
|
||||
else if (traveler != null)
|
||||
{
|
||||
if (traveler._dialogueSystem != null)
|
||||
{
|
||||
traveler._dialogueSystem.OnStartConversation -= traveler.OnStartConversation;
|
||||
traveler._dialogueSystem.OnEndConversation -= traveler.OnEndConversation;
|
||||
}
|
||||
|
||||
traveler._dialogueSystem = dialogue;
|
||||
traveler._dialogueSystem.OnStartConversation += traveler.OnStartConversation;
|
||||
traveler._dialogueSystem.OnEndConversation += traveler.OnEndConversation;
|
||||
}
|
||||
else if (nomaiController != null)
|
||||
{
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
using NewHorizons.OtherMods.AchievementsPlus;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using OWML.Utils;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
using OWML.Utils;
|
||||
|
||||
namespace NewHorizons.Builder.Props
|
||||
{
|
||||
|
||||
2
NewHorizons/External/Modules/PropModule.cs
vendored
2
NewHorizons/External/Modules/PropModule.cs
vendored
@ -421,7 +421,7 @@ namespace NewHorizons.External.Modules
|
||||
|
||||
/// <summary>
|
||||
/// If this dialogue is meant for a character, this is the relative path from the planet to that character's
|
||||
/// CharacterAnimController or SolanumAnimController.
|
||||
/// CharacterAnimController, TavelerController, or SolanumAnimController.
|
||||
/// </summary>
|
||||
public string pathToAnimController;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user