Compare commits

..
2 Commits
Author SHA1 Message Date
Ape 6a5fbe7300 1.7.0 2026-04-01 12:58:58 +02:00
Ape fbf9b2b6eb 3 Small fixes 2026-04-01 12:49:21 +02:00
6 changed files with 21 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ public partial class Main : BasePlugin
public static bool HasArgumentException;
public static string CredentialsText;
public const string ModVersion = "v1.6.6";
public const string ModVersion = "v1.7.0";
public static float GameTimer;
+2
View File
@@ -19,6 +19,8 @@ public static class CustomRoleManagement
public static void AssignRoles()
{
if (Options.Gamemode.GetValue() > 1) return;
// crewmateRoles = assigned with crewmate role base
// impostorRoles = assigned with impostor role base
List<(string roleName, int percentage)> crewmateRoles = new()
+1 -1
View File
@@ -17,7 +17,7 @@ internal static class CoShowIntroPatch
NormalGameEndChecker.customRoles = CustomRoleManagement.PlayerToCustomRole();
if (CustomRoleManagement.PlayerRoles.Count != 0 && !Utils.isHideNSeek)
if (CustomRoleManagement.PlayerRoles.Count != 0 && !Utils.isHideNSeek && Options.Gamemode.GetValue() < 2)
{
_ = new LateTask(() =>
{
+3 -2
View File
@@ -43,9 +43,10 @@ class PlayerControlSetRolePatch
if (Main.GM.Value && __instance == PlayerControl.LocalPlayer)
{
roleType = RoleTypes.CrewmateGhost;
return true;
}
if (CustomRoleManagement.PlayerRoles.TryGetValue(__instance.PlayerId, out var role) && role == "Mayor")
if (CustomRoleManagement.PlayerRoles.TryGetValue(__instance.PlayerId, out var role) && role == "Mayor" && Options.Gamemode.GetValue() < 2)
{
if (Options.MayorVentToMeeting.GetBool())
{
@@ -57,7 +58,7 @@ class PlayerControlSetRolePatch
roleType = RoleTypes.Crewmate;
}
}
if (CustomRoleManagement.PlayerRoles.TryGetValue(__instance.PlayerId, out var r) && r == "Jester")
if (CustomRoleManagement.PlayerRoles.TryGetValue(__instance.PlayerId, out var r) && r == "Jester" && Options.Gamemode.GetValue() < 2)
{
if (Options.JesterCanVent.GetBool())
{
+13 -2
View File
@@ -23,11 +23,12 @@ class ReportDeadBodyPatch
}
// target == null means meeting
if (target == null) return true;
if (Options.Gamemode.GetValue() == 2 || Options.Gamemode.GetValue() == 3)
{
Logger.Info($" Stopped {__instance.Data.PlayerName} reporting the body of {target.PlayerName}", "ReportDeadBodyPatch");
if (target != null) Logger.Info($" Stopped {__instance.Data.PlayerName} reporting the body of {target.PlayerName}", "ReportDeadBodyPatch");
else Logger.Info($" Stopped {__instance.Data.PlayerName} trying to call a meeting", "ReportDeadBodyPatch");
return false;
}
else return true;
@@ -174,6 +175,16 @@ class PlayerControlCompleteTaskPatch
if (Options.Gamemode.GetValue() != 3) CalculateTaskWin();
if (Options.Gamemode.GetValue() == 3)
{
if (!__instance.Data.IsDead && playerTasksCompleted[__instance] >= __instance.Data.Tasks.Count)
{
Utils.CustomWinnerEndGame(__instance, 1);
NormalGameEndChecker.LastWinReason = $"{__instance.Data.PlayerName} wins! (Completed tasks)";
NormalGameEndChecker.canUpdateWinnerText = false;
}
}
if (PlayerControl.LocalPlayer.Data.IsDead)
{
TMP_Text nameText = __instance.cosmetics.nameText;
+1 -1
View File
@@ -29,7 +29,7 @@
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
‎
# 🎮 Features (v1.6.6):
# 🎮 Features (v1.7.0):
## <b> 🌟 Custom Roles:</b>
- Mayor (Crewmate)
- The mayor has extra votes and can call meetings by venting, depending on settings.