From 180b54fc4c9e2118b63dce8a24abcc5c0f817ef9 Mon Sep 17 00:00:00 2001 From: Aaron McGuire Date: Sat, 2 Mar 2024 11:36:59 -0500 Subject: [PATCH] small spring shoes changes --- .../Items of the Month/2024/Spring Shoes.ash | 19 +++++++++++++++++-- Source/relay/TourGuide/Support/IOTMs.ash | 3 +++ Source/relay/TourGuide/Support/Statics.ash | 4 ++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Source/relay/TourGuide/Items of the Month/2024/Spring Shoes.ash b/Source/relay/TourGuide/Items of the Month/2024/Spring Shoes.ash index 8b739f80..0f8ab53a 100644 --- a/Source/relay/TourGuide/Items of the Month/2024/Spring Shoes.ash +++ b/Source/relay/TourGuide/Items of the Month/2024/Spring Shoes.ash @@ -4,13 +4,25 @@ RegisterResourceGenerationFunction("IOTMSpringShoesGenerateResource"); void IOTMSpringShoesGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [int] optional_task_entries, ChecklistEntry [int] future_task_entries) { - if (__misc_state["in run"] && available_amount($item[spring shoes]) > 0 && my_path().id != PATH_COMMUNITY_SERVICE) + // Initialization. Do not generate if you don't have spring shoes. + if (!__iotms_usable[lookupItem("spring shoes")]) return; + + // Added a check for all paths where you do not want the tile at all: + // - Community Service: irrelevant + // - WereProfessor: is not a free run. + + boolean pathCheck = true; + pathCheck = my_path().id == PATH_COMMUNITY_SERVICE ? false : true; + pathCheck = my_path().id == PATH_WEREPROFESSOR ? false : true; + + // Technically, the available_amount here precludes the need for the initialization up top. + if (__misc_state["in run"] && available_amount($item[spring shoes]) > 0 && pathCheck) { if ($effect[everything looks green].have_effect() == 0) { string [int] description; string url = "inventory.php?ftext=spring+shoes"; - description.listAppend(HTMLGenerateSpanFont("Run away from your problems!", "green")); + description.listAppend(HTMLGenerateSpanFont("Free-run away from your problems with the Spring Away skill!", "green")); if (lookupItem("spring shoes").equipped_amount() == 0) { description.listAppend(HTMLGenerateSpanFont("Equip the spring shoes first.", "red")); @@ -22,6 +34,9 @@ void IOTMSpringShoesGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEn void IOTMSpringShoesGenerateResource(ChecklistEntry [int] resource_entries) { + // Initialization. Do not generate iof you don't have spring shoes. + if (!__iotms_usable[lookupItem("spring shoes")]) return; + string [int] banishDescription; banishDescription.listAppend("All day banish, doesn't end combat"); if (lookupItem("spring shoes").equipped_amount() == 0) diff --git a/Source/relay/TourGuide/Support/IOTMs.ash b/Source/relay/TourGuide/Support/IOTMs.ash index f1409968..ffb4b98f 100644 --- a/Source/relay/TourGuide/Support/IOTMs.ash +++ b/Source/relay/TourGuide/Support/IOTMs.ash @@ -148,6 +148,9 @@ void initialiseIOTMsUsable() if (lookupItem("candy cane sword cane").available_amount() > 0) //Dec 2023 __iotms_usable[lookupItem("candy cane sword cane")] = true; + + if (lookupItem("spring shoes").available_amount() > 0) //Feb 2023 + __iotms_usable[lookupItem("spring shoes")] = true; //Can't use many things in G-Lover if (my_path().id == PATH_G_LOVER) //Path 33 diff --git a/Source/relay/TourGuide/Support/Statics.ash b/Source/relay/TourGuide/Support/Statics.ash index 0e0d7798..19bef736 100644 --- a/Source/relay/TourGuide/Support/Statics.ash +++ b/Source/relay/TourGuide/Support/Statics.ash @@ -56,6 +56,10 @@ static { int PATH_JOURNEYMAN = 45; int PATH_FALL_OF_THE_DINOSAURS = 46; int PATH_AVATAR_OF_SHADOWS_OVER_LOATHING = 47; + int PATH_LEGACY_OF_LOATHING = 48; + int PATH_SMOL = 49; // easier to type + int PATH_A_SHRUNKEN_ADVENTURER_AM_I = 49; + int PATH_WEREPROFESSOR = 50; } float numeric_modifier_replacement(item it, string modifier_string) {