Files
Bubberstation/code/__DEFINES/injection.dm
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

9 lines
323 B
Plaintext

/// This injection can penetrate through thick clothing.
#define INJECT_CHECK_PENETRATE_THICK (1 << 0)
/// This injection bypasses species specific restrictions.
#define INJECT_CHECK_IGNORE_SPECIES (1 << 1)
/// When trying this injection, show an error message if it fails.
#define INJECT_TRY_SHOW_ERROR_MESSAGE (1 << 2)