mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Properly fixed altclick
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
ShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["alt"])
|
||||
altclick_listed_turf(A)
|
||||
AltClickNoInteract(src, A)
|
||||
return
|
||||
if(modifiers["ctrl"])
|
||||
CtrlClickOn(A)
|
||||
|
||||
Reference in New Issue
Block a user