Fixes AIs being able to untilt vendors remotely (#76819)

## About The Pull Request

Title. Also prevents AIs from making shocked vendors repeatedly do
sparks as failed shock() procs happen on each click.
## Why It's Good For The Game

Bugs... bad?
## Changelog
🆑
fix: The AI can no longer untip vendors remotely/spam sparks from
shocked vendors
/🆑
This commit is contained in:
nikothedude
2023-07-16 21:44:03 +02:00
committed by GitHub
parent 6af6131055
commit 70efa8270e
+9 -8
View File
@@ -860,15 +860,16 @@
return TRUE
/obj/machinery/vending/interact(mob/user)
if(seconds_electrified && !(machine_stat & NOPOWER))
if(shock(user, 100))
return
if (!isAI(user))
if(seconds_electrified && !(machine_stat & NOPOWER))
if(shock(user, 100))
return
if(tilted && !user.buckled && !isAdminGhostAI(user))
to_chat(user, span_notice("You begin righting [src]."))
if(do_after(user, 50, target=src))
untilt(user)
return
if(tilted && !user.buckled && !isAdminGhostAI(user))
to_chat(user, span_notice("You begin righting [src]."))
if(do_after(user, 50, target=src))
untilt(user)
return
return ..()