mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'dev' of https://github.com/xen-42/outer-wilds-new-horizons into dev
This commit is contained in:
commit
2e49a1df23
@ -150,7 +150,8 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
image = ImageUtilities.GetTexture(mod, atmo.clouds.texturePath);
|
// qm cloud type = should wrap, otherwise clamp like normal
|
||||||
|
image = ImageUtilities.GetTexture(mod, atmo.clouds.texturePath, wrap: atmo.clouds.cloudsPrefab == CloudPrefabType.QuantumMoon);
|
||||||
|
|
||||||
if (atmo.clouds.capPath == null) cap = ImageUtilities.ClearTexture(128, 128);
|
if (atmo.clouds.capPath == null) cap = ImageUtilities.ClearTexture(128, 128);
|
||||||
else cap = ImageUtilities.GetTexture(mod, atmo.clouds.capPath);
|
else cap = ImageUtilities.GetTexture(mod, atmo.clouds.capPath);
|
||||||
|
|||||||
@ -20,7 +20,7 @@ namespace NewHorizons.Utility
|
|||||||
return _loadedTextures.ContainsKey(path);
|
return _loadedTextures.ContainsKey(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Texture2D GetTexture(IModBehaviour mod, string filename, bool useMipmaps = true)
|
public static Texture2D GetTexture(IModBehaviour mod, string filename, bool useMipmaps = true, bool wrap = false)
|
||||||
{
|
{
|
||||||
// Copied from OWML but without the print statement lol
|
// Copied from OWML but without the print statement lol
|
||||||
var path = mod.ModHelper.Manifest.ModFolderPath + filename;
|
var path = mod.ModHelper.Manifest.ModFolderPath + filename;
|
||||||
@ -36,7 +36,7 @@ namespace NewHorizons.Utility
|
|||||||
var data = File.ReadAllBytes(path);
|
var data = File.ReadAllBytes(path);
|
||||||
var texture = new Texture2D(2, 2, TextureFormat.RGBA32, useMipmaps);
|
var texture = new Texture2D(2, 2, TextureFormat.RGBA32, useMipmaps);
|
||||||
texture.name = Path.GetFileNameWithoutExtension(path);
|
texture.name = Path.GetFileNameWithoutExtension(path);
|
||||||
texture.wrapMode = TextureWrapMode.Clamp; // this is apparently repeat by default
|
texture.wrapMode = wrap ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
|
||||||
texture.LoadImage(data);
|
texture.LoadImage(data);
|
||||||
_loadedTextures.Add(path, texture);
|
_loadedTextures.Add(path, texture);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user