diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 18aaf66659..59b78577af 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -112,8 +112,8 @@ /mob/living/silicon/ai/CtrlClickOn(var/atom/A) A.AICtrlClick(src) /mob/living/silicon/ai/AltClickOn(var/atom/A) - if(!A.AIAltClick(src)) - altclick_listed_turf(A) + A.AIAltClick(src) + /* The following criminally helpful code is just the previous code cleaned up; diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index e14ee398e4..2e52fa5bd7 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -322,18 +322,10 @@ Used as an alternate way to interact with things. */ /mob/proc/AltClickOn(atom/A) - - if(!A.AltClick(src)) - altclick_listed_turf(A) - -/mob/proc/altclick_listed_turf(atom/A) - var/turf/T = get_turf(A) - if(T == A.loc || T == A) - if(T == listed_turf) - listed_turf = null - else if(TurfAdjacent(T)) - listed_turf = T - client.statpanel = T.name + . = SEND_SIGNAL(src, COMSIG_MOB_ALTCLICKON, A) + if(. & COMSIG_MOB_CANCEL_CLICKON) + return + A.AltClick(src) /mob/living/carbon/AltClickOn(atom/A) if(!stat && mind && iscarbon(A) && A != src) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 372fe46046..afc01a6ec0 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -98,8 +98,7 @@ /mob/living/silicon/robot/CtrlClickOn(atom/A) A.BorgCtrlClick(src) /mob/living/silicon/robot/AltClickOn(atom/A) - if(!A.BorgAltClick(src)) - altclick_listed_turf(A) + A.BorgAltClick(src) /atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden CtrlShiftClick(user) diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 8a1e745308..d431e6d3cd 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -31,7 +31,7 @@ ShiftClickOn(A) return if(modifiers["alt"]) - altclick_listed_turf(A) + AltClickNoInteract(src, A) return if(modifiers["ctrl"]) CtrlClickOn(A) diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index 7a2f661fd9..1be16a4837 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -5,7 +5,7 @@ ShiftClickOn(A) return if(modifiers["alt"]) - altclick_listed_turf(A) + AltClickNoInteract(src, A) return if(ishuman(A)) diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm index b594b4ab21..b9037ff4a4 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm @@ -28,7 +28,7 @@ /mob/living/simple_animal/hostile/guardian/bomb/AltClickOn(atom/movable/A) if(!istype(A)) - altclick_listed_turf(A) + AltClickNoInteract(src, A) return if(loc == summoner) to_chat(src, "You must be manifested to create bombs!") diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index 95315a5b36..eee3eb0cdb 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -105,7 +105,7 @@ /mob/living/simple_animal/hostile/guardian/healer/AltClickOn(atom/movable/A) if(!istype(A)) - altclick_listed_turf(A) + AltClickNoInteract(src, A) return if(loc == summoner) to_chat(src, "You must be manifested to warp a target!") diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 4dfd4561d6..f0ab3fba4c 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -274,7 +274,7 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/dragon/AltClickOn(atom/movable/A) if(!istype(A)) - altclick_listed_turf(A) + AltClickNoInteract(src, A) return if(swoop_cooldown >= world.time) to_chat(src, "You need to wait 20 seconds between swoop attacks!") diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index bd3a6e8232..006bef974d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -445,7 +445,7 @@ Difficulty: Normal /mob/living/simple_animal/hostile/megafauna/hierophant/AltClickOn(atom/A) //player control handler(don't give this to a player holy fuck) if(!istype(A) || get_dist(A, src) <= 2) - return altclick_listed_turf(A) + return AltClickNoInteract(src, A) blink(A) //Hierophant overlays