Prevents Another "AI Holopad Request" Spam Method

Fixes an easy way to spam holopad requests from multiple holopads all at
once.
This commit is contained in:
Yolopanther
2015-01-07 13:53:15 -08:00
parent 652c8f5741
commit d0cab9da38
+3
View File
@@ -45,6 +45,9 @@ var/const/HOLOPAD_MODE = RANGE_BASED
if(!istype(user))
return
if(alert(user,"Would you like to request an AI's presence?",,"Yes","No") == "Yes")
if(get_dist(src, user) > 1) //also prevents request spam!
user << "<span class='notice'>You are too far from the holopad.</span>"
return
if(last_request + 200 < world.time) //don't spam the AI with requests you jerk!
last_request = world.time
user << "<span class='notice'>You request an AI's presence.</span>"