『 AndriesWorks 』
『 AndriesWorks 』
CC#
Created by 『 AndriesWorks 』 on 12/27/2024 in #help
Needing help with a mod code (Among Us)
this is the code, i need help wih setting up the rest of the options, which i am a complete beginner to, and dont understand anything, or even how to set it up
using TOHE.Roles.Core;
using static TOHE.Options;

namespace TOHE.Roles.Crewmate;

internal class Contractor : RoleBase
{
//===========================SETUP================================\\
private const int Id = 31800;
public static bool HasEnabled => CustomRoleManager.HasEnabled(CustomRoles.Contractor);
public override CustomRoles ThisRoleBase => CustomRoles.Shapeshifter;
public override Custom_RoleType ThisRoleType => Custom_RoleType.CrewmatePlanned;
//==================================================================\\

private static OptionItem TimeLimitForTask;
private static OptionItem MaxContracts;
private static OptionItem CanGiveNeutralsContracts;

public override void SetupCustomOption()
{
SetupRoleOptions(Id, TabGroup.CrewmateRoles, CustomRoles.Contractor);
MaxContracts = IntegerOptionItem.Create(Id + 5, "ContractorMaxContracts", new(1, 14, 1), 3, TabGroup.CrewmateRoles, false)
.SetParent(CustomRoleSpawnChances[CustomRoles.Contractor])
.SetValueFormat(OptionFormat.Times);
TimeLimitForTask = IntegerOptionItem.Create(Id + 10, "ContractorTimeLimitForTask", new(30, 180, 5), 45, TabGroup.CrewmateRoles, false)
.SetParent(CustomRoleSpawnChances[CustomRoles.Contractor])
.SetValueFormat(OptionFormat.Seconds);
CanGiveNeutralsContracts = BooleanOptionItem.Create(Id + 18, "ContractorCanGiveNeutralsContracts", false, TabGroup.CrewmateRoles, false)
.SetParent(CustomRoleSpawnChances[CustomRoles.Contractor]);
}
}
using TOHE.Roles.Core;
using static TOHE.Options;

namespace TOHE.Roles.Crewmate;

internal class Contractor : RoleBase
{
//===========================SETUP================================\\
private const int Id = 31800;
public static bool HasEnabled => CustomRoleManager.HasEnabled(CustomRoles.Contractor);
public override CustomRoles ThisRoleBase => CustomRoles.Shapeshifter;
public override Custom_RoleType ThisRoleType => Custom_RoleType.CrewmatePlanned;
//==================================================================\\

private static OptionItem TimeLimitForTask;
private static OptionItem MaxContracts;
private static OptionItem CanGiveNeutralsContracts;

public override void SetupCustomOption()
{
SetupRoleOptions(Id, TabGroup.CrewmateRoles, CustomRoles.Contractor);
MaxContracts = IntegerOptionItem.Create(Id + 5, "ContractorMaxContracts", new(1, 14, 1), 3, TabGroup.CrewmateRoles, false)
.SetParent(CustomRoleSpawnChances[CustomRoles.Contractor])
.SetValueFormat(OptionFormat.Times);
TimeLimitForTask = IntegerOptionItem.Create(Id + 10, "ContractorTimeLimitForTask", new(30, 180, 5), 45, TabGroup.CrewmateRoles, false)
.SetParent(CustomRoleSpawnChances[CustomRoles.Contractor])
.SetValueFormat(OptionFormat.Seconds);
CanGiveNeutralsContracts = BooleanOptionItem.Create(Id + 18, "ContractorCanGiveNeutralsContracts", false, TabGroup.CrewmateRoles, false)
.SetParent(CustomRoleSpawnChances[CustomRoles.Contractor]);
}
}
5 replies