Fixes an unclear invisimin toggle message for when it would be redundant (#60794)

Adds a check for observers to invisimin verb code.
Less admins thinking it's broken when it just tells them they are disabling it over and over as an observer.
This commit is contained in:
Wayland-Smithy
2021-08-11 18:55:11 -07:00
committed by GitHub
parent 759117442a
commit 7176107628
+3
View File
@@ -382,6 +382,9 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set category = "Admin.Game"
set desc = "Toggles ghost-like invisibility (Don't abuse this)"
if(holder && mob)
if(initial(mob.invisibility) == INVISIBILITY_OBSERVER)
to_chat(mob, span_boldannounce("Invisimin toggle failed. You are already an invisible mob like a ghost."), confidential = TRUE)
return
if(mob.invisibility == INVISIBILITY_OBSERVER)
mob.invisibility = initial(mob.invisibility)
to_chat(mob, span_boldannounce("Invisimin off. Invisibility reset."), confidential = TRUE)