From 3ea7913e25001c500813bae736a001a55e28134d Mon Sep 17 00:00:00 2001 From: TehFl0w <34872043+TehFl0w@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:09:27 +0100 Subject: [PATCH 1/3] Update RemoveScavModeButtonPatch.cs Fixed disabling SCAV-Mode and moved PMC object to center --- Source/UI/RemoveScavModeButtonPatch.cs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Source/UI/RemoveScavModeButtonPatch.cs b/Source/UI/RemoveScavModeButtonPatch.cs index 29336072..6b474e76 100644 --- a/Source/UI/RemoveScavModeButtonPatch.cs +++ b/Source/UI/RemoveScavModeButtonPatch.cs @@ -17,18 +17,17 @@ protected override MethodBase GetTargetMethod() } [PatchPostfix] - static void PatchPostfix( - EFT.UI.Matchmaker.MatchMakerSideSelectionScreen __instance, - DefaultUIButton ____savagesBigButton, - UIAnimatedToggleSpawner ____savagesButton, - DefaultUIButton ____pmcBigButton - ) + static void PatchPostfix() { - ____savagesBigButton.enabled = false; - ____savagesButton.SpawnableToggle.enabled = false; - ____savagesButton.gameObject.SetActive(false); - //____savagesBigButton.transform.parent.gameObject.SetActive(false); - + var selecttxt = GameObject.Find("SideSelectionCaption"); + selecttxt.active = false; + var savages = GameObject.Find("Savage"); + savages.active = false; + var pmcdesc = GameObject.Find("Description"); + pmcdesc.active = false; + var pmcs = GameObject.Find("PMCs"); + pmcs.transform.localScale = new Vector3( (float)1.3, (float)1.3, (float)1.0); + pmcs.transform.position = new Vector3((Screen.width / 2) - 293, (Screen.height / 2) - 130, 0); } } } From 7df7d858888ebc239e935a0df4183fa3fe901124 Mon Sep 17 00:00:00 2001 From: TehFl0w <34872043+TehFl0w@users.noreply.github.com> Date: Sun, 19 Nov 2023 04:39:58 +0100 Subject: [PATCH 2/3] Update RemoveScavModeButtonPatch.cs Updated logic for pmc-element-centering --- Source/UI/RemoveScavModeButtonPatch.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/UI/RemoveScavModeButtonPatch.cs b/Source/UI/RemoveScavModeButtonPatch.cs index 6b474e76..eb65d01c 100644 --- a/Source/UI/RemoveScavModeButtonPatch.cs +++ b/Source/UI/RemoveScavModeButtonPatch.cs @@ -21,13 +21,18 @@ static void PatchPostfix() { var selecttxt = GameObject.Find("SideSelectionCaption"); selecttxt.active = false; + var savages = GameObject.Find("Savage"); savages.active = false; + var pmcdesc = GameObject.Find("Description"); pmcdesc.active = false; + var pmcs = GameObject.Find("PMCs"); - pmcs.transform.localScale = new Vector3( (float)1.3, (float)1.3, (float)1.0); - pmcs.transform.position = new Vector3((Screen.width / 2) - 293, (Screen.height / 2) - 130, 0); + var pmccanvas = GameObject.Find("PMCPlayerMV"); + + pmcs.transform.localScale = new Vector3(1.1f, 1.1f, 1.0f); + pmcs.transform.position = new Vector3((Screen.width / 2) - (pmccanvas.RectTransform().rect.width / 2), (Screen.height / 2) - (Screen.height/10) , 0); } } } From 5f5e15872095fef0f5388d39d4e732b8b9ae2e7f Mon Sep 17 00:00:00 2001 From: TehFl0w <34872043+TehFl0w@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:44:55 +0100 Subject: [PATCH 3/3] Update RemoveScavModeButtonPatch.cs --- Source/UI/RemoveScavModeButtonPatch.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/UI/RemoveScavModeButtonPatch.cs b/Source/UI/RemoveScavModeButtonPatch.cs index eb65d01c..e7ee6b0f 100644 --- a/Source/UI/RemoveScavModeButtonPatch.cs +++ b/Source/UI/RemoveScavModeButtonPatch.cs @@ -29,10 +29,8 @@ static void PatchPostfix() pmcdesc.active = false; var pmcs = GameObject.Find("PMCs"); - var pmccanvas = GameObject.Find("PMCPlayerMV"); - - pmcs.transform.localScale = new Vector3(1.1f, 1.1f, 1.0f); - pmcs.transform.position = new Vector3((Screen.width / 2) - (pmccanvas.RectTransform().rect.width / 2), (Screen.height / 2) - (Screen.height/10) , 0); + var mmSSC = pmcs.transform.parent.gameObject; + pmcs.transform.position = new Vector3(mmSSC.transform.position.x / 1.305f, pmcs.transform.position.y * 0.75f, 0); } } }