示例#1
0
    public TranslatedWhosOnFirstComponentSolver(TwitchModule module) :
        base(module)
    {
        Component component = module.BombComponent.GetComponent(ComponentType);

        _buttons = (KMSelectable[])ButtonsField.GetValue(component);
        ModInfo  = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} what? [press the button that says \"WHAT?\"] | !{0} press 3 [press the third button in english reading order] | The phrase must match exactly | Not case sensitive | If the language used asks for pressing a literally blank button, use \"!{0} literally blank\"").Clone();

        string language = TranslatedModuleHelper.GetManualCodeAddOn(component, ComponentType);

        if (language != null)
        {
            ManualCode = $"Who%E2%80%99s%20on%20First{language}";
        }
        ModInfo.moduleDisplayName = $"Who's on First Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(component, ComponentType)}";
        module.BombComponent.StartCoroutine(SetHeaderText());
    }
    public TranslatedPasswordComponentSolver(TwitchModule module) :
        base(module)
    {
        _downButtons  = (KMSelectable[])DownButtonField.GetValue(module.BombComponent.GetComponent(PasswordComponentType));
        _submitButton = (MonoBehaviour)SubmitButtonField.GetValue(module.BombComponent.GetComponent(PasswordComponentType));
        _display      = (TextMesh[])DisplayField.GetValue(module.BombComponent.GetComponent(PasswordComponentType));
        ModInfo       = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} cycle 1 3 5 [cycle through the letters in columns 1, 3, and 5] | !{0} cycle [cycle through all columns] | !{0} toggle [move all columns down one letter] | !{0} world [try to submit a word]").Clone();

        string language = TranslatedModuleHelper.GetManualCodeAddOn(module.BombComponent.GetComponent(PasswordComponentType), PasswordComponentType);

        if (language != null)
        {
            ManualCode = $"Password{language}";
        }
        ModInfo.moduleDisplayName = $"Passwords Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(module.BombComponent.GetComponent(PasswordComponentType), PasswordComponentType)}";
        Module.HeaderText         = ModInfo.moduleDisplayName;
    }
    public TranslatedNeedyVentComponentSolver(TwitchModule module) :
        base(module)
    {
        _yesButton = (MonoBehaviour)YesButtonField.GetValue(module.BombComponent.GetComponent(NeedyVentComponentSolverType));
        _noButton  = (MonoBehaviour)NoButtonField.GetValue(module.BombComponent.GetComponent(NeedyVentComponentSolverType));
        ModInfo    = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} yes, !{0} y [answer yes] | !{0} no, !{0} n [answer no]").Clone();

        string language = TranslatedModuleHelper.GetManualCodeAddOn(module.BombComponent.GetComponent(NeedyVentComponentSolverType), NeedyVentComponentSolverType);

        if (language != null)
        {
            ManualCode = "Venting%20Gas";
        }
        //if (language != null) ManualCode = $"Venting%20Gas{language}";
        ModInfo.moduleDisplayName = $"Needy Vent Gas Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(module.BombComponent.GetComponent(NeedyVentComponentSolverType), NeedyVentComponentSolverType)}";
        Module.HeaderText         = ModInfo.moduleDisplayName;
    }
    public TranslatedMorseCodeComponentSolver(TwitchModule module) :
        base(module)
    {
        _component      = module.BombComponent.GetComponent(MorseCodeComponentType);
        _upButton       = (MonoBehaviour)UpButtonField.GetValue(_component);
        _downButton     = (MonoBehaviour)DownButtonField.GetValue(_component);
        _transmitButton = (MonoBehaviour)TransmitButtonField.GetValue(_component);
        ModInfo         = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} transmit 3.573, !{0} trans 573, !{0} transmit 3.573 MHz, !{0} tx 573 [transmit frequency 3.573]").Clone();

        string language = TranslatedModuleHelper.GetManualCodeAddOn(_component, MorseCodeComponentType);

        if (language != null)
        {
            ManualCode = $"Morse%20Code{language}";
        }
        ModInfo.moduleDisplayName = $"Morse Code Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(_component, MorseCodeComponentType)}";
        Module.HeaderText         = ModInfo.moduleDisplayName;
    }
    public TranslatedWhosOnFirstComponentSolver(BombCommander bombCommander, BombComponent bombComponent) :
        base(bombCommander, bombComponent)
    {
        _component = bombComponent.GetComponent(_componentType);
        _buttons   = (KMSelectable[])_buttonsField.GetValue(_component);
        modInfo    = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} what? [press the button that says \"WHAT?\"] | The phrase must match exactly | Not case sensitive| If the language used asks for pressing a literally blank button, use \"!{0} literally blank\"");

        if (bombCommander != null)
        {
            string language = TranslatedModuleHelper.GetManualCodeAddOn(bombComponent);
            if (language != null)
            {
                modInfo.manualCode = $"Who%E2%80%99s%20on%20First{language}";
            }
            modInfo.moduleDisplayName = $"Who's on First Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(bombComponent)}";
            bombComponent.StartCoroutine(SetHeaderText());
        }
    }
    public TranslatedPasswordComponentSolver(BombCommander bombCommander, BombComponent bombComponent) :
        base(bombCommander, bombComponent)
    {
        _downButtons  = (KMSelectable[])_downButtonField.GetValue(bombComponent.GetComponent(_passwordComponentType));
        _submitButton = (MonoBehaviour)_submitButtonField.GetValue(bombComponent.GetComponent(_passwordComponentType));
        _display      = (TextMesh[])_displayField.GetValue(bombComponent.GetComponent(_passwordComponentType));
        modInfo       = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} cycle 3 [cycle through the letters in column 3] | !{0} cycle 1 3 5 [cycle through the letters in columns 1, 3, and 5] | !{0} world [try to submit a word]");

        if (bombCommander != null)
        {
            string language = TranslatedModuleHelper.GetManualCodeAddOn(bombComponent);
            if (language != null)
            {
                modInfo.manualCode = $"Password{language}";
            }
            modInfo.moduleDisplayName = $"Passwords Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(bombComponent)}";
            bombComponent.StartCoroutine(SetHeaderText());
        }
    }
