mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-04-16 14:42:35 +00:00
fix probe launcher materials
This commit is contained in:
parent
a641cfa2b6
commit
12dcad43e4
@ -304,18 +304,24 @@ namespace QSB.Tools
|
|||||||
|
|
||||||
Object.Destroy(REMOTE_ProbeLauncher.GetComponent<ProbePromptController>());
|
Object.Destroy(REMOTE_ProbeLauncher.GetComponent<ProbePromptController>());
|
||||||
Object.Destroy(REMOTE_ProbeLauncher.GetComponent<PlayerProbeLauncher>());
|
Object.Destroy(REMOTE_ProbeLauncher.GetComponent<PlayerProbeLauncher>());
|
||||||
Object.Destroy(REMOTE_ProbeLauncher.transform.Find("preLaunchCamera"));
|
Object.Destroy(REMOTE_ProbeLauncher.transform.Find("preLaunchCamera").gameObject);
|
||||||
Object.Destroy(REMOTE_ProbeLauncher.transform.Find("Props_HEA_ProbeLauncher_ProbeCamera")); // the correctly placed one...
|
Object.Destroy(REMOTE_ProbeLauncher.transform.Find("Props_HEA_ProbeLauncher_ProbeCamera").gameObject); // the correctly placed one...
|
||||||
|
|
||||||
var prop = REMOTE_ProbeLauncher.transform.Find("Props_HEA_ProbeLauncher");
|
var prop = REMOTE_ProbeLauncher.transform.Find("Props_HEA_ProbeLauncher");
|
||||||
var recallEffect = prop.Find("RecallEffect");
|
var recallEffect = prop.Find("RecallEffect");
|
||||||
|
|
||||||
//Object.Destroy(prop.Find("PressureGauge_Arrow"));
|
prop.Find("PressureGauge_Arrow").GetComponent<MeshRenderer>().material = Props_HEA_PlayerTool_mat;
|
||||||
//Object.Destroy(prop.Find("ProbeLauncherChassis"));
|
prop.Find("ProbeLauncherChassis").GetComponent<MeshRenderer>().material = Props_HEA_PlayerTool_mat;
|
||||||
Object.Destroy(prop.Find("Props_HEA_ProbeLauncher_Prepass"));
|
Object.Destroy(prop.Find("Props_HEA_ProbeLauncher_Prepass").gameObject);
|
||||||
|
|
||||||
var preLaunchProbe = prop.Find("Props_HEA_Probe_Prelaunch");
|
var preLaunchProbe = prop.Find("Props_HEA_Probe_Prelaunch");
|
||||||
Object.Destroy(preLaunchProbe.Find("Props_HEA_Probe_Prelaunch_Prepass"));
|
Object.Destroy(preLaunchProbe.Find("Props_HEA_Probe_Prelaunch_Prepass").gameObject);
|
||||||
|
|
||||||
|
// fuck you unity
|
||||||
|
var materials = preLaunchProbe.GetComponent<MeshRenderer>().materials;
|
||||||
|
materials[0] = Props_HEA_PlayerTool_mat;
|
||||||
|
materials[1] = Props_HEA_Lightbulb_OFF_mat;
|
||||||
|
preLaunchProbe.GetComponent<MeshRenderer>().materials = materials;
|
||||||
|
|
||||||
var tool = REMOTE_ProbeLauncher.AddComponent<QSBProbeLauncherTool>();
|
var tool = REMOTE_ProbeLauncher.AddComponent<QSBProbeLauncherTool>();
|
||||||
var spring = new DampedSpringQuat
|
var spring = new DampedSpringQuat
|
||||||
@ -328,6 +334,7 @@ namespace QSB.Tools
|
|||||||
mass = 1
|
mass = 1
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
tool.MoveSpring = spring;
|
tool.MoveSpring = spring;
|
||||||
tool.StowTransform = _toolStowTransform;
|
tool.StowTransform = _toolStowTransform;
|
||||||
tool.HoldTransform = _toolHoldTransform;
|
tool.HoldTransform = _toolHoldTransform;
|
||||||
@ -341,43 +348,6 @@ namespace QSB.Tools
|
|||||||
REMOTE_ProbeLauncher.transform.parent = cameraBody;
|
REMOTE_ProbeLauncher.transform.parent = cameraBody;
|
||||||
REMOTE_ProbeLauncher.transform.localPosition = ProbeLauncherOffset;
|
REMOTE_ProbeLauncher.transform.localPosition = ProbeLauncherOffset;
|
||||||
REMOTE_ProbeLauncher.SetActive(true);
|
REMOTE_ProbeLauncher.SetActive(true);
|
||||||
|
|
||||||
/*
|
|
||||||
var launcherRoot = new GameObject("REMOTE_ProbeLauncher");
|
|
||||||
var modelOrig = GameObject.Find("PlayerCamera/ProbeLauncher/Props_HEA_ProbeLauncher");
|
|
||||||
var model = Object.Instantiate(modelOrig);
|
|
||||||
model.transform.parent = launcherRoot.transform;
|
|
||||||
|
|
||||||
Object.Destroy(model.transform.Find("Props_HEA_ProbeLauncher_Prepass").gameObject);
|
|
||||||
Object.Destroy(model.transform.Find("Props_HEA_Probe_Prelaunch").Find("Props_HEA_Probe_Prelaunch_Prepass").gameObject);
|
|
||||||
|
|
||||||
var tool = launcherRoot.AddComponent<QSBProbeLauncherTool>();
|
|
||||||
var spring = new DampedSpringQuat
|
|
||||||
{
|
|
||||||
velocity = Vector4.zero,
|
|
||||||
settings = new DampedSpringSettings
|
|
||||||
{
|
|
||||||
springConstant = 50f,
|
|
||||||
dampingCoefficient = 8.485282f,
|
|
||||||
mass = 1
|
|
||||||
}
|
|
||||||
};
|
|
||||||
tool.MoveSpring = spring;
|
|
||||||
tool.StowTransform = _toolStowTransform;
|
|
||||||
tool.HoldTransform = _toolHoldTransform;
|
|
||||||
tool.ArrivalDegrees = 5f;
|
|
||||||
tool.Type = ToolType.ProbeLauncher;
|
|
||||||
tool.ToolGameObject = model;
|
|
||||||
|
|
||||||
GetRenderer(launcherRoot, "Props_HEA_Probe_Prelaunch").materials[0] = Props_HEA_PlayerTool_mat;
|
|
||||||
GetRenderer(launcherRoot, "Props_HEA_Probe_Prelaunch").materials[1] = Props_HEA_Lightbulb_mat;
|
|
||||||
GetRenderer(launcherRoot, "PressureGauge_Arrow").material = Props_HEA_PlayerTool_mat;
|
|
||||||
GetRenderer(launcherRoot, "ProbeLauncherChassis").material = Props_HEA_PlayerTool_mat;
|
|
||||||
|
|
||||||
launcherRoot.transform.parent = cameraBody;
|
|
||||||
launcherRoot.transform.localPosition = ProbeLauncherOffset;
|
|
||||||
launcherRoot.SetActive(true);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MeshRenderer GetRenderer(GameObject root, string gameObjectName) =>
|
private static MeshRenderer GetRenderer(GameObject root, string gameObjectName) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user