energy_shield 
Vars | |
| action_slots | Grant the action button when attached as accessory on jumpsuit |
|---|---|
| blocks_melee | Whether the shield blocks melee damage |
| blocks_projectiles | Whether the shield blocks projectile damage |
| emp_retention | Fraction of shield health retained after an EMP (0 = full wipe, 0.5 = halved) |
| enabled | Whether the shield is enabled by the user (toggle via action button) |
| max_armor_class | Maximum armor rating on outer clothing before the shield refuses to activate (default) |
| max_shield_health | Maximum shield health |
| pending_absorption | Damage absorbed in the current hit, pending application in on_after_damage |
| pending_def_zone | Bodypart struck in the pending hit (for visual effects) |
| persistent_visuals | Whether shield visuals stay on continuously while active (until collapse) |
| recharge_delay | Delay before recharge begins after being hit |
| recharge_rate | Health restored per second during recharge |
| recharge_visual_pending | Whether the recharge visual has been shown for the current recharge cycle |
| shield_active | Whether the shield is active (has charge and is worn) |
| shield_color | The color tint of the shield effects |
| shield_health | Current shield health — starts empty, must charge after equipping |
| showing_recharge | Whether filters are showing because of active recharging (persistent until full) |
| visual_cooldown | Controls how long filters linger after a hit |
| visuals_shown | Whether the outline/pattern filters are currently applied |
| wearer | Cached reference to the mob wearing this item |
Procs | |
| apply_shield_hit | Shared post-hit logic: deducts shield health, triggers cooldowns, visuals, and collapse check. |
| clear_shield_hud | Clears the shield HUD bar on the wearer. |
| emp_act | Drains shield health on EMP. Amount retained is controlled by emp_retention. |
| equipped | Handles activation when attached as an accessory on a jumpsuit. accessory_equipped() calls equipped(), so this single override covers it. |
| get_shield_status_text | Returns a span-formatted string describing the shield's current status. |
| get_shield_tint_color | Builds a "#RRGGBBAA" color string with alpha proportional to current shield health. |
| hide_shield_visuals | Removes the outline glow and texture pattern filters from the wearer. |
| on_after_damage | Applies shield health deduction and visual/audio feedback after damage is dealt. Consumes the pending absorption computed by on_damage_modifiers. |
| on_check_block | Fully blocks melee and thrown attacks when the shield can absorb the entire hit. Mirrors on_pre_bullet for projectiles — prevents wounds, embeds, and blood naturally. |
| on_damage_modifiers | Computes the damage modifier for melee/self-attack shield absorption. Projectiles are fully handled by on_pre_bullet — this skips them. Full melee blocks are handled by on_check_block. This covers partial melee absorption and self-attacks (where check_block is skipped). Must remain pure — side effects are in on_after_damage via COMSIG_MOB_AFTER_APPLY_DAMAGE. |
| on_pre_bullet | Absorbs projectile damage, secondary damage, and stamina with the shield. Fully blocked projectiles return COMPONENT_BULLET_BLOCKED (prevents wounds/embed/blood). Partially absorbed projectiles have each absorbed damage pool reduced and proceed normally. |
| on_uniform_examined | Appends shield status when examining the uniform this shield is attached to. |
| process | Handles passive recharge after the cooldown expires. |
| round_shield_for_hud | Maps shield percentage to existing health bar icon state names. |
| shield_collapse | Called when shield health reaches zero. Visual and audio feedback for collapse. |
| shield_hit_effect | Flashes the wearer with the shield color and spawns a ripple at the struck limb's position. |
| show_shield_visuals | Applies outline glow and texture pattern filters to the wearer. |
| spawn_shield_ripple | Spawns the concentric ripple effect at a limb's position. Separate proc because new() can yield. |
| turn_off | Disables the shield and clears transient combat/recharge state. |
| ui_action_click | Toggles the shield on/off via the action button. |
| update_shield_hud | Updates the shield health bar visible to medical HUD users. Reuses existing health bar icon states from hud.dmi, colored blue. |
| update_shield_visuals | Updates the outline filter alpha to reflect current shield health. |
| wearer_has_heavy_armor | Returns TRUE if the wearer's outer clothing has LASER, ENERGY, or BULLET armor above class II. |
Var Details
action_slots 
Grant the action button when attached as accessory on jumpsuit
blocks_melee 
Whether the shield blocks melee damage
blocks_projectiles 
Whether the shield blocks projectile damage
emp_retention 
Fraction of shield health retained after an EMP (0 = full wipe, 0.5 = halved)
enabled 
Whether the shield is enabled by the user (toggle via action button)
max_armor_class 
Maximum armor rating on outer clothing before the shield refuses to activate (default)
max_shield_health 
Maximum shield health
pending_absorption 
Damage absorbed in the current hit, pending application in on_after_damage
pending_def_zone 
Bodypart struck in the pending hit (for visual effects)
persistent_visuals 
Whether shield visuals stay on continuously while active (until collapse)
recharge_delay 
Delay before recharge begins after being hit
recharge_rate 
Health restored per second during recharge
recharge_visual_pending 
Whether the recharge visual has been shown for the current recharge cycle
shield_active 
Whether the shield is active (has charge and is worn)
shield_color 
The color tint of the shield effects
shield_health 
Current shield health — starts empty, must charge after equipping
showing_recharge 
Whether filters are showing because of active recharging (persistent until full)
visual_cooldown 
Controls how long filters linger after a hit
visuals_shown 
Whether the outline/pattern filters are currently applied
wearer 
Cached reference to the mob wearing this item
Proc Details
apply_shield_hit
Shared post-hit logic: deducts shield health, triggers cooldowns, visuals, and collapse check.
clear_shield_hud
Clears the shield HUD bar on the wearer.
emp_act
Drains shield health on EMP. Amount retained is controlled by emp_retention.
equipped
Handles activation when attached as an accessory on a jumpsuit. accessory_equipped() calls equipped(), so this single override covers it.
get_shield_status_text
Returns a span-formatted string describing the shield's current status.
get_shield_tint_color
Builds a "#RRGGBBAA" color string with alpha proportional to current shield health.
hide_shield_visuals
Removes the outline glow and texture pattern filters from the wearer.
on_after_damage
Applies shield health deduction and visual/audio feedback after damage is dealt. Consumes the pending absorption computed by on_damage_modifiers.
on_check_block
Fully blocks melee and thrown attacks when the shield can absorb the entire hit. Mirrors on_pre_bullet for projectiles — prevents wounds, embeds, and blood naturally.
on_damage_modifiers
Computes the damage modifier for melee/self-attack shield absorption. Projectiles are fully handled by on_pre_bullet — this skips them. Full melee blocks are handled by on_check_block. This covers partial melee absorption and self-attacks (where check_block is skipped). Must remain pure — side effects are in on_after_damage via COMSIG_MOB_AFTER_APPLY_DAMAGE.
on_pre_bullet
Absorbs projectile damage, secondary damage, and stamina with the shield. Fully blocked projectiles return COMPONENT_BULLET_BLOCKED (prevents wounds/embed/blood). Partially absorbed projectiles have each absorbed damage pool reduced and proceed normally.
on_uniform_examined
Appends shield status when examining the uniform this shield is attached to.
process
Handles passive recharge after the cooldown expires.
round_shield_for_hud
Maps shield percentage to existing health bar icon state names.
shield_collapse
Called when shield health reaches zero. Visual and audio feedback for collapse.
shield_hit_effect
Flashes the wearer with the shield color and spawns a ripple at the struck limb's position.
show_shield_visuals
Applies outline glow and texture pattern filters to the wearer.
spawn_shield_ripple
Spawns the concentric ripple effect at a limb's position. Separate proc because new() can yield.
turn_off
Disables the shield and clears transient combat/recharge state.
ui_action_click
Toggles the shield on/off via the action button.
update_shield_hud
Updates the shield health bar visible to medical HUD users. Reuses existing health bar icon states from hud.dmi, colored blue.
update_shield_visuals
Updates the outline filter alpha to reflect current shield health.
wearer_has_heavy_armor
Returns TRUE if the wearer's outer clothing has LASER, ENERGY, or BULLET armor above class II.