Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
fix role color/name
Browse files Browse the repository at this point in the history
  • Loading branch information
cddjr committed Jun 21, 2024
1 parent 3d9f227 commit 445839f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions appdata/il2cpp-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -8076,6 +8076,7 @@ namespace app
ShowCrewmateNames = 0x0000000a,
ShapeshifterLeaveSkin = 0x000003e8,
ImpostorsCanSeeProtect = 0x0000044c,
NoisemakerImpostorAlert = 0x00000514,
};

#else
Expand All @@ -8093,6 +8094,7 @@ namespace app
BoolOptionNames__Enum_ShowCrewmateNames = 0x0000000a,
BoolOptionNames__Enum_ShapeshifterLeaveSkin = 0x000003e8,
BoolOptionNames__Enum_ImpostorsCanSeeProtect = 0x0000044c,
BoolOptionNames__Enum_NoisemakerImpostorAlert = 0x00000514,
};

#endif
Expand Down
9 changes: 9 additions & 0 deletions user/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,11 +716,14 @@ Color GetRoleColor(RoleBehaviour* roleBehaviour) {
case RoleTypes__Enum::Engineer:
case RoleTypes__Enum::GuardianAngel:
case RoleTypes__Enum::Scientist:
case RoleTypes__Enum::Noisemaker:
case RoleTypes__Enum::Tracker:
c = Palette__TypeInfo->static_fields->CrewmateBlue;
break;
case RoleTypes__Enum::Impostor:
case RoleTypes__Enum::Shapeshifter:
case RoleTypes__Enum::ImpostorGhost:
case RoleTypes__Enum::Phantom:
c = Palette__TypeInfo->static_fields->ImpostorRed;
break;
}
Expand All @@ -747,6 +750,12 @@ std::string GetRoleName(RoleBehaviour* roleBehaviour, bool abbreviated /* = fals
case RoleTypes__Enum::Crewmate:
case RoleTypes__Enum::CrewmateGhost:
return (abbreviated ? "Crew" : "Crewmate");
case RoleTypes__Enum::Noisemaker:
return (abbreviated ? "Noisemaker" : "Noisemaker");
case RoleTypes__Enum::Phantom:
return (abbreviated ? "Phantom" : "Phantom");
case RoleTypes__Enum::Tracker:
return (abbreviated ? "Tracker" : "Tracker");
default:
return (abbreviated ? "Unk" : "Unknown");
}
Expand Down

0 comments on commit 445839f

Please sign in to comment.