示例#7
0
    public TranslatedNeedyVentComponentSolver(BombCommander bombCommander, BombComponent bombComponent) :
        base(bombCommander, bombComponent)
    {
        _yesButton = (MonoBehaviour)_yesButtonField.GetValue(bombComponent.GetComponent(_needyVentComponentSolverType));
        _noButton  = (MonoBehaviour)_noButtonField.GetValue(bombComponent.GetComponent(_needyVentComponentSolverType));
        modInfo    = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} yes, !{0} y [answer yes] | !{0} no, !{0} n [answer no]");

        if (bombCommander != null)
        {
            string language = TranslatedModuleHelper.GetManualCodeAddOn(bombComponent);
            if (language != null)
            {
                modInfo.manualCode = "Venting%20Gas";
            }
            //if (language != null) modInfo.manualCode = $"Venting%20Gas{language}";
            modInfo.moduleDisplayName = $"Needy Vent Gas Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(bombComponent)}";
            bombComponent.StartCoroutine(SetHeaderText());
        }
    }
    public TranslatedButtonComponentSolver(BombCommander bombCommander, BombComponent bombComponent) :
        base(bombCommander, bombComponent)
    {
        _button = (KMSelectable)_buttonField.GetValue(bombComponent.GetComponent(_componentType));
        modInfo = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} tap [tap the button] | !{0} hold [hold the button] | !{0} release 7 [release when the digit shows 7] | (Important - Take note of the strip color on hold, it will change as other translated buttons get held, and the answer retains original color.)");
        Selectable selectable = bombComponent.GetComponent <Selectable>();

        selectable.OnCancel += () => { _selectedField.SetValue(bombComponent.GetComponent(_componentType), false); return(true); };

        if (bombCommander != null)
        {
            string language = TranslatedModuleHelper.GetManualCodeAddOn(bombComponent);
            if (language != null)
            {
                modInfo.manualCode = $"The%20Button{language}";
            }
            modInfo.moduleDisplayName = $"Big Button Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(bombComponent)}";
            bombComponent.StartCoroutine(SetHeaderText());
        }
    }
示例#9
0
    public TranslatedMorseCodeComponentSolver(BombCommander bombCommander, BombComponent bombComponent) :
        base(bombCommander, bombComponent)
    {
        _component      = bombComponent.GetComponent(_morseCodeComponentType);
        _upButton       = (MonoBehaviour)_upButtonField.GetValue(_component);
        _downButton     = (MonoBehaviour)_downButtonField.GetValue(_component);
        _transmitButton = (MonoBehaviour)_transmitButtonField.GetValue(_component);
        modInfo         = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} transmit 3.573, !{0} trans 573, !{0} tx 573 [transmit frequency 3.573]");

        if (bombCommander != null)
        {
            string language = TranslatedModuleHelper.GetManualCodeAddOn(bombComponent);
            if (language != null)
            {
                modInfo.manualCode = $"Morse%20Code{language}";
            }
            modInfo.moduleDisplayName = $"Morse Code Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(bombComponent)}";
            bombComponent.StartCoroutine(SetHeaderText());
        }
    }
示例#10
0
    public TranslatedButtonComponentSolver(TwitchModule module) :
        base(module)
    {
        var component = module.BombComponent.GetComponent(ComponentType);

        _button = (KMSelectable)ButtonField.GetValue(component);
        ModInfo = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "!{0} tap [tap the button] | !{0} hold [hold the button] | !{0} release 7 [release when the digit shows 7]").Clone();
        Selectable selectable = module.BombComponent.GetComponent <Selectable>();

        selectable.OnCancel += () => { SelectedField.SetValue(component, false); return(true); };

        string language = TranslatedModuleHelper.GetManualCodeAddOn(component, ComponentType);

        if (language != null)
        {
            ManualCode = $"The%20Button{language}";
        }
        ModInfo.moduleDisplayName = $"Big Button Translated{TranslatedModuleHelper.GetModuleDisplayNameAddon(component, ComponentType)}";
        Module.HeaderText         = ModInfo.moduleDisplayName;

        var mat = (Material)StripMaterialField.GetValue(component);

        StripMaterialField.SetValue(component, Object.Instantiate(mat));
    }
示例#11
0
    public static void Help(TwitchModule module, [Group(1)] bool pdf)
    {
        string manualType = pdf ? "pdf" : "html";

        string manualText = (Repository.GetManual(module.BombComponent.GetModuleID()) ?? module.BombComponent.GetModuleDisplayName()) + TranslatedModuleHelper.GetManualCodeAddOn(module.Solver.LanguageCode);
        string helpText   = string.IsNullOrEmpty(module.Solver.HelpMessage) ? string.Empty : string.Format(module.Solver.HelpMessage, module.Code, module.HeaderText);

        IRCConnection.SendMessage($"{module.HeaderText} : {helpText} : {UrlHelper.ManualFor(manualText, manualType, VanillaRuleModifier.GetModuleRuleSeed(module.Solver.ModInfo.moduleID) != 1)}");
    }