1313using static TheOtherRoles . Objects . CustomButton ;
1414using TMPro ;
1515using TheOtherRoles . Modules ;
16+ using static TheOtherRoles . Modules . ModInputManager ;
1617
1718namespace TheOtherRoles
1819{
@@ -41,8 +42,6 @@ static class HudManagerStartPatch
4142 public static CustomButton vampireKillButton ;
4243 public static CustomButton garlicButton ;
4344 public static CustomButton prophetButton ;
44- public static CustomButton markerButton1 ;
45- public static CustomButton markerButton2 ;
4645 public static CustomButton jackalKillButton ;
4746 public static CustomButton sidekickKillButton ;
4847 private static CustomButton jackalSidekickButton ;
@@ -80,6 +79,7 @@ static class HudManagerStartPatch
8079 private static CustomButton propHuntSpeedboostButton ;
8180 public static CustomButton propHuntAdminButton ;
8281 public static CustomButton propHuntFindButton ;
82+ public static CustomButton roleSummaryButton ;
8383
8484 public static Dictionary < byte , List < CustomButton > > deputyHandcuffedButtons = null ;
8585 public static PoolablePlayer targetDisplay ;
@@ -94,11 +94,10 @@ static class HudManagerStartPatch
9494 public static TMPro . TMP_Text hackerVitalsChargesText ;
9595 public static TMPro . TMP_Text trapperChargesText ;
9696 public static TMPro . TMP_Text prophetButtonText ;
97- public static TMPro . TMP_Text markButtonText ;
9897 public static TMPro . TMP_Text portalmakerButtonText1 ;
9998 public static TMPro . TMP_Text portalmakerButtonText2 ;
10099 public static TMPro . TMP_Text huntedShieldCountText ;
101-
100+ public static TMPro . TMP_Text FraudsterButtonText ;
102101
103102 public static void setCustomButtonCooldowns ( ) {
104103 if ( ! initialized ) {
@@ -153,7 +152,6 @@ public static void setCustomButtonCooldowns() {
153152 yoyoAdminTableButton . MaxTimer = Yoyo . adminCooldown ;
154153 prophetButton . MaxTimer = Prophet . cooldown ;
155154 fraudsterButton . MaxTimer = Fraudster . cooldown ;
156- markerButton1 . MaxTimer = Marker . cooldown ;
157155 yoyoAdminTableButton . EffectDuration = 10f ;
158156 hunterLighterButton . MaxTimer = Hunter . lightCooldown ;
159157 hunterAdminTableButton . MaxTimer = Hunter . AdminCooldown ;
@@ -952,80 +950,12 @@ public static void createButtonsPostfix(HudManager __instance) {
952950
953951 ) ;
954952 //prophetButtonText = UnityEngine.Object.Instantiate(prophetButton.actionButton.cooldownTimerText, prophetButton.actionButton.cooldownTimerText.transform.parent);
955- // prophetButtonText.text = "";
953+ // prophetButtonText.text = "";
956954 //prophetButtonText.enableWordWrapping = false;
957955 //prophetButtonText.transform.localScale = Vector3.one * 0.5f;
958956 //prophetButtonText.transform.localPosition += new Vector3(-0.05f, 0.55f, -1f);
959- markerButton1 = new CustomButton (
960-
961- ( ) =>
962- {
963- if ( Marker . currentTarget != null )
964- {
957+
965958
966- MessageWriter writer = AmongUsClient . Instance . StartRpcImmediately ( CachedPlayer . LocalPlayer . PlayerControl . NetId , ( byte ) CustomRPC . MarkerMark , Hazel . SendOption . Reliable , - 1 ) ;
967- writer . Write ( Marker . currentTarget . PlayerId ) ;
968- AmongUsClient . Instance . FinishRpcImmediately ( writer ) ;
969- RPCProcedure . MarkerMark ( Marker . currentTarget . PlayerId ) ;
970-
971- markerButton1 . Timer = markerButton1 . MaxTimer ;
972- }
973- } ,
974- ( ) => { return Marker . marker != null && CachedPlayer . LocalPlayer . PlayerControl == Marker . marker && ! CachedPlayer . LocalPlayer . PlayerControl . Data . IsDead && Marker . markLeft > 0 ; } ,
975- ( ) =>
976- {
977- if ( markButtonText != null )
978- {
979- if ( Marker . markLeft > 0 )
980- markButtonText . text = $ "{ Marker . markLeft } ";
981- else
982- markButtonText . text = "" ;
983- }
984- return Marker . currentTarget != null && CachedPlayer . LocalPlayer . PlayerControl . CanMove ;
985- } ,
986- ( ) => { markerButton1 . Timer = markerButton1 . MaxTimer ; } ,
987- Marker . getButtonSprite ( ) ,
988- CustomButton . ButtonPositions . lowerRowRight ,
989- __instance ,
990- KeyCode . F ,
991- buttonText : ModTranslation . GetString ( "MarkText" )
992-
993- ) ;
994- markerButton2 = new CustomButton (
995-
996- ( ) =>
997- {
998- if ( Marker . currentTarget2 != null )
999- {
1000-
1001- MessageWriter writer = AmongUsClient . Instance . StartRpcImmediately ( CachedPlayer . LocalPlayer . PlayerControl . NetId , ( byte ) CustomRPC . MarkerMark2 , Hazel . SendOption . Reliable , - 1 ) ;
1002- writer . Write ( Marker . currentTarget2 . PlayerId ) ;
1003- AmongUsClient . Instance . FinishRpcImmediately ( writer ) ;
1004- RPCProcedure . MarkerMark ( Marker . currentTarget2 . PlayerId ) ;
1005-
1006- markerButton2 . Timer = markerButton2 . MaxTimer ;
1007- }
1008- } ,
1009- ( ) => { return Marker . marker != null && CachedPlayer . LocalPlayer . PlayerControl == Marker . marker && ! CachedPlayer . LocalPlayer . PlayerControl . Data . IsDead && Marker . markLeft > 0 ; } ,
1010- ( ) =>
1011- {
1012- if ( markButtonText != null )
1013- {
1014- if ( Marker . markLeft > 0 )
1015- markButtonText . text = $ "{ Marker . markLeft2 } ";
1016- else
1017- markButtonText . text = "" ;
1018- }
1019- return Marker . currentTarget2 != null && CachedPlayer . LocalPlayer . PlayerControl . CanMove ;
1020- } ,
1021- ( ) => { markerButton1 . Timer = markerButton1 . MaxTimer ; } ,
1022- Marker . getButtonSprite ( ) ,
1023- CustomButton . ButtonPositions . lowerRowCenter ,
1024- __instance ,
1025- KeyCode . G ,
1026- buttonText : ModTranslation . GetString ( "ButtonMark" )
1027-
1028- ) ;
1029959 portalmakerPlacePortalButton = new CustomButton (
1030960 ( ) => {
1031961 portalmakerPlacePortalButton . Timer = portalmakerPlacePortalButton . MaxTimer ;
@@ -1196,7 +1126,7 @@ public static void createButtonsPostfix(HudManager __instance) {
11961126 ( ) => { return Jackal . canCreateSidekick && Jackal . currentTarget != null && CachedPlayer . LocalPlayer . PlayerControl . CanMove ; } ,
11971127 ( ) => { jackalSidekickButton . Timer = jackalSidekickButton . MaxTimer ; } ,
11981128 Jackal . getSidekickButtonSprite ( ) ,
1199- CustomButton . ButtonPositions . lowerRowCenter ,
1129+ CustomButton . ButtonPositions . upperRowFarRight ,
12001130 __instance ,
12011131 KeyCode . H ,
12021132 buttonText : ModTranslation . GetString ( "ButtonjackalSidekick" )
@@ -1214,7 +1144,7 @@ public static void createButtonsPostfix(HudManager __instance) {
12141144 ( ) => { return Jackal . currentTarget && CachedPlayer . LocalPlayer . PlayerControl . CanMove ; } ,
12151145 ( ) => { jackalKillButton . Timer = jackalKillButton . MaxTimer ; } ,
12161146 __instance . KillButton . graphic . sprite ,
1217- CustomButton . ButtonPositions . upperRowFarRight ,
1147+ CustomButton . ButtonPositions . upperRowRight ,
12181148 __instance ,
12191149 KeyCode . Q
12201150 ) ;
@@ -2230,7 +2160,7 @@ public static void createButtonsPostfix(HudManager __instance) {
22302160 buttonText : ModTranslation . GetString ( "ButtonAdmin" )
22312161
22322162 ) ;
2233-
2163+
22342164
22352165 zoomOutButton = new CustomButton (
22362166 ( ) => { Helpers . toggleZoom ( ) ;
0 commit comments