diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 7ee56bad..e96b51dc 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -142,6 +142,13 @@ namespace NewHorizons.Builder.Props FixSectoredComponent(component, sector, existingSectors, detail.keepLoaded); } + // Asset bundle is a real string -> Object loaded from unity + // If they're adding dialogue we have to manually register the xml text + if (!string.IsNullOrEmpty(detail.assetBundle) && component is CharacterDialogueTree dialogue) + { + DialogueBuilder.AddTranslation(dialogue._xmlCharacterDialogueAsset.text, null); + } + FixComponent(component, go, detail.ignoreSun); } catch(Exception e) @@ -296,17 +303,6 @@ namespace NewHorizons.Builder.Props s.SetParentSector(sector); } - else if (component is SectorCullGroup sectorCullGroup) - { - sectorCullGroup._controllingProxy = null; - - // fixes sector cull group deactivating renderers on map view enter and fast foward - // TODO: does this actually work? what? how? - sectorCullGroup._inMapView = false; - sectorCullGroup._isFastForwarding = false; - sectorCullGroup.SetVisible(sectorCullGroup.ShouldBeVisible(), true, false); - } - else if(component is SectoredMonoBehaviour behaviour && !existingSectors.Contains(behaviour._sector)) { // not using SetSector here because it registers the events twice diff --git a/NewHorizons/Builder/Props/DialogueBuilder.cs b/NewHorizons/Builder/Props/DialogueBuilder.cs index ca6ceadb..4daabe4a 100644 --- a/NewHorizons/Builder/Props/DialogueBuilder.cs +++ b/NewHorizons/Builder/Props/DialogueBuilder.cs @@ -376,7 +376,7 @@ namespace NewHorizons.Builder.Props } } - private static void AddTranslation(string xml, string characterName = null) + public static void AddTranslation(string xml, string characterName = null) { var xmlDocument = new XmlDocument(); xmlDocument.LoadXml(xml); diff --git a/NewHorizons/External/Modules/Props/DetailInfo.cs b/NewHorizons/External/Modules/Props/DetailInfo.cs index d9654562..171f1b64 100644 --- a/NewHorizons/External/Modules/Props/DetailInfo.cs +++ b/NewHorizons/External/Modules/Props/DetailInfo.cs @@ -54,7 +54,9 @@ namespace NewHorizons.External.Modules.Props public string quantumGroupID; /// - /// Should this detail stay loaded even if you're outside the sector (good for very large props) + /// Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)? + /// Also makes this detail visible on the map. + /// Most logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided. /// public bool keepLoaded; diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index b5eb711c..d6356f75 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -1342,7 +1342,7 @@ }, "keepLoaded": { "type": "boolean", - "description": "Should this detail stay loaded even if you're outside the sector (good for very large props)" + "description": "Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)?\nAlso makes this detail visible on the map.\nMost logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided." }, "hasPhysics": { "type": "boolean", diff --git a/NewHorizons/Utility/Files/ImageUtilities.cs b/NewHorizons/Utility/Files/ImageUtilities.cs index 99772e60..ea0ceaf6 100644 --- a/NewHorizons/Utility/Files/ImageUtilities.cs +++ b/NewHorizons/Utility/Files/ImageUtilities.cs @@ -95,6 +95,10 @@ namespace NewHorizons.Utility.Files _textureCache.Clear(); } + /// + /// used specifically for projected slides. + /// also adds a border (to prevent weird visual bug) and makes the texture linear (otherwise the projected image is too bright). + /// public static Texture2D Invert(Texture2D texture) { var key = $"{texture.name} > invert"; @@ -122,7 +126,7 @@ namespace NewHorizons.Utility.Files } } - var newTexture = new Texture2D(texture.width, texture.height, texture.format, texture.mipmapCount != 1); + var newTexture = new Texture2D(texture.width, texture.height, texture.format, texture.mipmapCount != 1, true); newTexture.name = key; newTexture.SetPixels(pixels); newTexture.Apply(); diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 869bb3a7..1feb5fcd 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.19.2", + "version": "1.19.3", "owmlVersion": "2.9.8", "dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],