⚠️ Not yet verified in-game β€” this page was drafted from source analysis and hasn't been confirmed by actually running it. Treat it as a strong draft, not gospel.

MrxTaskObjectiveAccept

Module: mrxtaskobjectiveaccept.lua

Overview

The MrxTaskObjectiveAccept module is a task objective action that handles the acceptance of a task by a player. It displays a confirmation dialog to the player and processes their response.

Inheritance

  • Inherits from: MrxTaskObjectiveAction
  • Imports: MrxGui, MrxPlayer

Instance pattern

This is a per-instance object module (keyed by uGuid). It tracks the following key fields:

  • _bConfPromptDisplayed: A boolean indicating whether the confirmation prompt has been displayed.

Functions

_TargetActioned(self, uActionerGuid, uActioneeGuid)

Called when an action target is acted upon. If the confirmation prompt has not been displayed yet, it sets _bConfPromptDisplayed to true and shows a dialog box to the player asking for confirmation.

_ConfPromptDismissed(self, uActionerGuid, uActioneeGuid, nSelectedIndex)

Called when the player dismisses the confirmation dialog. It resets _bConfPromptDisplayed to false and checks if the player selected β€œYes”. If so, it calls the base class’s _TargetActioned method.

_PrintObjectiveMessage(self, sMsgType)

A placeholder function that does nothing. This is likely a stub for future functionality related to printing objective messages.

Events

  • Listens for an internal event (not explicitly defined in this file) to call _ConfPromptDismissed when the player dismisses the confirmation dialog.

Notes for modders

  • Ensure that _TargetActioned is called appropriately when an action target is acted upon.
  • Customize the dialog text by setting the sDialogText field in the configuration.
  • Be aware that this module relies on the MrxGui and MrxPlayer modules for displaying dialogs and player-related operations.

Back to top

This site uses Just the Docs, a documentation theme for Jekyll.