opx_infinityprogress
progress
Last updated on
A timed-action bar that holds the player still, optionally plays a gesture, and reports how it ended.
Shows a timed-action bar ("Eating", "Picking the lock") for a few seconds. While it runs the player cannot move or attack (when LOCK is on) and an optional animation plays. Only one bar runs at a time. Start answers at once whether the bar is up; the outcome arrives later on opx:on:progress:done. Server code starts a bar on one client through the server contract, and the server judges how it ended.
| Side | both (the bar is client-side; the server starts numbered bars and judges them) |
| Requires | none |
| Optional | downed, animations |
| Contract | progress v1 — client, server |
| Config | config/progress.lua (shared) |
| Data | none |
How a bar runs
- The bar ends early if the player goes down, the character unloads or the module stops.
- It never takes keyboard focus (it is drawn on the
overlaysurface). - While a bar is up and
LOCKis true, the input actionsMovementandAttackare blocked. The camera stays free. - A bar marked
cancelablecan be ended by the player with the cancel key (Xby default); it endscancelled. The page draws the hintprogress.cancel("{key}to cancel") naming the bound key. A bar not marked ignores the key. - X is shared with a call's decline and hang-up, a carried crate and the emote stop. While a cancelable bar is up it owns the press (rank
PROGRESS, see One press, one owner): cancelling an eat or a repair during a call no longer ends the call. A press while chat or a form holds the keyboard does nothing.
Configuration
config/progress.lua sets OPX.Config.MODULES.progress.
Refusal codes
| Code | Meaning |
|---|---|
invalid_caller | owner is missing or empty. |
invalid_spec | spec is not a table. |
progress_busy | Another bar is already up. |
invalid_duration | durationMs is outside MIN_MS..MAX_MS. |
invalid_label | label is missing or empty. |
progress_not_active | Stop with no bar up. |
not_owner | Stop by an owner that did not start the bar. |