mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add flashlight toggle
This commit is contained in:
parent
3231848017
commit
5c3a4943b5
@ -96,6 +96,23 @@ namespace NewHorizons.Builder.Props
|
|||||||
dialogueTree.SetTextXml(text);
|
dialogueTree.SetTextXml(text);
|
||||||
AddTranslation(xml);
|
AddTranslation(xml);
|
||||||
|
|
||||||
|
switch (info.flashlightToggle)
|
||||||
|
{
|
||||||
|
case PropModule.DialogueInfo.FlashlightToggle.TurnOff:
|
||||||
|
dialogueTree._turnOffFlashlight = true;
|
||||||
|
dialogueTree._turnOnFlashlight = false;
|
||||||
|
break;
|
||||||
|
case PropModule.DialogueInfo.FlashlightToggle.TurnOffThenOn:
|
||||||
|
dialogueTree._turnOffFlashlight = true;
|
||||||
|
dialogueTree._turnOnFlashlight = true;
|
||||||
|
break;
|
||||||
|
case PropModule.DialogueInfo.FlashlightToggle.None:
|
||||||
|
default:
|
||||||
|
dialogueTree._turnOffFlashlight = false;
|
||||||
|
dialogueTree._turnOnFlashlight = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
conversationZone.transform.parent = sector?.transform ?? planetGO.transform;
|
conversationZone.transform.parent = sector?.transform ?? planetGO.transform;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(info.pathToAnimController))
|
if (!string.IsNullOrEmpty(info.pathToAnimController))
|
||||||
|
|||||||
12
NewHorizons/External/Modules/PropModule.cs
vendored
12
NewHorizons/External/Modules/PropModule.cs
vendored
@ -445,6 +445,18 @@ namespace NewHorizons.External.Modules
|
|||||||
/// Relative path to the xml file defining the dialogue.
|
/// Relative path to the xml file defining the dialogue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string xmlFile;
|
public string xmlFile;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue("none")] public FlashlightToggle flashlightToggle = FlashlightToggle.None;
|
||||||
|
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum FlashlightToggle
|
||||||
|
{
|
||||||
|
[EnumMember(Value = @"none")] None = -1,
|
||||||
|
[EnumMember(Value = @"turnOff")] TurnOff = 0,
|
||||||
|
[EnumMember(Value = @"turnOffThenOn")] TurnOffThenOn = 1,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonObject]
|
[JsonObject]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user