bloodysoles
Component for clothing items that can pick up blood from decals and spread it around everywhere when walking, such as shoes or suits with integrated shoes.
Vars | |
bloody_shoes | How much of each grubby type we have on our feet |
---|---|
equipped_slot | The ITEM_SLOT_* slot the item is equipped on, if it is. |
last_blood_state | The type of the last grub pool we stepped in, used to decide the type of footprints to make |
last_pickup | The world.time when we last picked up blood |
parent_atom | The parent item but casted into atom type for easier use. |
wielder | Either the mob carrying the item, or the mob itself for the /feet component subtype |
Procs | |
add_parent_to_footprint | Adds the parent type to the footprint's shoe_types var |
adjust_bloody_shoes | lowers bloody_shoes[index] by adjust_by |
find_pool_by_blood_state | Find a blood decal on a turf that matches our last_blood_state |
is_obscured | Returns true if the parent item is obscured by something else that the wielder is wearing |
is_under_feet_covered | Returns true if the parent item is worn in the ITEM_SLOT_ICLOTHING slot and the wielder is wearing something on their shoes. |
on_changed_bloody_shoes | called whenever the value of bloody_soles changes |
on_clean | Called when the parent item is being washed |
on_drop | Called when the parent item has been dropped |
on_equip | Called when the parent item is equipped by someone |
on_moved | Called when the wielder has moved |
on_step_blood | Called when the wielder steps in a pool of blood |
share_blood | Run to equally share the blood between us and a decal |
unregister | Unregisters from the wielder if necessary |
update_icon | Run to update the icon of the parent |
Var Details
bloody_shoes
How much of each grubby type we have on our feet
equipped_slot
The ITEM_SLOT_* slot the item is equipped on, if it is.
last_blood_state
The type of the last grub pool we stepped in, used to decide the type of footprints to make
last_pickup
The world.time when we last picked up blood
parent_atom
The parent item but casted into atom type for easier use.
wielder
Either the mob carrying the item, or the mob itself for the /feet component subtype
Proc Details
add_parent_to_footprint
Adds the parent type to the footprint's shoe_types var
adjust_bloody_shoes
lowers bloody_shoes[index] by adjust_by
find_pool_by_blood_state
Find a blood decal on a turf that matches our last_blood_state
is_obscured
Returns true if the parent item is obscured by something else that the wielder is wearing
is_under_feet_covered
Returns true if the parent item is worn in the ITEM_SLOT_ICLOTHING slot and the wielder is wearing something on their shoes.
Allows for jumpsuits to cover feet without getting all bloodied when their wearer is wearing shoes.
on_changed_bloody_shoes
called whenever the value of bloody_soles changes
on_clean
Called when the parent item is being washed
on_drop
Called when the parent item has been dropped
Used to deregister our wielder
on_equip
Called when the parent item is equipped by someone
Used to register our wielder
on_moved
Called when the wielder has moved
Used to make bloody footprints on the ground
on_step_blood
Called when the wielder steps in a pool of blood
Used to make the parent item bloody
share_blood
Run to equally share the blood between us and a decal
unregister
Unregisters from the wielder if necessary
update_icon
Run to update the icon of the parent