Lets ghosts shift-click examine things and alt-click open turf tabs

This commit is contained in:
Meghan-Rossi
2020-08-18 18:10:40 +01:00
parent d607f8f388
commit 024bc796c0
2 changed files with 17 additions and 5 deletions

View File

@@ -255,12 +255,15 @@
/atom/proc/AltClick(var/mob/user)
var/turf/T = get_turf(src)
if(T && user.TurfAdjacent(T))
if(user.listed_turf == T)
user.listed_turf = null
else
user.listed_turf = T
user.client.statpanel = "Turf"
user.ToggleTurfTab(T)
return 1
/mob/proc/ToggleTurfTab(var/turf/T)
if(listed_turf == T)
listed_turf = null
else
listed_turf = T
client.statpanel = "Turf"
/mob/proc/TurfAdjacent(var/turf/T)
return T.AdjacentQuick(src)

View File

@@ -33,6 +33,15 @@
return
if(!checkClickCooldown()) return
setClickCooldown(4)
var/list/modifiers = params2list(params)
if(modifiers["shift"])
examinate(A)
return
if(modifiers["alt"]) // alt and alt-gr (rightalt)
var/turf/T = get_turf(A)
if(T && TurfAdjacent(T))
ToggleTurfTab(T)
return
// You are responsible for checking config.ghost_interaction when you override this function
// Not all of them require checking, see below
A.attack_ghost(src)