From 4bd3d97db743306e4cbe3600233b98f4936ba6b1 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 1 Jan 2022 22:12:10 +0000 Subject: [PATCH] Update PlayerToolsManager.cs --- QSB/Tools/PlayerToolsManager.cs | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/QSB/Tools/PlayerToolsManager.cs b/QSB/Tools/PlayerToolsManager.cs index c29b6c06..21fbab3e 100644 --- a/QSB/Tools/PlayerToolsManager.cs +++ b/QSB/Tools/PlayerToolsManager.cs @@ -26,23 +26,14 @@ namespace QSB.Tools { CreateStowTransforms(player.CameraBody.transform); - Props_HEA_PlayerTool_mat = GameObject.Find("Props_HEA_ProbeLauncher_ProbeCamera/ProbeLauncherChassis").GetComponent().materials[0]; - Props_HEA_Lightbulb_OFF_mat = GameObject.Find("Props_HEA_Probe_Prelaunch").GetComponent().materials[1]; + var surfaceData = Locator.GetSurfaceManager()._surfaceLookupAsset; + var metal = surfaceData.surfaceTypeGroups[15].materials; + var glass = surfaceData.surfaceTypeGroups[19].materials; - if (QSBSceneManager.CurrentScene == OWScene.SolarSystem) - { - Structure_HEA_PlayerShip_Screens_mat = GameObject.Find("ProbeScreen (1)/ProbeScreenPivot/ProbeScreen").GetComponent().materials[2]; - Props_HEA_Lightbulb_mat = GameObject.Find("Props_HEA_Lantern (10)/Lantern_Lamp").GetComponent().materials[0]; - Props_HEA_Lightbulb_OFF_mat = GameObject.Find("NomaiResearchExhibit/Props_HEA_Probe_STATIC").GetComponent().materials[1]; - } - else if (QSBSceneManager.CurrentScene == OWScene.EyeOfTheUniverse) - { - Props_HEA_Lightbulb_mat = GameObject.Find("lantern_lamp").GetComponent().materials[0]; - - // BUG : uhhhhh fuckin' uhhhhhhhh (find a material) - Props_HEA_Lightbulb_OFF_mat = null; - Structure_HEA_PlayerShip_Screens_mat = null; - } + Props_HEA_PlayerTool_mat = metal[27]; + Props_HEA_Lightbulb_mat = glass[47]; + Props_HEA_Lightbulb_OFF_mat = glass[48]; + Structure_HEA_PlayerShip_Screens_mat = glass[41]; } catch (Exception ex) {