1 Commits

Author SHA1 Message Date
SkyratBot
b902f89062 [MIRROR] Refactor can_inject, and introduce try_inject (#3300)
* Refactor can_inject, and introduce try_inject (#56816)

Splits can_inject into can_inject and try_inject. The latter can perform side effects, while the former cannot. Moved the show_error bool parameter to a flag that try_inject checks.

Changes the signature to can_inject(mob/user, target_zone, injection_flags). This was previously redefined in several places, making it impossible to use named parameters. This refactor now allows named parameters to be used, and thus avoiding the ugliness of TRUE, FALSE, FALSE in parameters.

* Refactor can_inject, and introduce try_inject

Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-11 19:49:47 +00:00