static bool Prefix(UIElement __instance, ref Vector2 pos) { if (MPModPrivateData.MatchMode == ExtMatchMode.RACE) { Race.DrawMpMiniScoreboard(ref pos, __instance); return(false); } if (NetworkMatch.GetMode() == MatchMode.ANARCHY || MPTeams.NetworkMatchTeamCount == 2) { return(true); } int match_time_remaining = NetworkMatch.m_match_time_remaining; int match_time = (int)NetworkMatch.m_match_elapsed_seconds; pos.y -= 15f; __instance.DrawDigitsTime(pos + Vector2.right * 95f, (float)match_time_remaining, 0.45f, (match_time <= 10 || match_time_remaining >= 10) ? UIManager.m_col_ui2 : UIManager.m_col_em5, __instance.m_alpha, false); pos.y -= 3f; MpTeam myTeam = GameManager.m_local_player.m_mp_team; foreach (var team in MPTeams.TeamsByScore) { pos.y += 28f; int score = NetworkMatch.GetTeamScore(team); MPTeams.DrawTeamScoreSmall(__instance, pos, team, score, 98f, team == myTeam); } pos.y += 6f; return(false); }
static bool Prefix(UIElement __instance, ref Vector2 pos) { if (!GameplayManager.IsMultiplayerActive || NetworkMatch.GetMode() == MatchMode.ANARCHY || MPTeams.NetworkMatchTeamCount == 2) { return(true); } var uie = __instance; pos.x -= 4f; pos.y -= 5f; Vector2 temp_pos; temp_pos.y = pos.y; temp_pos.x = pos.x - 100f; uie.DrawStringSmall(NetworkMatch.GetModeString(MatchMode.NUM), temp_pos, 0.4f, StringOffset.LEFT, UIManager.m_col_ub0, 1f, 130f); temp_pos.x = pos.x + 95f; int match_time_remaining = NetworkMatch.m_match_time_remaining; int num3 = (int)NetworkMatch.m_match_elapsed_seconds; uie.DrawDigitsTime(temp_pos, (float)match_time_remaining, 0.45f, (num3 <= 10 || match_time_remaining >= 10) ? UIManager.m_col_ui2 : UIManager.m_col_em5, uie.m_alpha, false); temp_pos.x = pos.x - 100f; temp_pos.y = temp_pos.y - 20f; uie.DrawPing(temp_pos); pos.y += 24f; MpTeam myTeam = GameManager.m_local_player.m_mp_team; foreach (var team in MPTeams.TeamsByScore) { MPTeams.DrawTeamScoreSmall(__instance, pos, team, NetworkMatch.GetTeamScore(team), 98f, team == myTeam); pos.y += 28f; } pos.y += 6f - 28f; pos.y += 22f; pos.x += 100f; uie.DrawRecentKillsMP(pos); if (GameManager.m_player_ship.m_wheel_select_state == WheelSelectState.QUICK_CHAT) { pos.y = UIManager.UI_TOP + 128f; pos.x = -448f; uie.DrawQuickChatWheel(pos); } else { pos.y = UIManager.UI_TOP + 60f; pos.x = UIManager.UI_LEFT + 5f; uie.DrawQuickChatMP(pos); } return(false); }
static bool Prefix(UIElement __instance, ref Vector2 pos) { var mode = NetworkMatch.GetMode(); var fitSingle = MPTeams.NetworkMatchTeamCount == 2 && NetworkMatch.m_players.Count <= 8; if (MPModPrivateData.MatchMode == ExtMatchMode.RACE) { return(true); } if (mode == MatchMode.ANARCHY || ((mode == MatchMode.TEAM_ANARCHY || mode == MatchMode.MONSTERBALL) && fitSingle)) { return(true); } float colReduce = fitSingle ? 0 : 50f; float col1 = fitSingle ? -330f : -250f; float col2 = 100f - colReduce; float col3 = 190f - colReduce; float col4 = 280f - colReduce; float col5 = 350f - colReduce; MpTeam myTeam = GameManager.m_local_player.m_mp_team; int col = 0; float x = pos.x; float y = pos.y; float[] ys = new float[2] { pos.y, pos.y }; foreach (var team in MPTeams.TeamsByScore) { pos.x = x + (fitSingle ? 0 : col == 0 ? -325f : 325f); pos.y = ys[col]; MPTeams.DrawTeamScore(__instance, pos, team, NetworkMatch.GetTeamScore(team), col5, team == myTeam); pos.y += 35f; if (ys[col] == y || fitSingle) // only draw header for first team in column { MPTeams.DrawScoreHeader(__instance, pos, col1, col2, col3, col4, col5, false); pos.y += 15f; __instance.DrawVariableSeparator(pos, 350f); pos.y += 20f; } int num = MPTeams.DrawScoresForTeam(__instance, team, pos, col1, col2, col3, col4, col5); pos.y += (float)num * 25f + 35f; ys[col] = pos.y; if (!fitSingle) { col = 1 - col; } } pos.y = Mathf.Max(ys[0], ys[1]); return(false); }
public static int HighestScore() { int max_score = 0; foreach (var team in Teams) { int score = NetworkMatch.GetTeamScore(team); if (score > max_score) { max_score = score; } } return(max_score); }
public static void DrawMpScoreboardRaw(UIElement uie, ref Vector2 pos) { float col1 = -330f; // Player float col2 = 100f; // Score/Kills float col3 = 190f; // Assists float col4 = 280f; // Deaths float col5 = 350f; // Ping MpTeam myTeam = GameManager.m_local_player.m_mp_team; foreach (MpTeam team in MPTeams.TeamsByScore) { DrawTeamScore(uie, pos, team, NetworkMatch.GetTeamScore(team), 350f, GameManager.m_local_player.m_mp_team == myTeam); pos.y += 35f; DrawScoreHeader(uie, pos, col1, col2, col3, col4, col5); pos.y += 15f; uie.DrawVariableSeparator(pos, 350f); pos.y += 20f; int num = DrawScoresForTeam(uie, team, pos, col1, col2, col3, col4, col5); pos.y += (float)num * 25f + 50f; } }
public static void DrawMpScoreboardRaw(UIElement uie, ref Vector2 pos) { int i = 0; foreach (var team in MPTeams.TeamsByScore) { DrawTeamScore(uie, ref pos, team, NetworkMatch.GetTeamScore(team), 350f, team == GameManager.m_local_player.m_mp_team); pos.y += 35f; // Only draw header for first team in column if (i == 0) { DrawScoreHeader(uie, ref pos, false); pos.y += 15f; uie.DrawVariableSeparator(pos, 350f); pos.y += 20f; } DrawScoresForTeam(uie, team, ref pos); pos.y += 35f; i++; } }