mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
[MIRROR] Small do-after refactor (#2074)
* Small do-after refactor (#55172) This is an alternative to the PR Ryll made, it does some things similar e.g. the default limit of 1 interaction per target for a person, however, it refactors do_afters to support overrides for max interaction counts and unique sources. For example, stripping uses the item being stripped as the source, allowing you to strip multiple items, but not the same item multiple times. I've also fixed most other edge-cases this could cause where balance would be affected, but feel free to point out any I might've missed, this'll probably require some longer-term testmerging. * Small do-after refactor Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
Butcher(user, M)
|
||||
|
||||
/datum/component/butchering/proc/startNeckSlice(obj/item/source, mob/living/carbon/human/H, mob/living/user)
|
||||
if(INTERACTING_WITH(user, H))
|
||||
if(DOING_INTERACTION_WITH_TARGET(user, H))
|
||||
to_chat(user, "<span class='warning'>You're already interacting with [H]!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/datum/element/art/proc/on_examine(atom/source, mob/user, list/examine_texts)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!INTERACTING_WITH(user, source))
|
||||
if(!DOING_INTERACTION_WITH_TARGET(user, source))
|
||||
INVOKE_ASYNC(src, .proc/appraise, source, user) //Do not sleep the proc.
|
||||
|
||||
/datum/element/art/proc/appraise(atom/source, mob/user)
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
return FALSE
|
||||
|
||||
// now that we've determined we have a valid attempt at treating, we can stomp on their dreams if we're already interacting with the patient or if their part is obscured
|
||||
if(INTERACTING_WITH(user, victim))
|
||||
if(DOING_INTERACTION_WITH_TARGET(user, victim))
|
||||
to_chat(user, "<span class='warning'>You're already interacting with [victim]!</span>")
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
/datum/wound/slash/try_handling(mob/living/carbon/human/user)
|
||||
if(user.pulling != victim || user.zone_selected != limb.body_zone || user.a_intent == INTENT_GRAB || !isfelinid(user) || !victim.can_inject(user, TRUE))
|
||||
return FALSE
|
||||
if(INTERACTING_WITH(user, victim))
|
||||
if(DOING_INTERACTION_WITH_TARGET(user, victim))
|
||||
to_chat(user, "<span class='warning'>You're already interacting with [victim]!</span>")
|
||||
return
|
||||
if(user.is_mouth_covered())
|
||||
|
||||
Reference in New Issue
Block a user