mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'dev' into eye-of-the-universe
This commit is contained in:
commit
6cf04ec904
@ -28,15 +28,15 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
|
|
||||||
var innerRadius = config.Base.surfaceSize;
|
var innerRadius = config.Base.surfaceSize;
|
||||||
|
|
||||||
GameObject volumesGO = new GameObject("Volumes");
|
var volumesGO = new GameObject("Volumes");
|
||||||
volumesGO.SetActive(false);
|
volumesGO.SetActive(false);
|
||||||
volumesGO.transform.parent = planetGO.transform;
|
volumesGO.transform.parent = planetGO.transform;
|
||||||
|
|
||||||
GameObject rulesetGO = new GameObject("Ruleset");
|
var rulesetGO = new GameObject("Ruleset");
|
||||||
rulesetGO.SetActive(false);
|
rulesetGO.SetActive(false);
|
||||||
rulesetGO.transform.parent = volumesGO.transform;
|
rulesetGO.transform.parent = volumesGO.transform;
|
||||||
|
|
||||||
SphereShape SS = rulesetGO.AddComponent<SphereShape>();
|
var SS = rulesetGO.AddComponent<SphereShape>();
|
||||||
SS.SetCollisionMode(Shape.CollisionMode.Volume);
|
SS.SetCollisionMode(Shape.CollisionMode.Volume);
|
||||||
SS.SetLayer(Shape.Layer.Sector);
|
SS.SetLayer(Shape.Layer.Sector);
|
||||||
SS.layerMask = -1;
|
SS.layerMask = -1;
|
||||||
@ -45,7 +45,7 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
|
|
||||||
rulesetGO.AddComponent<OWTriggerVolume>();
|
rulesetGO.AddComponent<OWTriggerVolume>();
|
||||||
|
|
||||||
PlanetoidRuleset PR = rulesetGO.AddComponent<PlanetoidRuleset>();
|
var PR = rulesetGO.AddComponent<PlanetoidRuleset>();
|
||||||
PR._altitudeFloor = innerRadius;
|
PR._altitudeFloor = innerRadius;
|
||||||
PR._altitudeCeiling = sphereOfInfluence;
|
PR._altitudeCeiling = sphereOfInfluence;
|
||||||
PR._shuttleLandingRadius = sphereOfInfluence;
|
PR._shuttleLandingRadius = sphereOfInfluence;
|
||||||
@ -54,7 +54,7 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
|
|
||||||
rulesetGO.AddComponent<AntiTravelMusicRuleset>();
|
rulesetGO.AddComponent<AntiTravelMusicRuleset>();
|
||||||
|
|
||||||
EffectRuleset ER = rulesetGO.AddComponent<EffectRuleset>();
|
var ER = rulesetGO.AddComponent<EffectRuleset>();
|
||||||
ER._type = EffectRuleset.BubbleType.Underwater;
|
ER._type = EffectRuleset.BubbleType.Underwater;
|
||||||
|
|
||||||
ER._material = _gdMaterial;
|
ER._material = _gdMaterial;
|
||||||
@ -66,32 +66,6 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
}
|
}
|
||||||
ER._cloudMaterial = cloudMaterial;
|
ER._cloudMaterial = cloudMaterial;
|
||||||
|
|
||||||
if (config.Base.zeroGravityRadius != 0)
|
|
||||||
{
|
|
||||||
var zeroGObject = new GameObject("ZeroGVolume");
|
|
||||||
zeroGObject.transform.parent = volumesGO.transform;
|
|
||||||
zeroGObject.transform.localPosition = Vector3.zero;
|
|
||||||
zeroGObject.transform.localScale = Vector3.one * config.Base.zeroGravityRadius;
|
|
||||||
zeroGObject.layer = LayerMask.NameToLayer("BasicEffectVolume");
|
|
||||||
|
|
||||||
var sphereCollider = zeroGObject.AddComponent<SphereCollider>();
|
|
||||||
sphereCollider.radius = 1;
|
|
||||||
sphereCollider.isTrigger = true;
|
|
||||||
|
|
||||||
var owCollider = zeroGObject.AddComponent<OWCollider>();
|
|
||||||
owCollider._parentBody = owrb;
|
|
||||||
owCollider._collider = sphereCollider;
|
|
||||||
|
|
||||||
var triggerVolume = zeroGObject.AddComponent<OWTriggerVolume>();
|
|
||||||
triggerVolume._owCollider = owCollider;
|
|
||||||
|
|
||||||
var zeroGVolume = zeroGObject.AddComponent<ZeroGVolume>();
|
|
||||||
zeroGVolume._attachedBody = owrb;
|
|
||||||
zeroGVolume._triggerVolume = triggerVolume;
|
|
||||||
zeroGVolume._inheritable = true;
|
|
||||||
zeroGVolume._priority = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
volumesGO.transform.position = planetGO.transform.position;
|
volumesGO.transform.position = planetGO.transform.position;
|
||||||
rulesetGO.SetActive(true);
|
rulesetGO.SetActive(true);
|
||||||
volumesGO.SetActive(true);
|
volumesGO.SetActive(true);
|
||||||
|
|||||||
@ -50,7 +50,7 @@ namespace NewHorizons.Builder.General
|
|||||||
gravityVolume._upperSurfaceRadius = config.Base.surfaceSize;
|
gravityVolume._upperSurfaceRadius = config.Base.surfaceSize;
|
||||||
gravityVolume._lowerSurfaceRadius = 0;
|
gravityVolume._lowerSurfaceRadius = 0;
|
||||||
gravityVolume._layer = 3;
|
gravityVolume._layer = 3;
|
||||||
gravityVolume._priority = 0;
|
gravityVolume._priority = config.Base.gravityVolumePriority;
|
||||||
gravityVolume._alignmentPriority = 0;
|
gravityVolume._alignmentPriority = 0;
|
||||||
gravityVolume._surfaceAcceleration = config.Base.surfaceGravity;
|
gravityVolume._surfaceAcceleration = config.Base.surfaceGravity;
|
||||||
gravityVolume._inheritable = false;
|
gravityVolume._inheritable = false;
|
||||||
|
|||||||
@ -21,18 +21,47 @@ namespace NewHorizons.Builder.Props
|
|||||||
var dialogue = MakeConversationZone(go, sector, info, mod.ModHelper);
|
var dialogue = MakeConversationZone(go, sector, info, mod.ModHelper);
|
||||||
|
|
||||||
RemoteDialogueTrigger remoteTrigger = null;
|
RemoteDialogueTrigger remoteTrigger = null;
|
||||||
if (info.remoteTriggerPosition != null || info.remoteTriggerRadius != 0) remoteTrigger = MakeRemoteDialogueTrigger(go, sector, info, dialogue);
|
if (info.remoteTriggerPosition != null || info.remoteTriggerRadius != 0)
|
||||||
|
{
|
||||||
|
remoteTrigger = MakeRemoteDialogueTrigger(go, sector, info, dialogue);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(info.rename))
|
||||||
|
{
|
||||||
|
dialogue.name = info.rename;
|
||||||
|
if (remoteTrigger != null)
|
||||||
|
{
|
||||||
|
remoteTrigger.name = $"{info.rename}_{remoteTrigger.name}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(info.parentPath))
|
||||||
|
{
|
||||||
|
var parent = go.transform.Find(info.parentPath);
|
||||||
|
if (parent != null)
|
||||||
|
{
|
||||||
|
dialogue.transform.parent = parent;
|
||||||
|
if (remoteTrigger != null)
|
||||||
|
{
|
||||||
|
remoteTrigger.transform.parent = parent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Make the character look at the player
|
// Make the character look at the player
|
||||||
// Useful for dialogue replacement
|
// Useful for dialogue replacement
|
||||||
if (!string.IsNullOrEmpty(info.pathToAnimController)) MakePlayerTrackingZone(go, dialogue, info);
|
// Overrides parent path for dialogue
|
||||||
|
if (!string.IsNullOrEmpty(info.pathToAnimController))
|
||||||
|
{
|
||||||
|
MakePlayerTrackingZone(go, dialogue, info);
|
||||||
|
}
|
||||||
|
|
||||||
return (dialogue, remoteTrigger);
|
return (dialogue, remoteTrigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RemoteDialogueTrigger MakeRemoteDialogueTrigger(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, CharacterDialogueTree dialogue)
|
private static RemoteDialogueTrigger MakeRemoteDialogueTrigger(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, CharacterDialogueTree dialogue)
|
||||||
{
|
{
|
||||||
GameObject conversationTrigger = new GameObject("ConversationTrigger");
|
var conversationTrigger = new GameObject("ConversationTrigger");
|
||||||
conversationTrigger.SetActive(false);
|
conversationTrigger.SetActive(false);
|
||||||
|
|
||||||
var remoteDialogueTrigger = conversationTrigger.AddComponent<RemoteDialogueTrigger>();
|
var remoteDialogueTrigger = conversationTrigger.AddComponent<RemoteDialogueTrigger>();
|
||||||
@ -64,7 +93,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
private static CharacterDialogueTree MakeConversationZone(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, IModHelper mod)
|
private static CharacterDialogueTree MakeConversationZone(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, IModHelper mod)
|
||||||
{
|
{
|
||||||
GameObject conversationZone = new GameObject("ConversationZone");
|
var conversationZone = new GameObject("ConversationZone");
|
||||||
conversationZone.SetActive(false);
|
conversationZone.SetActive(false);
|
||||||
|
|
||||||
conversationZone.layer = LayerMask.NameToLayer("Interactible");
|
conversationZone.layer = LayerMask.NameToLayer("Interactible");
|
||||||
@ -88,10 +117,11 @@ namespace NewHorizons.Builder.Props
|
|||||||
var dialogueTree = conversationZone.AddComponent<CharacterDialogueTree>();
|
var dialogueTree = conversationZone.AddComponent<CharacterDialogueTree>();
|
||||||
|
|
||||||
var xml = File.ReadAllText(Path.Combine(mod.Manifest.ModFolderPath, info.xmlFile));
|
var xml = File.ReadAllText(Path.Combine(mod.Manifest.ModFolderPath, info.xmlFile));
|
||||||
var text = new TextAsset(xml);
|
var text = new TextAsset(xml)
|
||||||
|
{
|
||||||
// Text assets need a name to be used with VoiceMod
|
// Text assets need a name to be used with VoiceMod
|
||||||
text.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
name = Path.GetFileNameWithoutExtension(info.xmlFile)
|
||||||
|
};
|
||||||
|
|
||||||
dialogueTree.SetTextXml(text);
|
dialogueTree.SetTextXml(text);
|
||||||
AddTranslation(xml);
|
AddTranslation(xml);
|
||||||
@ -146,7 +176,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
if (info.lookAtRadius > 0)
|
if (info.lookAtRadius > 0)
|
||||||
{
|
{
|
||||||
GameObject playerTrackingZone = new GameObject("PlayerTrackingZone");
|
var playerTrackingZone = new GameObject("PlayerTrackingZone");
|
||||||
playerTrackingZone.SetActive(false);
|
playerTrackingZone.SetActive(false);
|
||||||
|
|
||||||
playerTrackingZone.layer = LayerMask.NameToLayer("BasicEffectVolume");
|
playerTrackingZone.layer = LayerMask.NameToLayer("BasicEffectVolume");
|
||||||
@ -194,22 +224,22 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
private static void AddTranslation(string xml)
|
private static void AddTranslation(string xml)
|
||||||
{
|
{
|
||||||
XmlDocument xmlDocument = new XmlDocument();
|
var xmlDocument = new XmlDocument();
|
||||||
xmlDocument.LoadXml(xml);
|
xmlDocument.LoadXml(xml);
|
||||||
XmlNode xmlNode = xmlDocument.SelectSingleNode("DialogueTree");
|
var xmlNode = xmlDocument.SelectSingleNode("DialogueTree");
|
||||||
XmlNodeList xmlNodeList = xmlNode.SelectNodes("DialogueNode");
|
var xmlNodeList = xmlNode.SelectNodes("DialogueNode");
|
||||||
string characterName = xmlNode.SelectSingleNode("NameField").InnerText;
|
string characterName = xmlNode.SelectSingleNode("NameField").InnerText;
|
||||||
TranslationHandler.AddDialogue(characterName);
|
TranslationHandler.AddDialogue(characterName);
|
||||||
|
|
||||||
foreach (object obj in xmlNodeList)
|
foreach (object obj in xmlNodeList)
|
||||||
{
|
{
|
||||||
XmlNode xmlNode2 = (XmlNode)obj;
|
var xmlNode2 = (XmlNode)obj;
|
||||||
var name = xmlNode2.SelectSingleNode("Name").InnerText;
|
var name = xmlNode2.SelectSingleNode("Name").InnerText;
|
||||||
|
|
||||||
XmlNodeList xmlText = xmlNode2.SelectNodes("Dialogue/Page");
|
var xmlText = xmlNode2.SelectNodes("Dialogue/Page");
|
||||||
foreach (object page in xmlText)
|
foreach (object page in xmlText)
|
||||||
{
|
{
|
||||||
XmlNode pageData = (XmlNode)page;
|
var pageData = (XmlNode)page;
|
||||||
var text = pageData.InnerText;
|
var text = pageData.InnerText;
|
||||||
// The text is trimmed in DialogueText constructor (_listTextBlocks), so we also need to trim it for the key
|
// The text is trimmed in DialogueText constructor (_listTextBlocks), so we also need to trim it for the key
|
||||||
TranslationHandler.AddDialogue(text, true, name);
|
TranslationHandler.AddDialogue(text, true, name);
|
||||||
@ -218,7 +248,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
xmlText = xmlNode2.SelectNodes("DialogueOptionsList/DialogueOption/Text");
|
xmlText = xmlNode2.SelectNodes("DialogueOptionsList/DialogueOption/Text");
|
||||||
foreach (object option in xmlText)
|
foreach (object option in xmlText)
|
||||||
{
|
{
|
||||||
XmlNode optionData = (XmlNode)option;
|
var optionData = (XmlNode)option;
|
||||||
var text = optionData.InnerText;
|
var text = optionData.InnerText;
|
||||||
// The text is trimmed in CharacterDialogueTree.LoadXml, so we also need to trim it for the key
|
// The text is trimmed in CharacterDialogueTree.LoadXml, so we also need to trim it for the key
|
||||||
TranslationHandler.AddDialogue(text, true, characterName, name);
|
TranslationHandler.AddDialogue(text, true, characterName, name);
|
||||||
|
|||||||
@ -170,8 +170,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
slideCollectionContainer.slideCollection = slideCollection;
|
slideCollectionContainer.slideCollection = slideCollection;
|
||||||
|
|
||||||
// Idk why but it wants reveals to be comma delimited not a list
|
LinkShipLogFacts(info, slideCollectionContainer);
|
||||||
if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals);
|
|
||||||
|
|
||||||
StreamingHandler.SetUpStreaming(slideReelObj, sector);
|
StreamingHandler.SetUpStreaming(slideReelObj, sector);
|
||||||
|
|
||||||
@ -284,8 +283,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
target.slideCollection = g.AddComponent<MindSlideCollection>();
|
target.slideCollection = g.AddComponent<MindSlideCollection>();
|
||||||
target.slideCollection._slideCollectionContainer = slideCollectionContainer;
|
target.slideCollection._slideCollectionContainer = slideCollectionContainer;
|
||||||
|
|
||||||
// Idk why but it wants reveals to be comma delimited not a list
|
LinkShipLogFacts(info, slideCollectionContainer);
|
||||||
if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals);
|
|
||||||
|
|
||||||
g.SetActive(true);
|
g.SetActive(true);
|
||||||
|
|
||||||
@ -370,7 +368,8 @@ namespace NewHorizons.Builder.Props
|
|||||||
var mindSlideCollection = standingTorch.AddComponent<MindSlideCollection>();
|
var mindSlideCollection = standingTorch.AddComponent<MindSlideCollection>();
|
||||||
mindSlideCollection._slideCollectionContainer = slideCollectionContainer;
|
mindSlideCollection._slideCollectionContainer = slideCollectionContainer;
|
||||||
|
|
||||||
// Make sure that these slides play when the player wanders into the beam
|
LinkShipLogFacts(info, slideCollectionContainer);
|
||||||
|
|
||||||
mindSlideProjector.SetMindSlideCollection(mindSlideCollection);
|
mindSlideProjector.SetMindSlideCollection(mindSlideCollection);
|
||||||
|
|
||||||
standingTorch.SetActive(true);
|
standingTorch.SetActive(true);
|
||||||
@ -450,6 +449,14 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
Slide.WriteModules(modules, ref slide._modulesList, ref slide._modulesData, ref slide.lengths);
|
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
|
public class VisionTorchTarget : MonoBehaviour
|
||||||
|
|||||||
17
NewHorizons/Builder/Volumes/PriorityVolumeBuilder.cs
Normal file
17
NewHorizons/Builder/Volumes/PriorityVolumeBuilder.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using NewHorizons.External.Modules;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace NewHorizons.Builder.Volumes
|
||||||
|
{
|
||||||
|
public static class PriorityVolumeBuilder
|
||||||
|
{
|
||||||
|
public static TVolume Make<TVolume>(GameObject planetGO, Sector sector, VolumesModule.PriorityVolumeInfo info) where TVolume : PriorityVolume
|
||||||
|
{
|
||||||
|
var volume = VolumeBuilder.Make<TVolume>(planetGO, sector, info);
|
||||||
|
|
||||||
|
volume.SetPriority(info.priority);
|
||||||
|
|
||||||
|
return volume;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -78,6 +78,13 @@ namespace NewHorizons.Builder.Volumes
|
|||||||
VolumeBuilder.Make<InsulatingVolume>(go, sector, insulatingVolume);
|
VolumeBuilder.Make<InsulatingVolume>(go, sector, insulatingVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (config.Volumes.zeroGravityVolumes != null)
|
||||||
|
{
|
||||||
|
foreach (var zeroGravityVolume in config.Volumes.zeroGravityVolumes)
|
||||||
|
{
|
||||||
|
ZeroGVolumeBuilder.Make(go, sector, zeroGravityVolume);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
NewHorizons/Builder/Volumes/ZeroGVolumeBuilder.cs
Normal file
17
NewHorizons/Builder/Volumes/ZeroGVolumeBuilder.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using NewHorizons.External.Modules;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace NewHorizons.Builder.Volumes
|
||||||
|
{
|
||||||
|
public static class ZeroGVolumeBuilder
|
||||||
|
{
|
||||||
|
public static ZeroGVolume Make(GameObject planetGO, Sector sector, VolumesModule.PriorityVolumeInfo info)
|
||||||
|
{
|
||||||
|
var volume = PriorityVolumeBuilder.Make<ZeroGVolume>(planetGO, sector, info);
|
||||||
|
|
||||||
|
volume._inheritable = true;
|
||||||
|
|
||||||
|
return volume;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
NewHorizons/External/Configs/PlanetConfig.cs
vendored
14
NewHorizons/External/Configs/PlanetConfig.cs
vendored
@ -416,6 +416,20 @@ namespace NewHorizons.External.Configs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Base.zeroGravityRadius != 0f)
|
||||||
|
{
|
||||||
|
Volumes ??= new VolumesModule();
|
||||||
|
Volumes.zeroGravityVolumes ??= new VolumesModule.PriorityVolumeInfo[0];
|
||||||
|
|
||||||
|
Volumes.zeroGravityVolumes = Volumes.zeroGravityVolumes.Append(new VolumesModule.PriorityVolumeInfo()
|
||||||
|
{
|
||||||
|
priority = 1,
|
||||||
|
rename = "ZeroGVolume",
|
||||||
|
radius = Base.zeroGravityRadius,
|
||||||
|
parentPath = "Volumes"
|
||||||
|
}).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
// So that old mods still have shock effects
|
// So that old mods still have shock effects
|
||||||
if (ShockEffect == null && Star == null && name != "Sun" && name != "EyeOfTheUniverse" && FocalPoint == null)
|
if (ShockEffect == null && Star == null && name != "Sun" && name != "EyeOfTheUniverse" && FocalPoint == null)
|
||||||
{
|
{
|
||||||
|
|||||||
7
NewHorizons/External/Modules/BaseModule.cs
vendored
7
NewHorizons/External/Modules/BaseModule.cs
vendored
@ -82,9 +82,9 @@ namespace NewHorizons.External.Modules
|
|||||||
public float surfaceSize;
|
public float surfaceSize;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Radius of the zero gravity volume. This will make it so no gravity from any planet will affect you. Useful for satellites.
|
/// Optional. You can force this planet's gravity to be felt over other gravity/zero-gravity sources by increasing this number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float zeroGravityRadius;
|
public int gravityVolumePriority;
|
||||||
|
|
||||||
#region Obsolete
|
#region Obsolete
|
||||||
|
|
||||||
@ -115,6 +115,9 @@ namespace NewHorizons.External.Modules
|
|||||||
[Obsolete("SphereOfInfluence is deprecated, please use soiOverride instead")]
|
[Obsolete("SphereOfInfluence is deprecated, please use soiOverride instead")]
|
||||||
public float sphereOfInfluence;
|
public float sphereOfInfluence;
|
||||||
|
|
||||||
|
[Obsolete("zeroGravityRadius is deprecated, please use Volumes->ZeroGravityVolumes instead")]
|
||||||
|
public float zeroGravityRadius;
|
||||||
|
|
||||||
#endregion Obsolete
|
#endregion Obsolete
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
22
NewHorizons/External/Modules/PropModule.cs
vendored
22
NewHorizons/External/Modules/PropModule.cs
vendored
@ -450,6 +450,16 @@ 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>
|
||||||
|
/// Optionally rename the dialogue object. The remote trigger volume will be renamed to have this as a prefix.
|
||||||
|
/// </summary>
|
||||||
|
public string rename;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optionally set the parent object that the dialogue and remote trigger will be attached to
|
||||||
|
/// </summary>
|
||||||
|
public string parentPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonObject]
|
[JsonObject]
|
||||||
@ -617,10 +627,18 @@ namespace NewHorizons.External.Modules
|
|||||||
public MVector3 position;
|
public MVector3 position;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ship log entries revealed after finishing this slide reel.
|
/// The ship log facts revealed after finishing this slide reel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string[] reveals;
|
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>
|
/// <summary>
|
||||||
/// The rotation of this slideshow.
|
/// The rotation of this slideshow.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -712,7 +730,7 @@ namespace NewHorizons.External.Modules
|
|||||||
// SlideShipLogEntryModule
|
// SlideShipLogEntryModule
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ship log entry revealed when viewing this slide
|
/// Ship log fact revealed when viewing this slide
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string reveal;
|
public string reveal;
|
||||||
|
|
||||||
|
|||||||
17
NewHorizons/External/Modules/VolumesModule.cs
vendored
17
NewHorizons/External/Modules/VolumesModule.cs
vendored
@ -55,6 +55,12 @@ namespace NewHorizons.External.Modules
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public VolumeInfo[] reverbVolumes;
|
public VolumeInfo[] reverbVolumes;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add zero-gravity volumes to this planet.
|
||||||
|
/// Good for surrounding planets which are using a static position to stop the player being pulled away.
|
||||||
|
/// </summary>
|
||||||
|
public PriorityVolumeInfo[] zeroGravityVolumes;
|
||||||
|
|
||||||
[JsonObject]
|
[JsonObject]
|
||||||
public class VolumeInfo
|
public class VolumeInfo
|
||||||
{
|
{
|
||||||
@ -79,6 +85,17 @@ namespace NewHorizons.External.Modules
|
|||||||
public string rename;
|
public string rename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonObject]
|
||||||
|
public class PriorityVolumeInfo : VolumeInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The priority for this volume's effects to be applied.
|
||||||
|
/// Ex, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue(1)]
|
||||||
|
public int priority = 1;
|
||||||
|
}
|
||||||
|
|
||||||
[JsonObject]
|
[JsonObject]
|
||||||
public class RevealVolumeInfo : VolumeInfo
|
public class RevealVolumeInfo : VolumeInfo
|
||||||
{
|
{
|
||||||
|
|||||||
@ -497,10 +497,10 @@
|
|||||||
"description": "A scale height used for a number of things. Should be the approximate radius of the body.",
|
"description": "A scale height used for a number of things. Should be the approximate radius of the body.",
|
||||||
"format": "float"
|
"format": "float"
|
||||||
},
|
},
|
||||||
"zeroGravityRadius": {
|
"gravityVolumePriority": {
|
||||||
"type": "number",
|
"type": "integer",
|
||||||
"description": "Radius of the zero gravity volume. This will make it so no gravity from any planet will affect you. Useful for satellites.",
|
"description": "Optional. You can force this planet's gravity to be felt over other gravity/zero-gravity sources by increasing this number.",
|
||||||
"format": "float"
|
"format": "int32"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1105,6 +1105,14 @@
|
|||||||
"xmlFile": {
|
"xmlFile": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Relative path to the xml file defining the dialogue."
|
"description": "Relative path to the xml file defining the dialogue."
|
||||||
|
},
|
||||||
|
"rename": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Optionally rename the dialogue object. The remote trigger volume will be renamed to have this as a prefix."
|
||||||
|
},
|
||||||
|
"parentPath": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Optionally set the parent object that the dialogue and remote trigger will be attached to"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1425,7 +1433,14 @@
|
|||||||
},
|
},
|
||||||
"reveals": {
|
"reveals": {
|
||||||
"type": "array",
|
"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": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1504,7 +1519,7 @@
|
|||||||
},
|
},
|
||||||
"reveal": {
|
"reveal": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Ship log entry revealed when viewing this slide"
|
"description": "Ship log fact revealed when viewing this slide"
|
||||||
},
|
},
|
||||||
"spotIntensityMod": {
|
"spotIntensityMod": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
@ -2473,6 +2488,13 @@
|
|||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/VolumeInfo"
|
"$ref": "#/definitions/VolumeInfo"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"zeroGravityVolumes": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Add zero-gravity volumes to this planet. \nGood for surrounding planets which are using a static position to stop the player being pulled away.",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PriorityVolumeInfo"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2794,6 +2816,35 @@
|
|||||||
"observe",
|
"observe",
|
||||||
"snapshot"
|
"snapshot"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"PriorityVolumeInfo": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"position": {
|
||||||
|
"description": "The location of this volume. Optional (will default to 0,0,0).",
|
||||||
|
"$ref": "#/definitions/MVector3"
|
||||||
|
},
|
||||||
|
"radius": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "The radius of this volume.",
|
||||||
|
"format": "float"
|
||||||
|
},
|
||||||
|
"parentPath": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)."
|
||||||
|
},
|
||||||
|
"rename": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "An optional rename of this volume."
|
||||||
|
},
|
||||||
|
"priority": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The priority for this volume's effects to be applied. \nEx, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.",
|
||||||
|
"format": "int32",
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"$docs": {
|
"$docs": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user