diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 1446c98ac6b..7fadab2bb26 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -231,7 +231,7 @@ #define COMSIG_ITEM_MARK_RETRIEVAL "item_mark_retrieval" //called before marking an object for retrieval, checked in /obj/effect/proc_holder/spell/targeted/summonitem/cast() : (mob/user) #define COMPONENT_BLOCK_MARK_RETRIEVAL 1 #define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args) -#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable) +#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable, mob/living/crossed) // /obj/item/clothing signals #define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): () diff --git a/code/datums/components/slippery.dm b/code/datums/components/slippery.dm index 131a4d8e044..93ee54ca9c2 100644 --- a/code/datums/components/slippery.dm +++ b/code/datums/components/slippery.dm @@ -11,9 +11,15 @@ force_drop_items = _force_drop lube_flags = _lube_flags callback = _callback - RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED, COMSIG_ITEM_WEARERCROSSED), .proc/Slip) + RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), .proc/Slip) + RegisterSignal(parent, COMSIG_ITEM_WEARERCROSSED, .proc/Slip_on_wearer) /datum/component/slippery/proc/Slip(datum/source, atom/movable/AM) var/mob/victim = AM if(istype(victim) && !victim.is_flying() && victim.slip(knockdown_time, parent, lube_flags, paralyze_time, force_drop_items) && callback) callback.Invoke(victim) + + +/datum/component/slippery/proc/Slip_on_wearer(datum/source, atom/movable/AM, mob/living/crossed) + if(crossed.lying) + Slip(source, AM) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a6b2dbd8c2e..40ca15ac72b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -538,7 +538,7 @@ . = ..() for(var/i in get_equipped_items()) var/obj/item/item = i - SEND_SIGNAL(item, COMSIG_ITEM_WEARERCROSSED, AM) + SEND_SIGNAL(item, COMSIG_ITEM_WEARERCROSSED, AM, src)