//Shows relevant information about an interaction before starting it
    public void Prompt(string activityName, int activityTime, int proValue, int socValue, int casValue)
    {
        //Create the message to send depending on current level
        string message = "";

        if (level >= 1)
        {
            message += $"{activityName} will take {activityTime / 2} hours to complete";
        }
        if (level >= 2)
        {
            message += $"\nProfessional value: {proValue}\nSocial value: {socValue}\nCasual value: {casValue}";
        }
        if (level == 3)
        {
            if (proValue < 0 && numGoalsToComplete > 0)
            {
                message += "\nYou cannot do social or casual activities until you have completed all of Agenda's goals";
            }
            else
            {
                //TODO: Possibly change the message otherwise
            }
        }
        else if (level == 4)
        {
            // TODO: Ask Eric about this
        }

        //Set productivity aid string value in the string registry
        stringRegistry.Set(StringRegistryId, message);

        //Display the prompt
        dialogueSystem.Present(dialogueGraph);
    }
Example #2
0
    // Calls an interaction object's action given the name of it
    public bool Interact(string objectName)
    {
        System.Action action = (System.Action)registeredObjects[objectName];
        if (action != null)
        {
            stringRegistry.Set("Interaction Prompt", objectName);
            dialogueSystem.Present(objectPromptDialogue, () => {
                if (valueRegistry.Get("Confirmed Interaction") == 1)
                {
                    action();
                    objectNeglection[objectName] = false;
                    valueRegistry.Set($"Used {objectName}", 1);
                }
            });

            return(true);
        }
        Debug.LogWarning($"Could not interact because '{objectName}' is not registered");
        return(false);
    }