Skip to content

Implement GetNumStackedItems #5

@modawan

Description

@modawan

This routine is used to get the number of items in the inventory. On the second level of Endar Spire, there is a terminal that needs computer spikes to overload, and a droid that needs repair parts. Scripts for both use GetNumStackedItems, and there is no way to unlock the door without them.

Workaround: change GetNumStackedItems to always return a value greater than ~8 to bypass the checks.

diff --git a/src/libs/game/script/routine/impl/main.cpp b/src/libs/game/script/routine/impl/main.cpp
index db07a116..e56b67fa 100644
--- a/src/libs/game/script/routine/impl/main.cpp
+++ b/src/libs/game/script/routine/impl/main.cpp
@@ -3871,7 +3871,7 @@ static Variable GetNumStackedItems(const std::vector<Variable> &args, const Rout
     // Transform
 
     // Execute
-    throw RoutineNotImplementedException("GetNumStackedItems");
+    return Variable::ofInt(42);
 }
 
 static Variable SurrenderToEnemies(const std::vector<Variable> &args, const RoutineContext &ctx) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockerIssues that completely or partially block progress of the game. All crashes are blockers as well.good first issueGood for newcomers

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions