From 3f60bcae2ccef0fe57f3ec05cc909834e923443b Mon Sep 17 00:00:00 2001 From: XtraCube <72575280+XtraCube@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:18:39 -0500 Subject: [PATCH] default constructor not supported for custom role config --- MiraAPI/Roles/CustomRoleConfiguration.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/MiraAPI/Roles/CustomRoleConfiguration.cs b/MiraAPI/Roles/CustomRoleConfiguration.cs index d93fbf2..1470aa5 100644 --- a/MiraAPI/Roles/CustomRoleConfiguration.cs +++ b/MiraAPI/Roles/CustomRoleConfiguration.cs @@ -1,4 +1,5 @@ -using AmongUs.GameOptions; +using System; +using AmongUs.GameOptions; using MiraAPI.Utilities.Assets; using UnityEngine; @@ -9,6 +10,16 @@ namespace MiraAPI.Roles; /// public record struct CustomRoleConfiguration { +#pragma warning disable S1133 + [Obsolete("Default constructor is not supported. Please use the constructor that takes an ICustomRole parameter.")] +#pragma warning restore S1133 +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + public CustomRoleConfiguration() +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member + { + throw new NotImplementedException("Default constructor is not supported. Please use the constructor that takes an ICustomRole parameter."); + } + /// /// Initializes a new instance of the struct. ///