mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
fixed stranger arcs and removed debug logs
This commit is contained in:
parent
bf2043a80b
commit
104ff288d6
@ -125,8 +125,8 @@ namespace NewHorizons.Builder.Props
|
|||||||
skeletonScale = new Vector2(1, 1),
|
skeletonScale = new Vector2(1, 1),
|
||||||
numSkeletonPoints = 17,
|
numSkeletonPoints = 17,
|
||||||
|
|
||||||
innerWidth = 1,
|
innerWidth = 0.75f,
|
||||||
outerWidth = 1,
|
outerWidth = 0.75f,
|
||||||
uvScale = 1f/1.8505f,
|
uvScale = 1f/1.8505f,
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -646,11 +646,6 @@ namespace NewHorizons.Builder.Props
|
|||||||
if (nhBody.Cache?.ContainsKey(cacheKey) ?? false)
|
if (nhBody.Cache?.ContainsKey(cacheKey) ?? false)
|
||||||
cachedData = nhBody.Cache.Get<ArcCacheData[]>(cacheKey);
|
cachedData = nhBody.Cache.Get<ArcCacheData[]>(cacheKey);
|
||||||
|
|
||||||
Logger.LogWarning("CACHE DEBUG: cache key *" + cacheKey+"*");
|
|
||||||
Logger.LogWarning("CACHE DEBUG: cache is null? " + (nhBody.Cache == null));
|
|
||||||
Logger.LogWarning("CACHE DEBUG: cache contains key? " + (nhBody.Cache?.ContainsKey(cacheKey) ?? false));
|
|
||||||
//Logger.LogWarning("CACHE DEBUG: cache keys: " + String.Join(",", nhBody.Cache?.Keys));
|
|
||||||
|
|
||||||
var arranger = nomaiWallText.gameObject.AddComponent<NomaiTextArcArranger>();
|
var arranger = nomaiWallText.gameObject.AddComponent<NomaiTextArcArranger>();
|
||||||
|
|
||||||
// Generate spiral meshes/GOs
|
// Generate spiral meshes/GOs
|
||||||
@ -667,8 +662,6 @@ namespace NewHorizons.Builder.Props
|
|||||||
GameObject arcReadFromCache = null;
|
GameObject arcReadFromCache = null;
|
||||||
if (cachedData != null)
|
if (cachedData != null)
|
||||||
{
|
{
|
||||||
Logger.LogWarning("CACHE DEBUG: cache was not null, loading meshes and positions");
|
|
||||||
|
|
||||||
var skeletonPoints = cachedData[i].skeletonPoints.Select(mv => (Vector3)mv).ToArray();
|
var skeletonPoints = cachedData[i].skeletonPoints.Select(mv => (Vector3)mv).ToArray();
|
||||||
arcReadFromCache = NomaiTextArcBuilder.BuildSpiralGameObject(skeletonPoints, cachedData[i].mesh);
|
arcReadFromCache = NomaiTextArcBuilder.BuildSpiralGameObject(skeletonPoints, cachedData[i].mesh);
|
||||||
arcReadFromCache.transform.parent = arranger.transform;
|
arcReadFromCache.transform.parent = arranger.transform;
|
||||||
@ -688,7 +681,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
// no need to arrange if the cache exists
|
// no need to arrange if the cache exists
|
||||||
if (cachedData == null)
|
if (cachedData == null)
|
||||||
{
|
{
|
||||||
Logger.LogWarning("CACHE DEBUG: cache was null, proceding with arrangment");
|
Logger.LogVerbose("Cache and/or cache entry was null, proceding with wall text arc arrangment.");
|
||||||
|
|
||||||
// auto placement
|
// auto placement
|
||||||
|
|
||||||
@ -779,6 +772,34 @@ namespace NewHorizons.Builder.Props
|
|||||||
arc.GetComponent<NomaiTextLine>().SetEntryID(textEntryID);
|
arc.GetComponent<NomaiTextLine>().SetEntryID(textEntryID);
|
||||||
arc.GetComponent<MeshRenderer>().enabled = false;
|
arc.GetComponent<MeshRenderer>().enabled = false;
|
||||||
|
|
||||||
|
if (type == PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger && _ghostArcMaterial != null)
|
||||||
|
{
|
||||||
|
// curse you jank!!
|
||||||
|
var meshFilter = arc.GetComponent<MeshFilter>();
|
||||||
|
Vector3 rectangularRadius = meshFilter.sharedMesh.bounds.extents;
|
||||||
|
MVector3[] verts = new MVector3[] {
|
||||||
|
new Vector3(-rectangularRadius.x, 0, 0),
|
||||||
|
new Vector3( rectangularRadius.x, 0, 0),
|
||||||
|
new Vector3(-rectangularRadius.x, 2*rectangularRadius.y, 0),
|
||||||
|
new Vector3( rectangularRadius.x, 2*rectangularRadius.y, 0),
|
||||||
|
};
|
||||||
|
int[] triangles = new int[] {
|
||||||
|
0, 1, 2,
|
||||||
|
1, 3, 2,
|
||||||
|
};
|
||||||
|
MVector3[] normals = new MVector3[verts.Length];
|
||||||
|
for (int i = 0; i<verts.Length; i++) normals[i] = new Vector3(0, 0, 1);
|
||||||
|
MVector2[] uv = new MVector2[] {
|
||||||
|
new Vector2(0, 0), new Vector2(0, 1),
|
||||||
|
new Vector2(1, 0), new Vector2(1, 1),
|
||||||
|
};
|
||||||
|
MVector2[] uv2 = new MVector2[] {
|
||||||
|
new Vector2(0, 0), new Vector2(0, 1),
|
||||||
|
new Vector2(1, 0), new Vector2(1, 1),
|
||||||
|
};
|
||||||
|
arc.GetComponent<MeshFilter>().sharedMesh = new MMesh(verts, triangles, normals, uv, uv2);
|
||||||
|
}
|
||||||
|
|
||||||
arc.SetActive(true);
|
arc.SetActive(true);
|
||||||
|
|
||||||
if (arcInfo != null) arcInfoToCorrespondingSpawnedGameObject[arcInfo] = arc;
|
if (arcInfo != null) arcInfoToCorrespondingSpawnedGameObject[arcInfo] = arc;
|
||||||
|
|||||||
@ -13,8 +13,6 @@ namespace NewHorizons.Utility
|
|||||||
Mod = mod;
|
Mod = mod;
|
||||||
RelativePath = relativePath;
|
RelativePath = relativePath;
|
||||||
|
|
||||||
Logger.LogWarning("CACHE DEBUG: NHBODY CONSTRUCTOR: " + config.name + " - *" + relativePath+"*");
|
|
||||||
|
|
||||||
Migrate();
|
Migrate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user