Skip to content

Commit

Permalink
Varlamore Part 2 Quest Cleanup (Zoinkwiz#1788)
Browse files Browse the repository at this point in the history
* cleanup: Remove outdated comments from DotI

* feat: Added PuzzleWrapperStep creation help to QuestStep

This should make it easier to use any QuestStep in PuzzleWrapperStep, as well as generally making it more concise when using various dialog adding and highlighting in the future.

* feat: Added self-return method for alternateNpcs

This makes it easier to use NpcStep in things such as PuzzleWrapperStep.

* fix: Allow highlight changes on step visibility change

As some steps may want to default to different other steps upon being hidden (for example in a PuzzleWrapperStep), this ensures that the sidebar highlight check is re-run if a step is hidden/shown.

* fix: Added PuzzleWrapperStep to first floor puzzle of tHoD

* fix: Add PuzzleWrapper to third floor puzzle tHoD

* feat: Return self on addIcon and addAlternateObjects

* fix: Ensure better sync between quest state and QuestStepPanel

This makes use of the actual active sidebar step for the queststeppanel, rather than a local variable representing it based on a last-known state.

This should ensure that panels are properly checked, and there's no chance of this variable not representing the actual quest state.

This does mean recolour of the sidebar can occur on things which are already set, but I don't think this should have any noted performance changes.

* fix: Add PuzzleWrapperStep to statue puzzle in tHoD

* fix: Add PuzzleWrapperStep to shaming Halen in EAA

* fix: Return ObjectStep from addAlternateObjects
  • Loading branch information
Zoinkwiz authored Oct 23, 2024
1 parent f343c22 commit 8485023
Show file tree
Hide file tree
Showing 9 changed files with 373 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ public void setupSteps()
talkToGuardsAgainToTellThemYouAreReadyStep.addStep(not(inVilla), returnToButlerAndHeadInside);

/// 28 + 30
// TODO: what happens if you accuse the wrong person?
interrogateConstantiniusAgain = new NpcStep(this, NpcID.CONSTANTINIUS, new WorldPoint(1446, 2931, 2), "Interrogate Constantinius.");
interrogateConstantiniusAgain.addDialogStep("No.");
interrogateXocotlaAgain = new NpcStep(this, NpcID.XOCOTLA, new WorldPoint(1444, 2928, 2), "Interrogate Xocotla.");
Expand All @@ -529,7 +528,6 @@ public void setupSteps()
accuseAdala = new NpcStep(this, NpcID.ADALA, new WorldPoint(1446, 2933, 2), "Accuse Adala of the crime, ready for a fight you cannot lose.");
accuseAdala.addDialogStep("Accuse Adala.");

// TODO: helper steps to climb upstairs?
speakToSuspects = new ConditionalStep(this, accuseAdala);
speakToSuspects.addStep(not(inVilla), returnToButlerAndHeadInside);
speakToSuspects.addStep(not(interrogatedConstantiniusAgain), interrogateConstantiniusAgain);
Expand All @@ -539,18 +537,15 @@ public void setupSteps()

/// 32
getAdalasConfession = new NpcStep(this, NpcID.ADALA_13821, new WorldPoint(1446, 2933, 2), "Talk to Adala to get her confession.");
// TODO: helper steps to climb upstairs?
getAdalasConfessionStep = new ConditionalStep(this, getAdalasConfession);
getAdalasConfessionStep.addStep(not(inVilla), returnToButlerAndHeadInside);

/// 33
talkToGuardsAboutAdala = new NpcStep(this, NpcID.STRADIUS, new WorldPoint(1442, 2933, 2), "Talk to the guards about Adala.");
// TODO: helper step to climb upstairs?
talkToGuardsAboutAdalaStep = new ConditionalStep(this, talkToGuardsAboutAdala);
talkToGuardsAboutAdalaStep.addStep(not(inVilla), returnToButlerAndHeadInside);

/// 34
// NOTE: The stairs don't highlight well. A tile step would be better, but tile steps don't work here.
var headDownFromTopFloor = new ObjectStep(this, ObjectID.STAIRCASE_54714, new WorldPoint(1445, 2939, 2), "Climb down the staircase.");
var headDownFromMiddleFloor = new ObjectStep(this, ObjectID.STAIRCASE_54714, new WorldPoint(1442, 2936, 1), "Climb down the staircase.");
var climbFirstLooseRocksToTheatre = new ObjectStep(this, ObjectID.LOOSE_ROCKS_54720, new WorldPoint(1469, 2918, 0), "Climb the Loose rocks south-east of the villa on your way to the theatre.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@
import com.questhelper.rewards.ExperienceReward;
import com.questhelper.rewards.ItemReward;
import com.questhelper.rewards.QuestPointReward;
import com.questhelper.steps.ConditionalStep;
import com.questhelper.steps.DetailedQuestStep;
import com.questhelper.steps.NpcStep;
import com.questhelper.steps.ObjectStep;
import com.questhelper.steps.QuestStep;
import com.questhelper.steps.*;
import net.runelite.api.ItemID;
import net.runelite.api.NpcID;
import net.runelite.api.ObjectID;
Expand All @@ -68,7 +64,9 @@ public class EthicallyAcquiredAntiquities extends BasicQuestHelper

QuestStep talkToCuratorHerminius, investigateToolsBehindDisplayCase, investigateCaseAgain, talkToCitizen, talkToAcademic,
talkToTourist, talkToRegulus, talkToCrewmember, talkToArtima, returnToCrewmember, talkToTraderStan, talkToBetty, readBettysNotes,
pickpocketCuratorHaig, searchStoreroomCrate, talkToCuratorBeforeShaming, shameCuratorHaigHalen, talkToCuratorBeforeCutscene, watchCutscene;
pickpocketCuratorHaig, searchStoreroomCrate, talkToCuratorBeforeShaming, talkToCuratorBeforeCutscene, watchCutscene;

PuzzleWrapperStep shameCuratorHaigHalen;

DetailedQuestStep inspectEmptyDisplayCase, talkToCuratorHaigHalen, returnToCuratorHerminius;

Expand Down Expand Up @@ -205,9 +203,9 @@ public void setupSteps()
"search the crate.");
talkToCuratorBeforeShaming = new NpcStep(this, NpcID.CURATOR_HAIG_HALEN, new WorldPoint(3257, 3449, 0), "Go speak to Curator Haig Halen again.");
talkToCuratorBeforeShaming.addDialogStep("I found Xerna's Diadem...");
shameCuratorHaigHalen = new NpcStep(this, NpcID.CURATOR_HAIG_HALEN, new WorldPoint(3257, 3449, 0), "Shame Curator Haig Halen, get the meter to 100%.");
shameCuratorHaigHalen.addDialogStep("I found Xerna's Diadem...");
shameCuratorHaigHalen.addDialogSteps("Aren't you embarrassed to have stolen items in your collection?",
shameCuratorHaigHalen = new NpcStep(this, NpcID.CURATOR_HAIG_HALEN, new WorldPoint(3257, 3449, 0), "Shame Curator Haig Halen, get the meter to 100%.")
.addDialogStep("I found Xerna's Diadem...")
.addDialogSteps("Aren't you embarrassed to have stolen items in your collection?",
"Are you even a real historian, or just a petty criminal?", "Did you know Varlamore sends thieves to the Colosseum?",
"How will Varlamorians learn their history now?", "You're supposed to protect history, not steal it!",
"You're setting a terrible example", "You've betrayed the trust of Varlamore.", "You're not above the law! You stole this stuff!",
Expand All @@ -223,7 +221,8 @@ public void setupSteps()
"back already!",
"Think of the Varlamorian children who won't get to see this artefact.", "You should give Varlamore a chance before stealing their stuff.",
"This is stealing! Thieving! Taking what's not yours!", "I thought archaeology was cool. I didn't realise it was just thieving!",
"How would you feel if someone came in here and stole all your stuff?", "You're hoarding artefacts, but you should be sharing them!");
"How would you feel if someone came in here and stole all your stuff?", "You're hoarding artefacts, but you should be sharing them!")
.puzzleWrapStep("Work out how to shame Curator Haig Halen, get the meter to 100%.");
talkToCuratorBeforeCutscene = new NpcStep(this, NpcID.CURATOR_HAIG_HALEN, new WorldPoint(3257, 3449, 0), "Speak to Curator before a cutscene.");
watchCutscene = new NpcStep(this, NpcID.CURATOR_HAIG_HALEN, new WorldPoint(3257, 3449, 0), "Watch cutscene.");
returnToCuratorHerminius = new NpcStep(this, NpcID.CURATOR_HERMINIUS, new WorldPoint(1712, 3163, 0), "Speak to the Curator in the centre of the Grand " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@ public class LockedChestPuzzle extends DetailedOwnerStep
final String[] letter3 = new String[]{"W", "E", "R", "I", "L", "A", "N", "U", "T", "O"};
final String[] letter4 = new String[]{"E", "I", "D", "A", "O", "W", "K", "N", "R", "U"};

DetailedQuestStep readBook;
PuzzleWrapperStep readBook;

ObjectStep openChest;
PuzzleWrapperStep openChest;

ChestCodeStep solveChest;

PuzzleWrapperStep solveChestPuzzleWrapped;
public LockedChestPuzzle(QuestHelper questHelper)
{
super(questHelper, "");
Expand Down Expand Up @@ -129,18 +130,23 @@ private void setupConditions()
@Override
protected void setupSteps()
{
setupItemRequirements();
setupConditions();

readBook = new DetailedQuestStep(getQuestHelper(), "Read the book.", book.highlighted());
openChest = new ObjectStep(getQuestHelper(), ObjectID.CHEST_54376, new WorldPoint(1638, 3217, 1), "Search the south-west chest.");
setupItemRequirements();
setupConditions();

readBook = new DetailedQuestStep(getQuestHelper(), "Read the book.", book.highlighted())
.puzzleWrapStep()
.withNoHelpHiddenInSidebar(true);
openChest = new ObjectStep(getQuestHelper(), ObjectID.CHEST_54376, new WorldPoint(1638, 3217, 1), "Search the south-west chest.")
.puzzleWrapStep()
.withNoHelpHiddenInSidebar(true);
solveChest = new ChestCodeStep(getQuestHelper(), 10);
solveChestPuzzleWrapped = solveChest.puzzleWrapStep().withNoHelpHiddenInSidebar(true);
}

@Override
public Collection<QuestStep> getSteps()
{
return Arrays.asList(readBook, openChest, solveChest);
return Arrays.asList(readBook, openChest, solveChestPuzzleWrapped);
}

int[] rotationPosOfAnswer = new int[4];
Expand Down
Loading

0 comments on commit 8485023

Please sign in to comment.