refactoring altclick interaction to allow parent calls without forcing the turf contents stat menu open.

This commit is contained in:
Ghommie
2019-11-29 00:40:16 +01:00
parent 8cec8fa506
commit 3b8aebbbc2
99 changed files with 269 additions and 162 deletions
@@ -29,6 +29,7 @@
/mob/living/simple_animal/hostile/guardian/bomb/AltClickOn(atom/movable/A)
if(!istype(A))
altclick_listed_turf(A)
return
if(loc == summoner)
to_chat(src, "<span class='danger'><B>You must be manifested to create bombs!</span></B>")
@@ -105,8 +105,9 @@
/mob/living/simple_animal/hostile/guardian/healer/AltClickOn(atom/movable/A)
if(!istype(A))
altclick_listed_turf(A)
return
if(src.loc == summoner)
if(loc == summoner)
to_chat(src, "<span class='danger'><B>You must be manifested to warp a target!</span></B>")
return
if(!beacon)
@@ -267,6 +267,7 @@ Difficulty: Medium
/mob/living/simple_animal/hostile/megafauna/dragon/AltClickOn(atom/movable/A)
if(!istype(A))
altclick_listed_turf(A)
return
if(swoop_cooldown >= world.time)
to_chat(src, "<span class='warning'>You need to wait 20 seconds between swoop attacks!</span>")
@@ -441,7 +441,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
return altclick_listed_turf(A)
blink(A)
//Hierophant overlays
+1
View File
@@ -8,6 +8,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, typecacheof(list(
/mob/living/proc/handle_ventcrawl(atom/A)
if(!ventcrawler || !Adjacent(A))
return
. = TRUE //return value to stop the client from being shown the turf contents stat tab on alt-click.
if(stat)
to_chat(src, "You must be conscious to do this!")
return