Exemplo n.º 1
0
        public void ShowQuestsCommon()
        {
            //Debug.Log("QuestTrackerUI.ShowQuestsCommon()");
            if (PlayerManager.MyInstance != null && PlayerManager.MyInstance.PlayerUnitSpawned == false)
            {
                // shouldn't be doing anything without a player spawned.
                return;
            }
            ClearQuests();

            foreach (Quest quest in QuestLog.MyInstance.MyQuests.Values)
            {
                //Debug.Log("QuestTrackerUI.ShowQuestsCommon(): quest: " + quest);
                GameObject go = Instantiate(questPrefab, questParent);
                QuestTrackerQuestScript qs = go.GetComponent <QuestTrackerQuestScript>();
                qs.MyQuest = quest;
                if (qs == null)
                {
                    //Debug.Log("QuestTrackerUI.ShowQuestsCommon(): QuestGiverQuestScript is null");
                }
                qs.MyText.text = "[" + quest.MyExperienceLevel + "] " + quest.DisplayName;
                if (quest.IsComplete)
                {
                    qs.MyText.text += " (Complete)";
                }
                string objectives = string.Empty;

                qs.MyText.text += "\n<size=12>" + quest.GetUnformattedObjectiveList() + "</size>";

                //Debug.Log("QuestTrackerUI.ShowQuestsCommon(" + questGiver.name + "): " + questNode.MyQuest.MyTitle);
                qs.MyText.color = LevelEquations.GetTargetColor(PlayerManager.MyInstance.MyCharacter.CharacterStats.Level, quest.MyExperienceLevel);
                //quests.Add(go);
                questScripts.Add(qs);
            }
        }
Exemplo n.º 2
0
 public void OnKillEventHandler(BaseCharacter sourceCharacter, float creditPercent)
 {
     if (creditPercent == 0)
     {
         return;
     }
     //Debug.Log(gameObject.name + ": About to gain xp from kill with creditPercent: " + creditPercent);
     GainXP((int)(LevelEquations.GetXPAmountForKill(MyLevel, sourceCharacter.MyCharacterStats.MyLevel) * creditPercent));
 }
 public void IsComplete()
 {
     //Debug.Log("Checking questscript iscomplete on myquest: " + MyQuest.MyTitle);
     if (MyQuest.IsComplete && !markedComplete)
     {
         markedComplete = true;
         //Debug.Log("the quest is complete");
         MyText.text = "[" + MyQuest.MyExperienceLevel + "] " + MyQuest.MyName + " (Complete)";
     }
     else if (!MyQuest.IsComplete)
     {
         markedComplete = false;
         MyText.text    = "[" + MyQuest.MyExperienceLevel + "] " + MyQuest.MyName;
     }
     MyText.color = LevelEquations.GetTargetColor(PlayerManager.MyInstance.MyCharacter.MyCharacterStats.MyLevel, MyQuest.MyExperienceLevel);
 }
Exemplo n.º 4
0
 public virtual float GetPrimaryStatModifier(string statName, int currentLevel, BaseCharacter baseCharacter)
 {
     foreach (ItemPrimaryStatNode itemPrimaryStatNode in primaryStats)
     {
         if (statName == itemPrimaryStatNode.StatName)
         {
             if (itemPrimaryStatNode.UseManualValue)
             {
                 return(itemPrimaryStatNode.ManualModifierValue);
             }
             return((int)Mathf.Ceil(Mathf.Clamp(
                                        (float)GetItemLevel(currentLevel) * (LevelEquations.GetPrimaryStatForLevel(statName, currentLevel, baseCharacter) * (GetItemQualityNumber() - 1f)) * ((MyEquipmentSlotType.MyStatWeight * MyEquipmentSlotType.GetCompatibleSlotProfiles()[0].MyStatWeight) / GetTotalSlotWeights()),
                                        0f,
                                        Mathf.Infinity
                                        )));
         }
     }
     return(0f);
 }
