Skip to content

Commit

Permalink
Fix shift
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyx0412 committed Apr 25, 2024
1 parent 2fec1f0 commit 393a8b1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
15 changes: 7 additions & 8 deletions TheOtherRoles/Helper/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1331,19 +1331,18 @@ public static bool isNeutral(PlayerControl player)
return false;
}

//好人交换师代码target
public static bool isShiftNeutral(PlayerControl player)
{
if (CustomOptionHolder.modifierShiftNeutral.getBool())
{
if (player != null)
return player == (Jackal.jackal
|| Sidekick.sidekick
|| Werewolf.werewolf
|| Akujo.akujo
|| Juggernaut.juggernaut
|| Swooper.swooper
|| Arsonist.arsonist);
return player == Jackal.jackal ||
player == Sidekick.sidekick ||
player == Werewolf.werewolf ||
player == Akujo.akujo ||
player == Juggernaut.juggernaut ||
player == Swooper.swooper ||
player == Arsonist.arsonist;
return false;
}
else
Expand Down
18 changes: 10 additions & 8 deletions TheOtherRoles/Patches/UpdatePatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,20 @@ private static void setNameColors()
if (Deputy.deputy != null && Deputy.knowsSheriff) {
setPlayerNameColor(Deputy.deputy, Deputy.color);
}
} else
} else*/

if (Deputy.deputy != null && Deputy.deputy == localPlayer)
{
setPlayerNameColor(Deputy.deputy, Deputy.color);
if (Sheriff.sheriff != null && Deputy.knowsSheriff) setPlayerNameColor(Sheriff.sheriff, Sheriff.color);
}*/
}

//警长可见捕快
if (Sheriff.sheriff != null && Sheriff.sheriff == localPlayer)
{
setPlayerNameColor(Sheriff.sheriff, Sheriff.color);
if (Deputy.deputy != null && Deputy.knowsSheriff) setPlayerNameColor(Deputy.deputy, Sheriff.color);
}

if (Prophet.prophet != null && Prophet.prophet == localPlayer)
{
Expand All @@ -113,12 +121,6 @@ private static void setNameColors()
}
}
}
//警长可见捕快
if (Sheriff.sheriff != null && Sheriff.sheriff == localPlayer)
{
setPlayerNameColor(Sheriff.sheriff, Sheriff.color);
if (Deputy.deputy != null && Deputy.knowsSheriff) setPlayerNameColor(Deputy.deputy, Sheriff.color);
}
/*else if (Portalmaker.portalmaker != null && Portalmaker.portalmaker == localPlayer)
setPlayerNameColor(Portalmaker.portalmaker, Portalmaker.color);
else if (Lighter.lighter != null && Lighter.lighter == localPlayer)
Expand Down
8 changes: 8 additions & 0 deletions TheOtherRoles/TheOtherRoles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<AmongUsLatest>F:\AmongUs\v2024.3.5</AmongUsLatest>
<AnalysisLevel>6.0</AnalysisLevel>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Utilities/GithubUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static string GithubUrl(this string url)
return url.Replace("https://raw.githubusercontent.com", "https://github.moeyy.xyz/https://raw.githubusercontent.com");
}
}

Info("Rewrite URL" + url);
return url;
}
}

0 comments on commit 393a8b1

Please sign in to comment.