public static void Postfix(JournalScreen __instance, ref List <string> ___displayLines, string selectedTab) { // bail out if the originating call didn't go down the desired path if (__instance.selectedCategory != null || selectedTab != JournalScreen.STR_LOCATIONS) { return; } List <string> cats = JournalAPI.GetMapNoteCategories(); // also bail out if there weren't any journal categories if (cats.Count == 0) { return; } // clear the previously-added lines so that we can replace them here ___displayLines.Clear(); // now loop through and replace with new ones foreach (string cat in cats) { string item = "[" + (JournalAPI.GetCategoryMapNoteToggle(cat) ? "{{G|X}}" : " ") + "] {{" + (Colors.dict.Contains(cat) ? ((string)Colors.dict[cat])[2] : Colors.defaultString[2]) + "|" + cat + "}}" ; ___displayLines.Add(item); } }
void Start() { journalScreen = GameObject.Find("JournalScreen").GetComponent <JournalScreen>(); questDescriptionObj = journalScreen.transform.Find("QuestDescription").gameObject; questDescriptionObjText = questDescriptionObj.GetComponent <TextMeshProUGUI>(); amountOfGoldReward = questDescriptionObj.transform.Find("MoneyRewardBG/MoneyRewardCanvas/AmountOfMoneyText").GetComponent <TextMeshProUGUI>(); itemRewardCanvasTransform = questDescriptionObj.transform.Find("ItemRewardBG/ItemRewardCanvas"); }
void Awake() { stats = gameObject.transform.Find("StatsScreen").gameObject.GetComponent <StatsScreen>(); inventory = gameObject.transform.Find("InventoryScreen").gameObject.GetComponent <InventoryScreen>(); shop = gameObject.transform.Find("ShopScreen").gameObject.GetComponent <ShopScreen>(); journal = gameObject.transform.Find("JournalScreen").gameObject.GetComponent <JournalScreen>(); map = gameObject.transform.Find("MapScreen").gameObject.GetComponent <MapScreen>(); tabs = gameObject.transform.Find("GuiTabsButtons").gameObject; tabs.SetActive(false); playerAttack = GameObject.Find("MyCharacter").GetComponent <Attack>(); playerMovement = GameObject.Find("MyCharacter").GetComponent <Movement>(); playerRigidBody = GameObject.Find("MyCharacter").GetComponent <Rigidbody2D>(); }