Rip and Tear Component 
A component that allows items to tear down walls with sustained attacks.
This component handles the validation and execution of wall-tearing actions, including stamina costs, wield requirements, and handling of reinforced walls. It provides visual feedback and sound effects during the tearing process.
Vars | |
do_after_key | Unique key for do_after actions to prevent overlapping interactions |
---|---|
ignore_exhaustion | Whether to ignore stamina exhaustion checks |
reinforced_multiplier | Multiplier for tear time on reinforced walls (null means cannot tear reinforced walls) |
require_wielded | Whether the item must be wielded to tear walls |
stamina_cost | Base stamina cost for tearing actions |
stamina_cost_wielded | Stamina cost when wielded (if different from base) |
tear_time | Base time required to tear a standard wall |
Procs | |
Initialize | Initialize the rip and tear component |
get_stamina_cost | Get current stamina cost based on wield status |
on_pre_attack | Handle pre-attack validation for wall tearing |
rip_and_tear | Execute the wall tearing process |
validate_target | Validate if target can be torn |
Var Details
do_after_key 
Unique key for do_after actions to prevent overlapping interactions
ignore_exhaustion 
Whether to ignore stamina exhaustion checks
reinforced_multiplier 
Multiplier for tear time on reinforced walls (null means cannot tear reinforced walls)
require_wielded 
Whether the item must be wielded to tear walls
stamina_cost 
Base stamina cost for tearing actions
stamina_cost_wielded 
Stamina cost when wielded (if different from base)
tear_time 
Base time required to tear a standard wall
Proc Details
Initialize
Initialize the rip and tear component
Sets up the component parameters for wall tearing behavior Arguments:
- stamina_cost - Base stamina cost for tearing actions
- stamina_cost_wielded - Stamina cost when wielded (uses stamina_cost if null)
- require_wielded - Whether wielding is required for tearing
- reinforced_multiplier - Time multiplier for reinforced walls (null prevents tearing reinforced walls)
- tear_time - Base time required to tear standard walls
- ignore_exhaustion - Whether to ignore stamina exhaustion checks
get_stamina_cost
Get current stamina cost based on wield status
Returns the appropriate stamina cost based on whether the item is wielded Returns: Stamina cost value
on_pre_attack
Handle pre-attack validation for wall tearing
Checks if the target is a valid wall for tearing and initiates the tearing process Returns: COMPONENT_CANCEL_ATTACK_CHAIN if tearing is initiated or invalid, otherwise NONE
rip_and_tear
Execute the wall tearing process
Handles the actual wall tearing sequence including do_after, stamina costs, and visual/audio feedback. Recursively continues tearing until wall is destroyed or interrupted.
validate_target
Validate if target can be torn
Checks various conditions for wall tearing validity Returns: WALL_TEAR_ALLOWED if valid, WALL_TEAR_INVALID if invalid but should continue chain, WALL_TEAR_CANCEL_CHAIN if invalid and should cancel attack chain