Merge branch 'dev' into eye-of-the-universe

This commit is contained in:
Noah Pilarski 2022-10-08 15:51:40 -04:00
commit 1af6a0323f
3 changed files with 16 additions and 1 deletions

View File

@ -67,6 +67,7 @@ namespace NewHorizons.Builder.General
return null;
}
rfGO.SetActive(true);
return rfGO;
}
}

View File

@ -70,10 +70,14 @@ namespace NewHorizons.Builder.Props
StreamingHandler.SetUpStreaming(prop, sector);
// Could check this in the for loop but I'm not sure what order we need to know about this in
var isTorch = prop.GetComponent<VisionTorchItem>() != null;
var isItem = false;
foreach (var component in prop.GetComponentsInChildren<Component>(true))
{
if (component.gameObject == prop && component is OWItem) isItem = true;
if (sector == null)
{
if (FixUnsectoredComponent(component)) continue;
@ -83,6 +87,9 @@ namespace NewHorizons.Builder.Props
FixComponent(component, go);
}
// Items shouldn't use these else they get weird
if (isItem) detail.keepLoaded = true;
prop.transform.position = detail.position == null ? go.transform.position : go.transform.TransformPoint(detail.position);
Quaternion rot = detail.rotation == null ? Quaternion.identity : Quaternion.Euler(detail.rotation);
@ -156,6 +163,13 @@ namespace NewHorizons.Builder.Props
}
}
if (isItem)
{
// Else when you put them down you can't pick them back up
var col = prop.GetComponent<OWCollider>();
if (col != null) col._physicsRemoved = false;
}
if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector);
prop.SetActive(true);

View File

@ -4,7 +4,7 @@
"author": "xen, Bwc9876, clay, MegaPiggy, John, Hawkbar, Trifid, Book",
"name": "New Horizons",
"uniqueName": "xen.NewHorizons",
"version": "1.6.2",
"version": "1.6.4",
"owmlVersion": "2.7.2",
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ],