/tg/ Station 13 - Modules - TypesProc Details

embed

Procs

check_embedChecking to see if we're gonna embed into a human
check_embed_projectilecheck_embed_projectile() is what we get when a projectile with a defined shrapnel_type impacts a target.
detach_from_weaponIf we don't want to be embeddable anymore (deactivating an e-dagger for instance)
embed_objectActually sticks the object to a victim
examined_tagsSomeone inspected our embeddable item
roll_embed_chanceCalculates the actual chance to embed based on armour penetration and throwing speed, then returns true if we pass that probability check
sever_elementA different embed element has been attached, so we'll detach and let them handle things
try_force_embedtry_force_embed() is called here when we fire COMSIG_EMBED_TRY_FORCE from /obj/item/proc/tryEmbed. Mostly, this means we're a piece of shrapnel from a projectile that just impacted something, and we're trying to embed in it.

Proc Details

check_embed

Checking to see if we're gonna embed into a human

check_embed_projectile

check_embed_projectile() is what we get when a projectile with a defined shrapnel_type impacts a target.

If we hit a valid target, we create the shrapnel_type object and then forcefully try to embed it on its behalf. DO NOT EVER add an embed element to the payload and let it do the rest. That's awful, and it'll limit us to drop-deletable shrapnels in the worry of stuff like arrows and harpoons being embeddable even when not let loose by their weapons.

detach_from_weapon

If we don't want to be embeddable anymore (deactivating an e-dagger for instance)

embed_object

Actually sticks the object to a victim

examined_tags

Someone inspected our embeddable item

roll_embed_chance

Calculates the actual chance to embed based on armour penetration and throwing speed, then returns true if we pass that probability check

sever_element

A different embed element has been attached, so we'll detach and let them handle things

try_force_embed

try_force_embed() is called here when we fire COMSIG_EMBED_TRY_FORCE from /obj/item/proc/tryEmbed. Mostly, this means we're a piece of shrapnel from a projectile that just impacted something, and we're trying to embed in it.

The reason for this extra mucking about is avoiding having to do an extra hitby(), and annoying the target by impacting them once with the projectile, then again with the shrapnel, and possibly AGAIN if we actually embed. This way, we save on at least one message.

Arguments: