shielded
The shielded component causes the parent item to nullify a certain number of attacks against the wearer, see: shielded vests.
Vars | |
charge_add_cd | The cooldown tracking when we last replenished a charge |
---|---|
charge_increment_delay | Once we go unhit long enough to recharge, we replenish charges this often. The floor is effectively 1 second, AKA how often SSdcs processes |
charge_recovery | How many charges we recover on each charge increment |
current_charges | How many charges we currently have |
lose_charge_on_damageless | Whether or not we lose a charge when hit by 0 damage items or projectiles |
lose_multiple_charges | Should the shield lose charges equal to the damage dealt by a hit? |
max_charges | How many charges we can have max, and how many we start with |
on_hit_effects | A callback for the sparks/message that play when a charge is used, see /datum/component/shielded/proc/default_run_hit_callback |
recently_hit_cd | The cooldown tracking when we were last hit |
recharge_path | The item we use for recharging |
recharge_start_delay | How long we have to avoid being hit to replenish charges. If set to 0, we never recharge lost charges |
shield_icon | What icon is used when someone has a functional shield up |
shield_icon_file | What .dmi we're pulling the shield icon from |
shield_inhand | Do we still shield if we're being held in-hand? If FALSE, it needs to be equipped to a slot to work |
show_charge_as_alpha | Should the shield's alpha change to show its remaining charge |
wearer | The person currently wearing us |
Procs | |
actually_run_hit_callback | The wrapper to invoke the on_hit callback, so we don't have to worry about blocking in the signal handler |
default_run_hit_callback | Default on_hit proc, since cult robes are stupid and have different descriptions/sparks |
lost_wearer | Either we've been dropped or our wearer has been QDEL'd. Either way, they're no longer our problem |
on_equipped | Check if we've been equipped to a valid slot to shield |
on_hit_react | This proc fires when we're hit, and is responsible for checking if we're charged, then deducting one + returning that we're blocking if so. It then runs the callback in /datum/component/shielded/var/on_hit_effects which handles the messages/sparks (so the visuals) |
on_update_overlays | Used to draw the shield overlay on the wearer |
Var Details
charge_add_cd
The cooldown tracking when we last replenished a charge
charge_increment_delay
Once we go unhit long enough to recharge, we replenish charges this often. The floor is effectively 1 second, AKA how often SSdcs processes
charge_recovery
How many charges we recover on each charge increment
current_charges
How many charges we currently have
lose_charge_on_damageless
Whether or not we lose a charge when hit by 0 damage items or projectiles
lose_multiple_charges
Should the shield lose charges equal to the damage dealt by a hit?
max_charges
How many charges we can have max, and how many we start with
on_hit_effects
A callback for the sparks/message that play when a charge is used, see /datum/component/shielded/proc/default_run_hit_callback
recently_hit_cd
The cooldown tracking when we were last hit
recharge_path
The item we use for recharging
recharge_start_delay
How long we have to avoid being hit to replenish charges. If set to 0, we never recharge lost charges
shield_icon
What icon is used when someone has a functional shield up
shield_icon_file
What .dmi we're pulling the shield icon from
shield_inhand
Do we still shield if we're being held in-hand? If FALSE, it needs to be equipped to a slot to work
show_charge_as_alpha
Should the shield's alpha change to show its remaining charge
wearer
The person currently wearing us
Proc Details
actually_run_hit_callback
The wrapper to invoke the on_hit callback, so we don't have to worry about blocking in the signal handler
default_run_hit_callback
Default on_hit proc, since cult robes are stupid and have different descriptions/sparks
lost_wearer
Either we've been dropped or our wearer has been QDEL'd. Either way, they're no longer our problem
on_equipped
Check if we've been equipped to a valid slot to shield
on_hit_react
This proc fires when we're hit, and is responsible for checking if we're charged, then deducting one + returning that we're blocking if so. It then runs the callback in /datum/component/shielded/var/on_hit_effects which handles the messages/sparks (so the visuals)
on_update_overlays
Used to draw the shield overlay on the wearer