Skip to content

Commit

Permalink
Busker bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dabao40 committed Oct 1, 2024
1 parent 691993c commit 60aaa92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions TheOtherRoles/Patches/UsablesPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,11 @@ static void Postfix(VitalsMinigame __instance) {
int index = 0;
int displayType = Helpers.GetDisplayType(__instance.vitals.Count);
foreach (VitalsPanel vital in (Il2CppArrayBase<VitalsPanel>)__instance.vitals)
{
{
var color = vital.PlayerInfo.IsDead && !Busker.buskerList.Any(x => x == vital.PlayerInfo.PlayerId) ? Palette.HalfWhite : Palette.White;
vital.PlayerIcon.cosmetics.SetSkin(vital.PlayerInfo.DefaultOutfit.SkinId, vital.PlayerInfo.DefaultOutfit.ColorId, (Action)null);
vital.PlayerIcon.cosmetics.SetHatColor(Palette.White);
vital.PlayerIcon.cosmetics.SetVisorAlpha(Palette.White.a);
vital.PlayerIcon.cosmetics.SetHatColor(color);
vital.PlayerIcon.cosmetics.SetVisorAlpha(color.a);
vital.transform.localPosition = ToVoteAreaPos(__instance, index, displayType);
Transform transform = vital.transform;
transform.localScale *= PanelAreaScale[displayType];
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/RPC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ public static void buskerPseudocide(byte targetId, bool isTrueDead, bool isLover
else if (Akujo.akujo != null && Busker.busker == Akujo.honmei)
otherLover = Akujo.akujo;

if (!otherLover.Data.IsDead)
if (otherLover != null && !otherLover.Data.IsDead)
{
otherLover.MurderPlayer(otherLover, MurderResultFlags.Succeeded);
GameHistory.overrideDeathReasonAndKiller(otherLover, DeadPlayer.CustomDeathReason.LoverSuicide);
Expand Down

0 comments on commit 60aaa92

Please sign in to comment.