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
9d245aa1e1
@ -1,3 +1,4 @@
|
|||||||
|
using NewHorizons.Builder.General;
|
||||||
using NewHorizons.External.Configs;
|
using NewHorizons.External.Configs;
|
||||||
using NewHorizons.External.Modules;
|
using NewHorizons.External.Modules;
|
||||||
using NewHorizons.Handlers;
|
using NewHorizons.Handlers;
|
||||||
@ -98,8 +99,9 @@ namespace NewHorizons.Builder.Props
|
|||||||
prop.transform.rotation = go.transform.TransformRotation(rot);
|
prop.transform.rotation = go.transform.TransformRotation(rot);
|
||||||
}
|
}
|
||||||
|
|
||||||
prop.transform.localScale = detail.scale != 0 ? Vector3.one * detail.scale : prefab.transform.localScale;
|
prop.transform.localScale = detail.stretch ?? (detail.scale != 0 ? Vector3.one * detail.scale : prefab.transform.localScale);
|
||||||
|
|
||||||
|
if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector);
|
||||||
prop.SetActive(true);
|
prop.SetActive(true);
|
||||||
|
|
||||||
if (prop == null) return null;
|
if (prop == null) return null;
|
||||||
|
|||||||
@ -116,7 +116,9 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
var id = RemoteHandler.GetPlatformID(info.id);
|
var id = RemoteHandler.GetPlatformID(info.id);
|
||||||
|
|
||||||
var decal = ImageUtilities.GetTexture(mod, info.decalPath, false, false);
|
Texture2D decal = Texture2D.whiteTexture;
|
||||||
|
if (!string.IsNullOrWhiteSpace(info.decalPath)) decal = ImageUtilities.GetTexture(mod, info.decalPath, false, false);
|
||||||
|
else Logger.LogError($"Missing decal path on [{info.id}] for [{go.name}]");
|
||||||
|
|
||||||
if (info.platform != null)
|
if (info.platform != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -69,6 +69,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
var detailInfo = new PropModule.DetailInfo()
|
var detailInfo = new PropModule.DetailInfo()
|
||||||
{
|
{
|
||||||
scale = propInfo.scale,
|
scale = propInfo.scale,
|
||||||
|
stretch = propInfo.stretch,
|
||||||
keepLoaded = propInfo.keepLoaded
|
keepLoaded = propInfo.keepLoaded
|
||||||
};
|
};
|
||||||
var scatterPrefab = DetailBuilder.Make(go, sector, prefab, detailInfo);
|
var scatterPrefab = DetailBuilder.Make(go, sector, prefab, detailInfo);
|
||||||
|
|||||||
@ -46,6 +46,7 @@ namespace NewHorizons.Builder.Volumes
|
|||||||
var owAudioSource = go.AddComponent<OWAudioSource>();
|
var owAudioSource = go.AddComponent<OWAudioSource>();
|
||||||
owAudioSource._audioSource = audioSource;
|
owAudioSource._audioSource = audioSource;
|
||||||
owAudioSource.loop = info.loop;
|
owAudioSource.loop = info.loop;
|
||||||
|
owAudioSource.SetMaxVolume(info.volume);
|
||||||
owAudioSource.SetTrack((OWAudioMixer.TrackName)Enum.Parse(typeof(OWAudioMixer.TrackName), Enum.GetName(typeof(AudioMixerTrackName), info.track)));
|
owAudioSource.SetTrack((OWAudioMixer.TrackName)Enum.Parse(typeof(OWAudioMixer.TrackName), Enum.GetName(typeof(AudioMixerTrackName), info.track)));
|
||||||
AudioUtilities.SetAudioClip(owAudioSource, info.audio, mod);
|
AudioUtilities.SetAudioClip(owAudioSource, info.audio, mod);
|
||||||
|
|
||||||
|
|||||||
12
NewHorizons/External/Modules/PropModule.cs
vendored
12
NewHorizons/External/Modules/PropModule.cs
vendored
@ -123,7 +123,12 @@ namespace NewHorizons.External.Modules
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Scale this prop once it is placed
|
/// Scale this prop once it is placed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float scale = 1f;
|
[DefaultValue(1f)] public float scale = 1f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scale each axis of the prop. Overrides `scale`.
|
||||||
|
/// </summary>
|
||||||
|
public MVector3 stretch;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number used as entropy for scattering the props
|
/// The number used as entropy for scattering the props
|
||||||
@ -200,6 +205,11 @@ namespace NewHorizons.External.Modules
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DefaultValue(1f)] public float scale = 1f;
|
[DefaultValue(1f)] public float scale = 1f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scale each axis of the prop. Overrides `scale`.
|
||||||
|
/// </summary>
|
||||||
|
public MVector3 stretch;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is
|
/// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using Newtonsoft.Json.Converters;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -134,6 +135,13 @@ namespace NewHorizons.External.Modules
|
|||||||
/// Whether to loop this audio while in this audio volume or just play it once
|
/// Whether to loop this audio while in this audio volume or just play it once
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DefaultValue(true)] public bool loop = true;
|
[DefaultValue(true)] public bool loop = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The loudness of the audio
|
||||||
|
/// </summary>
|
||||||
|
[Range(0f, 1f)]
|
||||||
|
[DefaultValue(1f)]
|
||||||
|
public float volume = 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonObject]
|
[JsonObject]
|
||||||
|
|||||||
@ -1049,6 +1049,10 @@
|
|||||||
"format": "float",
|
"format": "float",
|
||||||
"default": 1.0
|
"default": 1.0
|
||||||
},
|
},
|
||||||
|
"stretch": {
|
||||||
|
"description": "Scale each axis of the prop. Overrides `scale`.",
|
||||||
|
"$ref": "#/definitions/MVector3"
|
||||||
|
},
|
||||||
"quantumGroupID": {
|
"quantumGroupID": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is"
|
"description": "If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is"
|
||||||
@ -1372,7 +1376,12 @@
|
|||||||
"scale": {
|
"scale": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"description": "Scale this prop once it is placed",
|
"description": "Scale this prop once it is placed",
|
||||||
"format": "float"
|
"format": "float",
|
||||||
|
"default": 1.0
|
||||||
|
},
|
||||||
|
"stretch": {
|
||||||
|
"description": "Scale each axis of the prop. Overrides `scale`.",
|
||||||
|
"$ref": "#/definitions/MVector3"
|
||||||
},
|
},
|
||||||
"seed": {
|
"seed": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -2501,6 +2510,14 @@
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Whether to loop this audio while in this audio volume or just play it once",
|
"description": "Whether to loop this audio while in this audio volume or just play it once",
|
||||||
"default": true
|
"default": true
|
||||||
|
},
|
||||||
|
"volume": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "The loudness of the audio",
|
||||||
|
"format": "float",
|
||||||
|
"default": 1.0,
|
||||||
|
"maximum": 1.0,
|
||||||
|
"minimum": 0.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Hawkbar, Trifid, Book",
|
"author": "xen, Bwc9876, clay, MegaPiggy, John, Hawkbar, Trifid, Book",
|
||||||
"name": "New Horizons",
|
"name": "New Horizons",
|
||||||
"uniqueName": "xen.NewHorizons",
|
"uniqueName": "xen.NewHorizons",
|
||||||
"version": "1.6.0",
|
"version": "1.6.1",
|
||||||
"owmlVersion": "2.6.0",
|
"owmlVersion": "2.6.0",
|
||||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility" ],
|
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility" ],
|
||||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ],
|
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user