Exemplo n.º 5
0
        public void UpdateXPBar(int _Level)
        {
            if (!PlayerManager.MyInstance.MyPlayerUnitSpawned)
            {
                return;
            }
            //Debug.Log("XPBarController.UpdateXPBar(" + _Level + ")");
            int   currentXP = PlayerManager.MyInstance.MyCharacter.MyCharacterStats.MyCurrentXP;
            int   neededXP  = LevelEquations.GetXPNeededForLevel(_Level);
            float xpPercent = (float)currentXP / (float)neededXP;

            // code for an actual image, not currently used
            //playerCastSlider.fillAmount = castPercent;

            // code for the default image
            xpSlider.GetComponent <LayoutElement>().preferredWidth = xpPercent * originalXPSliderWidth;

            xpText.text = currentXP + " / " + neededXP + " (" + ((int)(xpPercent * 100)).ToString() + "%)";
        }
Exemplo n.º 6
0
        public void UpdateStatsDescription()
        {
            //Debug.Log("CharacterPanel.UpdateStatsDescription");

            if (uIManager.characterPanelWindow.IsOpen == false)
            {
                return;
            }

            // update images on character buttons
            UpdateCharacterButtons();

            if (statsDescription == null)
            {
                Debug.LogError("Must set statsdescription text in inspector!");
            }
            string updateString = string.Empty;

            updateString += "Name: " + playerManager.MyCharacter.CharacterName + "\n";
            updateString += "Class: " + (playerManager.MyCharacter.CharacterClass == null ? "None" : playerManager.MyCharacter.CharacterClass.DisplayName) + "\n";
            updateString += "Specialization: " + (playerManager.MyCharacter.ClassSpecialization == null ? "None" : playerManager.MyCharacter.ClassSpecialization.DisplayName) + "\n";
            updateString += "Faction: " + (playerManager.MyCharacter.Faction == null ? "None" : playerManager.MyCharacter.Faction.DisplayName) + "\n";
            updateString += "Unit Type: " + (playerManager.MyCharacter.UnitType == null ? "None" : playerManager.MyCharacter.UnitType.DisplayName) + "\n";
            updateString += "Race: " + (playerManager.MyCharacter.CharacterRace == null ? "None" : playerManager.MyCharacter.CharacterRace.DisplayName) + "\n";
            updateString += "Level: " + playerManager.MyCharacter.CharacterStats.Level + "\n";
            updateString += "Experience: " + playerManager.MyCharacter.CharacterStats.CurrentXP + " / " + LevelEquations.GetXPNeededForLevel(playerManager.MyCharacter.CharacterStats.Level, systemConfigurationManager) + "\n\n";

            foreach (string statName in playerManager.MyCharacter.CharacterStats.PrimaryStats.Keys)
            {
                updateString += statName + ": " + playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].CurrentValue;
                if (playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].CurrentValue != playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].BaseValue)
                {
                    updateString += " ( " + playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].BaseValue +
                                    ((playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].CurrentValue - playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].BaseValue) > 0 ? " <color=green>+" : " <color=red>") +
                                    (playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].CurrentValue - playerManager.MyCharacter.CharacterStats.PrimaryStats[statName].BaseValue) +
                                    "</color> )";
                }
                updateString += "\n";
            }

            updateString += "\n";

            if (playerManager.MyCharacter.CharacterStats.PrimaryResource != null)
            {
                updateString += playerManager.MyCharacter.CharacterStats.PrimaryResource.DisplayName + ": " + playerManager.MyCharacter.CharacterStats.CurrentPrimaryResource + " / " + playerManager.MyCharacter.CharacterStats.MaxPrimaryResource + "\n\n";
            }

            updateString += "Amor: " + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Armor].CurrentValue + "\n";

            /*
             * updateString += "Armor: " + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Armor].CurrentValue;
             * if (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Armor].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Armor].BaseValue) {
             *  updateString += " ( " + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Armor].BaseValue + " + <color=green>" + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Armor].GetAddValue() + "</color> )";
             * }
             */

            updateString += "Physical Power: " +
                            (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].CurrentValue +
                             playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue);
            if (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].BaseValue ||
                playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue)
            {
                updateString += " ( " +
                                (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].BaseValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue) +
                                (((playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].CurrentValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue) - (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].BaseValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue)) > 0 ? " <color=green>+" : " <color=red>") +
                                ((playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].CurrentValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue) - (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.PhysicalDamage].BaseValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue)) +
                                "</color> )";
            }
            updateString += "\n";

            updateString += "SpellPower: " +
                            (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].CurrentValue +
                             playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue);
            if (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].BaseValue ||
                playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue)
            {
                updateString += " ( " +
                                (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].BaseValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue) +
                                (((playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].CurrentValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue) - (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].BaseValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue)) > 0 ? " <color=green>+" : " <color=red>") +
                                ((playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].CurrentValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].CurrentValue) - (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.SpellDamage].BaseValue + playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Damage].BaseValue)) +
                                "</color> )";
            }
            updateString += "\n";

            updateString += "Critical Hit Chance: " +
                            playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].CurrentValue + "%";
            if (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].BaseValue)
            {
                updateString += " ( " +
                                playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].BaseValue +
                                ((playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].CurrentValue - playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].BaseValue) > 0 ? " <color=green>+" : " <color=red>")
                                + (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].CurrentValue - playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.CriticalStrike].BaseValue) + "</color> )";
            }
            updateString += "\n";

            updateString += "Accuracy: " +
                            LevelEquations.GetSecondaryStatForCharacter(SecondaryStatType.Accuracy, playerManager.MyCharacter.CharacterStats) + "%";
            if (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Accuracy].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Accuracy].BaseValue)
            {
                updateString += " ( " +
                                playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Accuracy].BaseValue +
                                ((playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Accuracy].CurrentValue - playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Accuracy].BaseValue) > 0 ? " <color=green>+" : " <color=red>")
                                + (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Accuracy].CurrentValue - playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Accuracy].BaseValue) + "</color> )";
            }
            updateString += "\n";

            updateString += "Attack/Casting Speed: " +
                            LevelEquations.GetSecondaryStatForCharacter(SecondaryStatType.Speed, playerManager.MyCharacter.CharacterStats) + "%";
            if (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Speed].CurrentValue != playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Speed].BaseValue)
            {
                updateString += " ( "
                                //playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Speed].BaseValue +
                                + ((playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Speed].CurrentValue - playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Speed].BaseValue) > 0 ? "<color=green>+" : " + <color=red>")
                                + (playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Speed].CurrentValue - playerManager.MyCharacter.CharacterStats.SecondaryStats[SecondaryStatType.Speed].BaseValue) + "%</color> )";
            }
            updateString += "\n";

            updateString += "Movement Speed: " + Mathf.Clamp(playerManager.MyCharacter.CharacterStats.RunSpeed, 0, playerManager.MaxMovementSpeed).ToString("F2") + " (m/s)\n\n";

            statsDescription.text = updateString;
        }
