Exemplo n.º 1
0
 static public void SetOptions_Intimidate(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate_2_imply"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate_2_threaten"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate_2_act"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_neverMind"));
 }
 public static void SetupDialogueOptionsFromJSON(JSONObject json)
 {
     int i;
     for(i = 0; i < json.Count; i++)
     {
         int j;
         JSONObject foo;
         JSONObject bar;
         if(json.keys[i] == "Prompts")
         {
             foo = json.list[i];
             for (j = 0; j < foo.Count; j++)
             {
                 bar = foo.list[j];
                 new Dialogue_Prompt(bar.GetField("id").str, bar.GetField("locsuffix").str);
             }
         }
         else if (json.keys[i] == "Options")
         {
             foo = json.list[i];
             for (j = 0; j < foo.Count; j++)
             {
                 bar = foo.list[j];
                 Dialogue_Option newOption = new Dialogue_Option(bar.GetField("id").str, bar.GetField ("buttontext").ToString());
             }
         }
     }
     Dialogue_Prompt.AddFollowUps();
 }
    static public void SetupDialogueOptionsFromJSON(JSONObject json)
    {
        int i;

        for (i = 0; i < json.Count; i++)
        {
            int        j;
            JSONObject foo;
            JSONObject bar;
            if (json.keys[i] == "Prompts")
            {
                foo = json.list[i];
                for (j = 0; j < foo.Count; j++)
                {
                    bar = foo.list[j];
                    new Dialogue_Prompt(bar.GetField("id").str, bar.GetField("locsuffix").str);
                }
            }
            else if (json.keys[i] == "Options")
            {
                foo = json.list[i];
                for (j = 0; j < foo.Count; j++)
                {
                    bar = foo.list[j];
                    Dialogue_Option newOption = new Dialogue_Option(bar.GetField("id").str, bar.GetField("buttontext").ToString());
                }
            }
        }
        Dialogue_Prompt.AddFollowUps();
    }
Exemplo n.º 4
0
 static public void SetOptions_Intimidate_Action(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate_3_informBoss"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate_3_breakMerchandise"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate_3_attackShopkeeper"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate_3_burnShopDown"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_neverMind"));
 }
Exemplo n.º 5
0
    static public void SetOptions_ShopInventory(Dialogue_Prompt obj)
    {
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_shopProduct"));
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_shopProduct"));
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_shopProduct"));
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_shopProduct"));

        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_neverMind"));
    }
Exemplo n.º 6
0
    static public void SetOptions_AssaultSecondary(Dialogue_Prompt obj)
    {
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_placate"));
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_getDetails"));
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_ignore"));

        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_placate"));
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_getDetails"));
        obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_ignore"));
    }
Exemplo n.º 7
0
 static public void SetOptions_Root(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_requestPayment"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_earlyPayment"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_renegotiate"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_offerProtection"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_goShopping"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_chitChat"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_exitShop"));
 }
    private void SetOptions()
    {
        UnityEngine.Events.UnityAction[] actions = GetButtonActionFromDict((Dialogue_Prompt_Logic.FilterKeys(currentDialoguePrompt, shopkeeperRef)).ToArray());

        for (int i = 0; i < actions.Length; ++i)
        {
            SetBtnActions(i + 1, actions [i]);
        }

        List <string> buttonKeys = Dialogue_Prompt_Logic.FilterKeys(currentDialoguePrompt, shopkeeperRef);

        string[] choicesString = new string[6];
        for (int i = 0; i < buttonKeys.Count; ++i)
        {
            string buttonTextKey = Dialogue_Option.GetOptionByName(buttonKeys[i]).buttonTextKey;

            List <string> parameters = new List <string>();
            switch (buttonKeys[i])
            {
            case "dialogue_option_shopProduct": {
                if (i < shopkeeperRef.home.inventory.items.Count && shopkeeperRef.home.inventory.items[i] != null)
                {
                    string parameter = Localization.LocalizeText(shopkeeperRef.home.inventory.items[i].id);
                    parameters.Add(parameter);
                    choicesString[i] = Localization.LocalizeText(buttonTextKey, parameters);
                }
                else
                {
                    choicesString[i] = "DISABLE ME!";
                }
                break;
            }

            //case "dialogue_option_confirmPurchase": {
            //parameters.Add ();
            //break; }
            default: {
                choicesString[i] = Localization.LocalizeText(buttonTextKey);
                break;
            }
            }
        }

        choicesText.Clear();
        choicesText = choicesString.ToList();

        SetChoices(choicesString);
    }
Exemplo n.º 9
0
 static public void SetOptions_AidingBusiness(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_donate"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_cutProtectionCost"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_neverMind"));
 }
Exemplo n.º 10
0
 static public void SetOptions_OutsideShop(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_enterShop"));
 }
Exemplo n.º 11
0
 static public void SetOptions_PaymentFull(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_accept"));
 }
Exemplo n.º 12
0
 static public void SetOptions_Greeting(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_returnGreeting"));
 }
Exemplo n.º 13
0
 static public void SetOptions_ConfirmPurchase(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_confirmPurchase"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_neverMind"));
 }
Exemplo n.º 14
0
 static public void SetOptions_OfferRefused(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_tryAnotherOffer"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_neverMind"));
 }
Exemplo n.º 15
0
 static public void SetOptions_RegisterTakeOrLeaveMoney(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_accept"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate"));
 }
Exemplo n.º 16
0
 static public void SetOptions_RegisterHiddenMoney(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_accept"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_takeRegisterMoney"));
 }
Exemplo n.º 17
0
 static public void SetOptions_RegisterEmpty(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_accept"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_offerToAidBusiness"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_exitShop"));
 }
Exemplo n.º 18
0
 static public void SetOptions_PurchaseSuccessful(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_neverMind"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_exitShop"));
 }
Exemplo n.º 19
0
 static public void SetOptions_AskToLowerPayment(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_accept"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_reject"));
 }
Exemplo n.º 20
0
 static public void SetOptions_IntimidatedUnaffected(Dialogue_Prompt obj)
 {
     // TODO: follow ups for intimidate
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_exitShop"));
 }
Exemplo n.º 21
0
 static public void SetOptions_OfferAccepted(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_acknowledge"));
 }
Exemplo n.º 22
0
 static public void SetOptions_PaymentNone(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_intimidate"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_checkTheRegister"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_accept"));
 }
Exemplo n.º 23
0
 public void AddFollowUp(Dialogue_Option option)
 {
     _followUps.Add (option);
     _followUpKeys.Add (option.id);
 }
Exemplo n.º 24
0
 static public void SetOptions_GiveDetails(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_acknowledge"));
 }
Exemplo n.º 25
0
 public void AddFollowUp(Dialogue_Option option)
 {
     _followUps.Add(option);
     _followUpKeys.Add(option.id);
 }
Exemplo n.º 26
0
 static public void SetOptions_ProblemWithPayment(Dialogue_Prompt obj)
 {
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_hearProposition"));
     obj.AddFollowUp(Dialogue_Option.GetOptionByName("dialogue_option_offerToAidBusiness"));
 }