mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
@@ -14,7 +14,7 @@
|
||||
|
||||
/datum/middleClickOverride/proc/onClick(atom/A, mob/living/user)
|
||||
user.middleClickOverride = null
|
||||
return 1
|
||||
return TRUE
|
||||
/* Note, when making a new click override it is ABSOLUTELY VITAL that you set the source's clickOverride to null at some point if you don't want them to be stuck with it forever.
|
||||
Calling the super will do this for you automatically, but if you want a click override to NOT clear itself after the first click, you must do it at some other point in the code*/
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
click_override = new(CALLBACK(src, PROC_REF(try_to_sting)))
|
||||
|
||||
/datum/action/changeling/sting/Destroy(force, ...)
|
||||
if(cling.owner.current.middleClickOverride == click_override)
|
||||
if(cling.owner.current && cling.owner.current.middleClickOverride == click_override) // this is a very scuffed way of doing this honestly
|
||||
cling.owner.current.middleClickOverride = null
|
||||
QDEL_NULL(click_override)
|
||||
if(cling.chosen_sting == src)
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
qdel(S)
|
||||
else
|
||||
S.be_replaced()
|
||||
QDEL_NULL(middleClickOverride)
|
||||
if(mind?.current == src)
|
||||
mind.current = null
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user