mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
fix changeling middle click stings becoming stuck (#25621)
This commit is contained in:
@@ -81,9 +81,9 @@ RESTRICT_TYPE(/datum/antagonist/changeling)
|
||||
|
||||
/datum/antagonist/changeling/Destroy()
|
||||
SSticker.mode.changelings -= owner
|
||||
chosen_sting = null
|
||||
QDEL_LIST_CONTENTS(acquired_powers)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
chosen_sting = null
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/changeling/greet()
|
||||
|
||||
@@ -12,11 +12,9 @@
|
||||
click_override = new(CALLBACK(src, PROC_REF(try_to_sting)))
|
||||
|
||||
/datum/action/changeling/sting/Destroy(force, ...)
|
||||
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)
|
||||
cling.chosen_sting = null
|
||||
unset_sting()
|
||||
return ..()
|
||||
|
||||
/datum/action/changeling/sting/Trigger(left_click)
|
||||
@@ -25,6 +23,12 @@
|
||||
else
|
||||
unset_sting()
|
||||
|
||||
/datum/action/changeling/sting/Remove(mob/remove_from)
|
||||
. = ..()
|
||||
// Check that cling exists because in certain scenarios, it may have been deleted in Destroy() first.
|
||||
if(cling?.chosen_sting == src)
|
||||
unset_sting()
|
||||
|
||||
/datum/action/changeling/sting/proc/set_sting()
|
||||
var/mob/living/user = owner
|
||||
to_chat(user, "<span class='warning'>We prepare our sting, use alt+click or middle mouse button on a target to sting them.</span>")
|
||||
|
||||
Reference in New Issue
Block a user