/tg/ Station 13 - Modules - TypesVar Details - Proc Details

plant_backfire

-- Plant backfire element -- Certain high-danger plants, like death-nettles, will backfire and harm the holder if they're not properly protected. If a user is protected with something like leather gloves, they can handle them normally. If they're not protected properly, we invoke a callback on the user, harming or inconveniencing them.

Vars

cancel_actionWhether we stop the current action if backfire is triggered (EX: returning CANCEL_ATTACK_CHAIN)
extra_genesAny plant genes we want to check that are required for our plant to be dangerous. Plants without a gene in this list will be considered safe. List of typepaths.
extra_traitsAny extra traits we want to check in addition to TRAIT_PLANT_SAFE. Mobs with a trait in this list will be considered safe. List of traits.

Procs

attack_safety_checkChecks before we attack if we're okay to continue.
backfireThe actual backfire occurs here. Checks if the user is able to safely handle the plant. If not, sends the backfire signal (meaning backfire will occur and be handled by one or multiple genes).
pickup_safety_checkChecks before we pick up the plant if we're okay to continue.
plant_safety_checkActually checks if our user is safely handling our plant.
throw_safety_checkChecks before we throw the plant if we're okay to continue.

Var Details

cancel_action

Whether we stop the current action if backfire is triggered (EX: returning CANCEL_ATTACK_CHAIN)

extra_genes

Any plant genes we want to check that are required for our plant to be dangerous. Plants without a gene in this list will be considered safe. List of typepaths.

extra_traits

Any extra traits we want to check in addition to TRAIT_PLANT_SAFE. Mobs with a trait in this list will be considered safe. List of traits.

Proc Details

attack_safety_check

Checks before we attack if we're okay to continue.

source - our plant user - the mob wielding our [source]

backfire

The actual backfire occurs here. Checks if the user is able to safely handle the plant. If not, sends the backfire signal (meaning backfire will occur and be handled by one or multiple genes).

Returns FALSE if the user was safe and no backfire occured. Returns TRUE if the user was not safe and a backfire actually happened.

pickup_safety_check

Checks before we pick up the plant if we're okay to continue.

source - our plant user - the mob picking our [source]

plant_safety_check

Actually checks if our user is safely handling our plant.

Checks for TRAIT_PLANT_SAFE, and returns TRUE if we have it. Then, any extra traits we need to check (Like TRAIT_PIERCEIMMUNE for nettles) and returns TRUE if we have one of them. Then, any extra genes we need to check (Like liquid contents for bluespace tomatos) and returns TRUE if we don't have the gene.

source - our plant user - the carbon handling our [source]

returns FALSE if none of the checks are successful.

throw_safety_check

Checks before we throw the plant if we're okay to continue.

source - our plant thrower - the mob throwing our [source]