public CustomToggleOption AddOption(bool defaultValue, string title, bool onlyHost = true) { var obj = new CustomToggleOption(defaultValue, titleNum++, title, onlyHost); options.Add(obj); return(obj); }
public Team(Color Color, string Name, Sprite CaptureIcon) { TeamId = CurrentTeamId; CurrentTeamId++; this.Color = Color; ProtectionColor = new Color(Color.r, Color.g, Color.b, 0.5f); HealthBar = new HealthBar(ExtraResources.BUNDLE, Name); Name = Name.ToLowerInvariant(); this.Name = Name; this.CaptureIcon = CaptureIcon; ColorFormat = $"[{Color.ToHexRGBA()}]"; var Arguments = new Dictionary <string, Func <string> > { { "%c", () => ColorFormat }, { "%w", () => LanguageManager.Get($"m.team.{Name}.whom") } }; _Enable = MakeTeamToggle(Name, "enable", Arguments, GROUP_TEAMS); _Enable.ValueChanged += (Sender, Args) => { if (!_Enable.GetValue()) { TeamAffinityController.TeamDisabled(this); } }; }
// Runtime // 0028c6 private OfficerRole() : base("officer", new Color(0, 40f / 255f, 198f / 255f, 1)) { CreateDefaultCooldown(); _CanKillJoker = MakeToggle("can_kill_joker", true); _CanKillZombie = MakeToggle("can_kill_zombie", true); }
public override void registerRole() { //Registerting Options roleChance = new CustomNumberOption("floofus.sherrif.on", "<color=#FFFF00FF>Sheriff</color>", true, 0, 0, 100, 10); sheriffKillCd = new CustomNumberOption("floofus.sherrif.killcd", "<color=#FFFF00FF>Sheriff KillCd</color>", true, 25, 10, 40, 2.5f); sheriffKillOther = new CustomToggleOption("floofus.sherrif.killOther", "Sheriff Miskill Kills Crewmate", true, true); sheriffBodyReport = new CustomToggleOption("floofus.sherrif.reportbody", "Sheriff can report who they've killed", true, false); }
// ed05af private SpyRole() : base("spy", new Color(237f / 255f, 5f / 255f, 175f / 255f, 1)) { InvisibleCooldown = CreateCooldown("invisible.cooldown"); InvisibleEffect = CreateCooldown("invisible.effect", 10f); DisguiseCooldown = CreateCooldown("disguise.cooldown"); _ResetOnMeeting = MakeToggle("disguise.reset_on_meeting", true); }
// e67300 private ScientistRole() : base("scientist", new Color(230f / 255f, 115f / 255f, 0f / 255f, 1)) { TimeWarpCooldown = CreateCooldown("timewarp.cooldown"); TimeWarpEffect = CreateCooldown("timewarp.effect", 10f); _TimeWarpSpeed = MakeNumber("timewarp.speed", 0.75f, 0.25f, 10.0f, 0.25f); _TimeWarpSelf = MakeToggle("timewarp.self", true); TasksCooldown = CreateCooldown("tasks.cooldown"); }
public override void registerRole() { //Registerting Options roleChance = new CustomNumberOption("floofus.altruist.on", "<color=#660000FF>Altruist</color>", true, 0, 0, 100, 10f); reviveDurationOption = new CustomNumberOption("floofus.altruist.reviveDuration", "<color=#660000FF>revive Duration</color>", true, 10, 0, 20, 1f); targetBodyOption = new CustomToggleOption("floofus.altruist.targetBody", "<color=#660000FF>Target Body</color>", true, true); reviveDurationOption.HudVisible = false; targetBodyOption.HudVisible = false; }
// 24b720 private MedicRole() : base("medic", new Color(36f / 255f, 183f / 255f, 32f / 255f, 1)) { _ShowProtected = MakeToggle("shielded.show", true); _ShieldKillAttemptIndicator = MakeToggle("shielded.indicator", true); _KillerNameDuration = MakeNumber("report.name.time", 5, 0, 60, 2.5f); _KillerColorDuration = MakeNumber("report.color.time", 20, 0, 120, 2.5f); _ShowReports = MakeToggle("report.show", true); }
protected Role(string Id, Color RoleColor) { this.Id = Id; Color = RoleColor; var RoleHexColor = $"[{RoleColor.ToHexRGBA()}]"; var Arguments = new Dictionary <string, Func <string> > { { "%c", () => RoleHexColor }, { "%w", () => LanguageManager.Get($"er.{Id}.whom") } }; _Enable = MakeRoleToggle(Id, "enable", Arguments, GROUP_ENABLE); var RoleTitle = CustomOption.AddTitle("er.role.title"); RoleTitle.LocalizationArguments = new Dictionary <string, Func <string> > { { "%c", () => RoleHexColor }, { "%n", () => LanguageManager.Get($"er.{Id}") }, { "%r", () => Globals.FORMAT_WHITE }, }; }
// 1a5718 private ZombieRole() : base("zombie", new Color(26f / 255f, 87f / 255f, 24f / 255f, 1)) { CreateDefaultCooldown(); _ImpostorCanSeeAlpha = MakeToggle("impostor_can_see_alpha", false); }