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

/datum/component/embedded

Vars

harmfulif both our pain multiplier and jostle pain multiplier are 0, we're harmless and can omit most of the damage related stuff

Procs

TopicSomeone is ripping out the item from the turf by hand
fallOutHumanCalled when then item randomly falls out of a human. This handles the damage and descriptors, then calls safe_remove()
initHuman//////////HUMAN PROCS////////////////
initTurf///////////TURF PROCS////////////////
itemMovedThis proc handles if something knocked the invisible item loose from the turf somehow (probably an explosion). Just make it visible and say it fell loose, then get outta here.
jostleCheckCalled every time a human with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the human is crawling or walking.
processHumanItems embedded/stuck to humans both check whether they randomly fall out (if applicable), as well as if the target mob and limb still exists. Items harmfully embedded in humans have an additional check for random pain (if applicable)
ripOutHumanCalled when a human with an object embedded/stuck to them inspects themselves and clicks the appropriate link to begin ripping the item out. This handles the ripping attempt, descriptors, and dealing damage, then calls safe_remove()
safeRemoveHumanThis proc handles the final step and actual removal of an embedded/stuck item from a human, whether or not it was actually removed safely. Pass TRUE for to_hands if we want it to go to the victim's hands when they pull it out

Var Details

harmful

if both our pain multiplier and jostle pain multiplier are 0, we're harmless and can omit most of the damage related stuff

Proc Details

Topic

Someone is ripping out the item from the turf by hand

fallOutHuman

Called when then item randomly falls out of a human. This handles the damage and descriptors, then calls safe_remove()

initHuman

//////////HUMAN PROCS////////////////

Set up an instance of embedding for a human. This is basically an extension of Initialize() so not much to say

initTurf

///////////TURF PROCS////////////////

Turfs are much lower maintenance, since we don't care if they're in pain, but since they don't bleed or scream, we draw an overlay to show their status. The only difference pointy/sticky items make here is text descriptors and pointy objects making a spark shower on impact.

itemMoved

This proc handles if something knocked the invisible item loose from the turf somehow (probably an explosion). Just make it visible and say it fell loose, then get outta here.

jostleCheck

Called every time a human with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the human is crawling or walking.

processHuman

Items embedded/stuck to humans both check whether they randomly fall out (if applicable), as well as if the target mob and limb still exists. Items harmfully embedded in humans have an additional check for random pain (if applicable)

ripOutHuman

Called when a human with an object embedded/stuck to them inspects themselves and clicks the appropriate link to begin ripping the item out. This handles the ripping attempt, descriptors, and dealing damage, then calls safe_remove()

safeRemoveHuman

This proc handles the final step and actual removal of an embedded/stuck item from a human, whether or not it was actually removed safely. Pass TRUE for to_hands if we want it to go to the victim's hands when they pull it out