mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
1.18.8 (#782)
## Bug fixes - Default to automatic map mode positioning when mixing manual and automatic (would just break before) - Account for map mode image scale when automatically positioning
This commit is contained in:
commit
3e1de0b511
@ -45,16 +45,16 @@ namespace NewHorizons.Builder.ShipLog
|
||||
}
|
||||
}
|
||||
|
||||
if (flagManualPositionUsed)
|
||||
if (flagAutoPositionUsed)
|
||||
{
|
||||
if (flagAutoPositionUsed && flagManualPositionUsed)
|
||||
NHLogger.LogWarning("Can't mix manual and automatic layout of ship log map mode, defaulting to manual");
|
||||
return ConstructMapModeManual(bodies, transformParent, greyScaleMaterial, currentNav, layer);
|
||||
}
|
||||
else if (flagAutoPositionUsed)
|
||||
{
|
||||
NHLogger.LogWarning("Can't mix manual and automatic layout of ship log map mode, defaulting to automatic");
|
||||
return ConstructMapModeAuto(bodies, transformParent, greyScaleMaterial, layer);
|
||||
}
|
||||
else if (flagManualPositionUsed)
|
||||
{
|
||||
return ConstructMapModeManual(bodies, transformParent, greyScaleMaterial, currentNav, layer);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@ -475,7 +475,12 @@ namespace NewHorizons.Builder.ShipLog
|
||||
|
||||
private static void MakeNode(ref MapModeObject node, GameObject parent, Material greyScaleMaterial, int layer)
|
||||
{
|
||||
const float padding = 100f;
|
||||
// Space between this node and the previous node
|
||||
// Take whatever scale will prevent overlap
|
||||
var lastSiblingScale = node.lastSibling?.mainBody?.Config?.ShipLog?.mapMode?.scale ?? 1f;
|
||||
var scale = node.mainBody?.Config?.ShipLog?.mapMode?.scale ?? 1f;
|
||||
float padding = 100f * (scale + lastSiblingScale) / 2f;
|
||||
|
||||
Vector2 position = Vector2.zero;
|
||||
if (node.lastSibling != null)
|
||||
{
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
#region
|
||||
|
||||
using NewHorizons.Utility.DebugTools.Menu;
|
||||
using NewHorizons.Utility.OWML;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
#endregion
|
||||
@ -26,6 +29,11 @@ namespace NewHorizons.External.SerializableData
|
||||
|
||||
public static implicit operator Vector2(MVector2 vec)
|
||||
{
|
||||
if (vec == null)
|
||||
{
|
||||
NHLogger.LogWarning($"Null MVector2 can't be turned into a non-nullable Vector2, returning Vector2.zero - {Environment.StackTrace}");
|
||||
return Vector2.zero;
|
||||
}
|
||||
return new Vector2(vec.x, vec.y);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/amazingalek/owml/master/schemas/manifest_schema.json",
|
||||
"filename": "NewHorizons.dll",
|
||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
||||
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends",
|
||||
"name": "New Horizons",
|
||||
"uniqueName": "xen.NewHorizons",
|
||||
"version": "1.18.7",
|
||||
"version": "1.18.8",
|
||||
"owmlVersion": "2.9.8",
|
||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user