Skip to main content

Module quest

Module quest 

Source

Constants§

MAX_COURIER_QUEST_DISTANCE 🔒

Functions§

check_for_timeouts
create_deposit
Perform a deposit check, ensuring that the NPC has the given item and amount in their inventory. If they do, the provided action is performed to determine whether we should proceed. If the action chooses to proceed, then we attempt to remove the items from the inventory. This may be fallible.
create_quest
Register and create a new quest, producing its ID.
escorted
finalize_courier_task
Checks if a courier quest can be completed based on inventory and entity presence.
get_nearest_spot
Finds the nearest chunk position that contains the appropriate kind of spot for this courier quest variant. For example, if you have a Gnarling Carving quest, this will search nearby for the nearest Gnarling Totem spot and return the chunk position (not the world position, you’ll need to convert it to wpos).
quest_request
resolve_take_deposit
roll_courier_quest 🔒
Attempts to build a valid courier quest.