Shiptest 13 - Modules - TypesVar Details - Proc Details

pellet_cloud

Vars

bodiesLAZY LIST. For grenades, any /mob/living's the grenade is moved onto, see [/datum/component/pellet_cloud/proc/handle_martyrs()]
hitshow many pellets impacted something
num_pelletsHow many shrapnel projectiles are we responsible for tracking? May be reduced for grenades if someone dives on top of it. Defined by ammo casing for casings, derived from magnitude otherwise
pellet_deltaFor grenades, tracking how many pellets are removed due to martyrs and how many pellets are added due to the last person to touch it being on top of it
pelletsThe list of pellets we're responsible for tracking, once these are all accounted for, we finalize.
projectile_typeWhat's the projectile path of the shrapnel we're shooting?
purple_heartsFor grenades, tracking people who die covering a grenade for achievement purposes, see [/datum/component/pellet_cloud/proc/handle_martyrs()]
queued_deleteIf the parent tried deleting and we're not done yet, we send it to nullspace then delete it after
radiusFor grenades/landmines, how big is the radius of turfs we're targeting? Note this does not effect the projectiles range, only how many we generate
shooterfor if we're an ammo casing being fired
targets_hitAn associated list with the atom hit as the key and how many pellets they've eaten for the value, for printing aggregate messages
terminatedhow many pellets ranged out without hitting anything

Procs

create_blast_pelletsO- Our parent, the thing making the shrapnel obviously (grenade or landmine) punishable_triggerer- For grenade lances or people who step on the landmines (if we shred the triggerer), we spawn extra shrapnel for them in addition to the normal spread
finalizeAll of our pellets are accounted for, time to go target by target and tell them how many things they got hit by.
grenade_armedLook alive, we're armed! Now we start watching to see if anyone's covering us
grenade_droppedSomeone dropped the grenade, so set them to the shooter in case they're on top of it when it goes off
grenade_movedOur grenade has moved, reset var/list/bodies so we're "on top" of any mobs currently on the tile
grenade_uncrossedSomeone who was originally "under" the grenade has moved off the tile and is now eligible for being a martyr and "covering" it
nullspace_parentOur grenade or landmine or caseless shell or whatever tried deleting itself, so we intervene and nullspace it until we're done here
on_target_qdelSomeone who was originally "under" the grenade has moved off the tile and is now eligible for being a martyr and "covering" it
pellet_hitOne of our pellets hit something, record what it was and check if we're done (terminated == num_pellets)
pellet_rangeOne of our pellets disappeared due to hitting their max range (or just somehow got qdel'd), remove it from our list and check if we're done (terminated == num_pellets)
pewMinor convenience function for creating each shrapnel piece with circle explosions, mostly stolen from the MIRV component

Var Details

bodies

LAZY LIST. For grenades, any /mob/living's the grenade is moved onto, see [/datum/component/pellet_cloud/proc/handle_martyrs()]

hits

how many pellets impacted something

num_pellets

How many shrapnel projectiles are we responsible for tracking? May be reduced for grenades if someone dives on top of it. Defined by ammo casing for casings, derived from magnitude otherwise

pellet_delta

For grenades, tracking how many pellets are removed due to martyrs and how many pellets are added due to the last person to touch it being on top of it

pellets

The list of pellets we're responsible for tracking, once these are all accounted for, we finalize.

projectile_type

What's the projectile path of the shrapnel we're shooting?

purple_hearts

For grenades, tracking people who die covering a grenade for achievement purposes, see [/datum/component/pellet_cloud/proc/handle_martyrs()]

queued_delete

If the parent tried deleting and we're not done yet, we send it to nullspace then delete it after

radius

For grenades/landmines, how big is the radius of turfs we're targeting? Note this does not effect the projectiles range, only how many we generate

shooter

for if we're an ammo casing being fired

targets_hit

An associated list with the atom hit as the key and how many pellets they've eaten for the value, for printing aggregate messages

terminated

how many pellets ranged out without hitting anything

Proc Details

create_blast_pellets

O- Our parent, the thing making the shrapnel obviously (grenade or landmine) punishable_triggerer- For grenade lances or people who step on the landmines (if we shred the triggerer), we spawn extra shrapnel for them in addition to the normal spread

finalize

All of our pellets are accounted for, time to go target by target and tell them how many things they got hit by.

grenade_armed

Look alive, we're armed! Now we start watching to see if anyone's covering us

grenade_dropped

Someone dropped the grenade, so set them to the shooter in case they're on top of it when it goes off

grenade_moved

Our grenade has moved, reset var/list/bodies so we're "on top" of any mobs currently on the tile

grenade_uncrossed

Someone who was originally "under" the grenade has moved off the tile and is now eligible for being a martyr and "covering" it

nullspace_parent

Our grenade or landmine or caseless shell or whatever tried deleting itself, so we intervene and nullspace it until we're done here

on_target_qdel

Someone who was originally "under" the grenade has moved off the tile and is now eligible for being a martyr and "covering" it

pellet_hit

One of our pellets hit something, record what it was and check if we're done (terminated == num_pellets)

pellet_range

One of our pellets disappeared due to hitting their max range (or just somehow got qdel'd), remove it from our list and check if we're done (terminated == num_pellets)

pew

Minor convenience function for creating each shrapnel piece with circle explosions, mostly stolen from the MIRV component