mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Replaces some bad trait sources and updates two trait names (#71375)
## About The Pull Request Traits should never use a hard reference as their trait source, if you want to use a "reference" to a datum use `REF()` instead, or it will cause hard deletes Also renamed some traits which didn't use the "standard" scheme, because I saw it while regexing ## Why It's Good For The Game - Prevents some hard deletes - Uses a less confusing naming scheme ## Changelog Not necessary
This commit is contained in:
@@ -88,8 +88,8 @@
|
||||
* * 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)
|
||||
if(!HAS_TRAIT(target, CURRENTLY_CLEANING)) //add the trait and overlay
|
||||
ADD_TRAIT(target, CURRENTLY_CLEANING, src)
|
||||
if(!HAS_TRAIT(target, TRAIT_CURRENTLY_CLEANING)) //add the trait and overlay
|
||||
ADD_TRAIT(target, TRAIT_CURRENTLY_CLEANING, REF(src))
|
||||
|
||||
// We need to update our planes on overlay changes
|
||||
RegisterSignal(target, COMSIG_MOVABLE_Z_CHANGED, PROC_REF(cleaning_target_moved))
|
||||
@@ -128,7 +128,7 @@
|
||||
target.cut_overlay(low_bubble)
|
||||
target.cut_overlay(high_bubble)
|
||||
UnregisterSignal(target, COMSIG_MOVABLE_Z_CHANGED)
|
||||
REMOVE_TRAIT(target, CURRENTLY_CLEANING, src)
|
||||
REMOVE_TRAIT(target, TRAIT_CURRENTLY_CLEANING, REF(src))
|
||||
|
||||
/datum/component/cleaner/proc/cleaning_target_moved(atom/movable/source, turf/old_turf, turf/new_turf, same_z_layer)
|
||||
if(same_z_layer)
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
if(SEND_SIGNAL(parent, COMSIG_TWOHANDED_WIELD, user) & COMPONENT_TWOHANDED_BLOCK_WIELD)
|
||||
return // blocked wield from item
|
||||
wielded = TRUE
|
||||
ADD_TRAIT(parent,TRAIT_WIELDED,src)
|
||||
ADD_TRAIT(parent, TRAIT_WIELDED, REF(src))
|
||||
RegisterSignal(user, COMSIG_MOB_SWAP_HANDS, PROC_REF(on_swap_hands))
|
||||
wield_callback?.Invoke(parent, user)
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
wielded = FALSE
|
||||
UnregisterSignal(user, COMSIG_MOB_SWAP_HANDS)
|
||||
SEND_SIGNAL(parent, COMSIG_TWOHANDED_UNWIELD, user)
|
||||
REMOVE_TRAIT(parent,TRAIT_WIELDED,src)
|
||||
REMOVE_TRAIT(parent, TRAIT_WIELDED, REF(src))
|
||||
unwield_callback?.Invoke(parent, user)
|
||||
|
||||
// update item stats
|
||||
|
||||
Reference in New Issue
Block a user