Fixed mice and astral projections being able to do stuff they shouldn't (#30378)

This commit is contained in:
DeityLink
2021-08-28 00:52:48 +02:00
committed by GitHub
parent 0a4ee6c3d7
commit fcda492686
2 changed files with 11 additions and 0 deletions

View File

@@ -220,6 +220,9 @@
if(isobserver(user) && !canGhostWrite(user,src,"toggles"))
to_chat(user, "<span class='warning'>Nope.</span>")
return
if(!user.dexterity_check()) //preventing mice and stuff from just doing it
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return FALSE
src.add_fingerprint(usr)
if (src.open)
src.close()
@@ -232,6 +235,9 @@
if(isobserver(user) && !canGhostWrite(user,src,"toggles"))
to_chat(user, "<span class='warning'>Nope.</span>")
return
if(!user.dexterity_check()) //preventing mice and stuff from just doing it
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return FALSE
src.add_fingerprint(usr)
if (src.open)
src.close()

View File

@@ -379,6 +379,7 @@ var/list/astral_projections = list()
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
incorporeal_move = INCORPOREAL_GHOST
alpha = 127
now_pushing = 1 //prevents pushing atoms
//keeps track of whether we're in "ghost" form or "slightly less ghost" form
var/tangibility = FALSE
@@ -536,6 +537,10 @@ var/list/astral_projections = list()
/mob/living/simple_animal/astral_projection/unarmed_attack_mob(mob/living/target)
return
//this should prevent most other edge cases
/mob/living/simple_animal/astral_projection/incapacitated()
return TRUE
//bullets instantly end us
/mob/living/simple_animal/astral_projection/bullet_act(var/obj/item/projectile/P)
if (tangibility)