mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Now you don't need to have 1 unit of water on the mop to use it with other reagents (#91880)
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
/// Return to stop cleaner component from blocking interaction chain further
|
||||
/// Only does anything if [CLEAN_BLOCKED] is also returned
|
||||
#define CLEAN_DONT_BLOCK_INTERACTION (1<<3)
|
||||
/// Return to do cleaning without actually cleaning anything
|
||||
/// Only does anything if [CLEAN_ALLOWED] is also returned
|
||||
#define CLEAN_NO_CLEANER_REAGENTS (1<<4)
|
||||
|
||||
// Different kinds of things that can be cleaned.
|
||||
// Use these when overriding the wash proc or registering for the clean signals to check if your thing should be cleaned
|
||||
|
||||
@@ -89,6 +89,10 @@
|
||||
* * clean_target set this to false if the target should not be washed and if experience should not be awarded to the user
|
||||
*/
|
||||
/datum/component/cleaner/proc/clean(datum/source, atom/target, mob/living/user, clean_target = TRUE)
|
||||
//mops don't clean anything unless they're dipped in cleaning reagents
|
||||
var/callback_return = pre_clean_callback.Invoke(source, target, user)
|
||||
if(callback_return & CLEAN_NO_CLEANER_REAGENTS)
|
||||
clean_target = FALSE
|
||||
//make sure we don't attempt to clean something while it's already being cleaned
|
||||
if(HAS_TRAIT(target, TRAIT_CURRENTLY_CLEANING) || (SEND_SIGNAL(target, COMSIG_ATOM_PRE_CLEAN, user) & COMSIG_ATOM_CANCEL_CLEAN))
|
||||
return
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return CLEAN_BLOCKED
|
||||
if(reagents.has_reagent(amount = 1, chemical_flags = REAGENT_CLEANS))
|
||||
return CLEAN_ALLOWED
|
||||
return CLEAN_BLOCKED|CLEAN_NO_XP
|
||||
return CLEAN_ALLOWED|CLEAN_NO_XP|CLEAN_NO_CLEANER_REAGENTS
|
||||
|
||||
/**
|
||||
* Applies reagents to the cleaned floor and removes them from the mop.
|
||||
|
||||
Reference in New Issue
Block a user