cleaner
Component that can be used to clean things. Takes care of duration, cleaning skill and special cleaning interactions. A callback can be set by the datum holding the cleaner to add custom functionality. Soap uses a callback to decrease the amount of uses it has left after cleaning for example.
Vars | |
base_cleaning_duration | The time it takes to clean something, without reductions from the cleaning skill modifier. |
---|---|
cleaning_strength | Determines what this cleaner can wash off, the available options are found here. |
on_cleaned_callback | Gets called when something is successfully cleaned. |
pre_clean_callback | Gets called before you start cleaning, returns TRUE/FALSE whether the clean should actually wash tiles, or DO_NOT_CLEAN to not clean at all. |
skill_duration_modifier_offset | Offsets the cleaning duration modifier that you get from your cleaning skill, the duration won't be modified to be more than the base duration. |
Procs | |
clean | Cleans something using this cleaner. The cleaning duration is modified by the cleaning skill of the user. Successfully cleaning gives cleaning experience to the user and invokes the on_cleaned_callback. |
on_interaction | Handles the COMSIG_ITEM_INTERACTING_WITH_ATOM signal by calling the clean proc. |
on_unarmed_attack | Handles the COMSIG_LIVING_UNARMED_ATTACK signal used for cleanbots Redirects to afterattack, while setting parent (the bot) as user. |
Var Details
base_cleaning_duration
The time it takes to clean something, without reductions from the cleaning skill modifier.
cleaning_strength
Determines what this cleaner can wash off, the available options are found here.
on_cleaned_callback
Gets called when something is successfully cleaned.
pre_clean_callback
Gets called before you start cleaning, returns TRUE/FALSE whether the clean should actually wash tiles, or DO_NOT_CLEAN to not clean at all.
skill_duration_modifier_offset
Offsets the cleaning duration modifier that you get from your cleaning skill, the duration won't be modified to be more than the base duration.
Proc Details
clean
Cleans something using this cleaner. The cleaning duration is modified by the cleaning skill of the user. Successfully cleaning gives cleaning experience to the user and invokes the on_cleaned_callback.
Arguments
- source the datum that sent the signal to start cleaning
- target the thing being cleaned
- user the person doing the cleaning
- clean_target set this to false if the target should not be washed and if experience should not be awarded to the user
on_interaction
Handles the COMSIG_ITEM_INTERACTING_WITH_ATOM signal by calling the clean proc.
on_unarmed_attack
Handles the COMSIG_LIVING_UNARMED_ATTACK signal used for cleanbots Redirects to afterattack, while setting parent (the bot) as user.