From b62b8ae2164267fb156ad042cb16e6354f8315ce Mon Sep 17 00:00:00 2001 From: Atony <75191600+AtonyGit@users.noreply.github.com> Date: Sat, 29 Aug 2026 22:35:10 -0500 Subject: [PATCH] Add more helpers for getting role strings --- MiraAPI/Utilities/Helpers.cs | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/MiraAPI/Utilities/Helpers.cs b/MiraAPI/Utilities/Helpers.cs index 687298e..5a70c2c 100644 --- a/MiraAPI/Utilities/Helpers.cs +++ b/MiraAPI/Utilities/Helpers.cs @@ -542,6 +542,48 @@ public static class Helpers return role.NiceName; } + /// + /// Returns the string of a . + /// + /// The to find. + /// The 's intro blurb. + public static string GetRoleIntroBlurb(this RoleBehaviour role) + { + if (role is ICustomRole custom) + { + return custom.RoleDescription; + } + return role.Blurb; + } + + /// + /// Returns the string of a . + /// + /// The to find. + /// The 's medium description. + public static string GetRoleMedDescription(this RoleBehaviour role) + { + if (role is ICustomRole custom) + { + return custom.RoleDescription; + } + return role.BlurbMed; + } + + /// + /// Returns the string of a . + /// + /// The to find. + /// The 's long description. + public static string GetRoleLongDescription(this RoleBehaviour role) + { + if (role is ICustomRole custom) + { + return custom.RoleLongDescription; + } + return role.BlurbLong; + } + /// /// Returns whether the is blacklisted from appearing and spawning. (Only applicable to vanilla roles). ///