Exemplo n.º 7
0
        public void ShowDescription(Quest quest)
        {
            //Debug.Log("QuestDetailsArea.ShowDescription()");

            ClearDescription();

            if (quest == null)
            {
                return;
            }
            this.quest = quest;

            questDescription.text = quest.GetObjectiveDescription();

            experienceReward.text += LevelEquations.GetXPAmountForQuest(playerManager.MyCharacter.CharacterStats.Level, quest, systemConfigurationManager) + " XP";

            // display currency rewards

            List <CurrencyNode> currencyNodes = quest.GetCurrencyReward();

            // currencies could be different
            if (currencyNodes.Count > 0)
            {
                currencyHeading.gameObject.SetActive(true);
                currencyArea.gameObject.SetActive(true);
                if (currencyLootButton != null)
                {
                    KeyValuePair <Sprite, string> keyValuePair = currencyConverter.RecalculateValues(currencyNodes, true);
                    currencyLootButton.Icon.sprite = keyValuePair.Key;
                    currencyLootButton.Title.text  = keyValuePair.Value;
                }
            }
            else
            {
                currencyHeading.gameObject.SetActive(false);
                currencyArea.gameObject.SetActive(false);
            }


            // show item rewards
            if (quest.ItemRewards.Count > 0)
            {
                itemsHeading.gameObject.SetActive(true);
                if (quest.MaxItemRewards > 0)
                {
                    itemsHeading.GetComponent <TextMeshProUGUI>().text = "Choose " + quest.MaxItemRewards + " Item Rewards:";
                }
                else
                {
                    itemsHeading.GetComponent <TextMeshProUGUI>().text = "Item Rewards:";
                }
            }
            for (int i = 0; i < quest.ItemRewards.Count; i++)
            {
                RewardButton rewardIcon = objectPooler.GetPooledObject(rewardIconPrefab, itemIconsArea.transform).GetComponent <RewardButton>();
                rewardIcon.Configure(systemGameManager);
                rewardIcon.SetOptions(owner.RectTransform, quest.MaxItemRewards > 0);
                rewardIcon.OnAttempSelect += HandleAttemptSelect;
                //Debug.Log("QuestDetailsArea.ShowDescription(): setting describable (and attemptselect) for: " + quest.MyItemRewards[i]);
                rewardIcon.SetDescribable(quest.ItemRewards[i]);
                itemRewardIcons.Add(rewardIcon);
                //if (quest.MaxItemRewards > 0) {
                itemGrid.AddActiveButton(rewardIcon);
                //}
            }

            // show ability rewards
            if (quest.AbilityRewards.Count > 0)
            {
                abilitiesHeading.gameObject.SetActive(true);
                if (quest.MaxAbilityRewards > 0)
                {
                    abilitiesHeading.GetComponent <TextMeshProUGUI>().text = "Choose " + quest.MaxAbilityRewards + " Ability Rewards:";
                }
                else
                {
                    abilitiesHeading.GetComponent <TextMeshProUGUI>().text = "Ability Rewards:";
                }
            }
            else
            {
                abilitiesHeading.GetComponent <TextMeshProUGUI>().text = "";
            }
            for (int i = 0; i < quest.AbilityRewards.Count; i++)
            {
                RewardButton rewardIcon = objectPooler.GetPooledObject(rewardIconPrefab, abilityIconsArea.transform).GetComponent <RewardButton>();
                rewardIcon.Configure(systemGameManager);
                rewardIcon.SetOptions(owner.RectTransform, quest.MaxAbilityRewards > 0);
                rewardIcon.OnAttempSelect += HandleAttemptSelect;
                //Debug.Log("QuestDetailsArea.ShowDescription(): setting describable (and attemptselect) for: " + quest.MyAbilityRewards[i]);
                rewardIcon.SetDescribable(quest.AbilityRewards[i]);
                abilityRewardIcons.Add(rewardIcon);
                //if (quest.MaxAbilityRewards > 0) {
                abilityGrid.AddActiveButton(rewardIcon);
                //}
            }

            // show faction rewards
            if (quest.FactionRewards.Count > 0)
            {
                factionsHeading.gameObject.SetActive(true);
                if (quest.MaxFactionRewards > 0)
                {
                    factionsHeading.GetComponent <TextMeshProUGUI>().text = "Choose " + quest.MaxFactionRewards + " Reputation Rewards:";
                }
                else
                {
                    factionsHeading.GetComponent <TextMeshProUGUI>().text = "Reputation Rewards:";
                }
            }
            else
            {
                factionsHeading.GetComponent <TextMeshProUGUI>().text = "";
            }
            for (int i = 0; i < quest.FactionRewards.Count; i++)
            {
                FactionRewardButton rewardIcon = objectPooler.GetPooledObject(factionRewardIconPrefab, factionIconsArea.transform).GetComponent <FactionRewardButton>();
                rewardIcon.Configure(systemGameManager);
                rewardIcon.SetOptions(owner.RectTransform, quest.MaxFactionRewards > 0);
                rewardIcon.OnAttempSelect += HandleAttemptSelect;
                //Debug.Log("QuestDetailsArea.ShowDescription(): setting describable (and attemptselect) for: " + quest.MyFactionRewards[i]);
                rewardIcon.SetDescribable(quest.FactionRewards[i]);
                factionRewardIcons.Add(rewardIcon);
                //if (quest.MaxFactionRewards > 0) {
                factionGrid.AddActiveButton(rewardIcon);
                //}
            }

            // show Skill rewards
            if (quest.SkillRewards.Count > 0)
            {
                skillHeading.gameObject.SetActive(true);
                if (quest.MaxSkillRewards > 0)
                {
                    skillHeading.GetComponent <TextMeshProUGUI>().text = "Choose " + quest.MaxSkillRewards + " Skill Rewards:";
                }
                else
                {
                    skillHeading.GetComponent <TextMeshProUGUI>().text = "Skill Rewards:";
                }
            }
            else
            {
                skillHeading.GetComponent <TextMeshProUGUI>().text = "";
            }
            for (int i = 0; i < quest.SkillRewards.Count; i++)
            {
                RewardButton rewardIcon = objectPooler.GetPooledObject(rewardIconPrefab, skillIconsArea.transform).GetComponent <RewardButton>();
                rewardIcon.Configure(systemGameManager);
                rewardIcon.SetOptions(owner.RectTransform, quest.MaxSkillRewards > 0);
                rewardIcon.SetDescribable(quest.SkillRewards[i]);
                skillRewardIcons.Add(rewardIcon);
                //if (quest.MaxSkillRewards > 0) {
                skillGrid.AddActiveButton(rewardIcon);
                //}
            }
        }
        public void ShowInteractablesCommon(Interactable interactable, bool suppressAutoInteract = false)
        {
            //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + ")");
            ClearButtons();

            // updated to only use valid interactables
            if (playerManager.PlayerUnitSpawned == false)
            {
                //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + ") player unit is null");
                return;
            }
            List <InteractableOptionComponent> currentInteractables = interactable.GetCurrentInteractables();

            if (currentInteractables.Count == 0)
            {
                // this could have been a refresh from while a quest was open overtop.  close it if there are no valid interactables
                uIManager.interactionWindow.CloseWindow();
                return;
            }

            // going to just pop the first available interaction window for now and see how that feels
            //bool optionOpened = false;
            foreach (InteractableOptionComponent _interactable in currentInteractables)
            {
                // handle questgiver
                if (_interactable is QuestGiverComponent)
                {
                    foreach (QuestNode questNode in (_interactable as QuestGiverComponent).Props.Quests)
                    {
                        Quest quest = questNode.Quest;
                        if (quest != null)
                        {
                            string displayText = string.Empty;
                            string questStatus = quest.GetStatus();
                            if (questStatus == "complete" && questNode.EndQuest == true)
                            {
                                displayText = "<color=yellow>?</color> ";
                            }
                            else if (questNode.StartQuest == true && questStatus == "available")
                            {
                                displayText = "<color=yellow>!</color> ";
                            }
                            // only display complete and available quests here

                            if (displayText != string.Empty)
                            {
                                GameObject go = objectPooler.GetPooledObject(questPrefab, availableQuestArea.transform);
                                InteractionPanelQuestScript qs = go.GetComponent <InteractionPanelQuestScript>();
                                qs.Configure(systemGameManager);
                                qs.Quest      = quest;
                                qs.QuestGiver = (_interactable as QuestGiverComponent);

                                displayText += quest.DisplayName;

                                qs.Text.text = displayText;

                                //Debug.Log("QuestTrackerUI.ShowQuestsCommon(" + questGiver.name + "): " + questNode.MyQuest.MyTitle);
                                qs.Text.color = LevelEquations.GetTargetColor(playerManager.MyCharacter.CharacterStats.Level, quest.ExperienceLevel);
                                questScripts.Add(qs);
                                // disabled this next bit because it was causing repeatables with no objectives to be marked as complete

                                /*
                                 * if (quest.IsComplete && !quest.TurnedIn) {
                                 *  go.transform.SetParent(completeQuestArea.transform);
                                 * } else if (!quest.IsComplete && questLog.HasQuest(quest.DisplayName) == false) {
                                 *  go.transform.SetParent(availableQuestArea.transform);
                                 * }
                                 */
                            }
                        }
                    }
                }
                else
                {
                    // this block used to be outside the else statement, but for now we don't want quests to show as an interaction option because they are handled separately above
                    // handle generic stuff
                    if (_interactable.DisplayName != null && _interactable.DisplayName != string.Empty && _interactable.GetCurrentOptionCount() > 0)
                    {
                        //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Instantiating button");
                        for (int i = 0; i < _interactable.GetCurrentOptionCount(); i++)
                        {
                            GameObject             go  = objectPooler.GetPooledObject(interactableButtonPrefab, interactableButtonParent);
                            InteractionPanelScript iPS = go.GetComponent <InteractionPanelScript>();
                            if (iPS != null)
                            {
                                iPS.Configure(systemGameManager);
                                iPS.Setup(_interactable, i);
                                interactionPanelScripts.Add(iPS);
                            }
                        }
                    }
                }
            }
            foreach (InteractionPanelQuestScript questScript in questScripts)
            {
                uINavigationControllers[0].AddActiveButton(questScript);
            }
            foreach (InteractionPanelScript interactionPanelScript in interactionPanelScripts)
            {
                uINavigationControllers[0].AddActiveButton(interactionPanelScript);
            }

            uINavigationControllers[0].FocusFirstButton();

            if (uIManager.dialogWindow.IsOpen)
            {
                //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Dialog Window is open, returning to prevent other windows from popping");
                // if we are mid dialog, we don't want to pop another window yet
                return;
            }


            // priority open - any other current interactable third, but only if there is one
            if (currentInteractables.Count > 1 || suppressAutoInteract == true || uINavigationControllers[0].ActiveNavigableButtonCount > 1)
            {
                //Debug.Log("InteractionPanelUI.Interact(): currentInteractables count: " + currentInteractables.Count);
                return;
            }

            // priority open - completed quest first
            foreach (InteractionPanelQuestScript questScript in questScripts)
            {
                //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Checking questScript for complete quest");
                if (questScript.Quest.MarkedComplete)
                {
                    //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Checking questScript: quest is complete, selecting");
                    questScript.Interact();
                    //optionOpened = true;
                    return;
                }
            }

            // priority open - available quest second
            foreach (InteractionPanelQuestScript questScript in questScripts)
            {
                //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Checking questScript for available quest");
                if (questScript.Quest.GetStatus() == "available")
                {
                    //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Checking questScript: quest is available, selecting");
                    questScript.Interact();
                    //optionOpened = true;
                    return;
                }
            }

            foreach (InteractionPanelScript interactionPanelScript in interactionPanelScripts)
            {
                //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Checking interaction Panel Script");
                if (interactionPanelScript.InteractableOption.CanInteract() && interactionPanelScript.InteractableOption.GetCurrentOptionCount() == 1)
                {
                    //Debug.Log("InteractionPanelUI.ShowInteractablesCommon(" + interactable.name + "): Checking interaction Panel Script: canInteract is TRUE!!!");
                    interactionPanelScript.InteractableOption.Interact(playerManager.UnitController.CharacterUnit);
                    //optionOpened = true;
                    return;
                }
            }
        }