LOIC spam fix (#27648)

* oopsie

* move that too
This commit is contained in:
gurfan
2020-08-27 16:01:07 -05:00
committed by GitHub
parent 8a73e1fcf1
commit b1984e9a1b

View File

@@ -29,13 +29,16 @@
if(cooldown - world.time > 0)
to_chat(user, "<span class='notice'>The Low Orbit Ion Cannon is still on cooldown.</span>")
return
if(!is_type_in_list(get_area(src), the_station_areas))
to_chat(user, "The remote can't establish a connection. You need to be on the station.")
return
if(alert(user, "A cryptic message appears on the screen: \"Activate the Low Orbit Ion-Cannon?\".", name, "Yes", "No") != "Yes")
return
if(user.incapacitated() || !Adjacent(user))
return
if(!is_type_in_list(get_area(src), the_station_areas))
to_chat(user, "The remote can't establish a connection. You need to be on the station.")
return
if(cooldown - world.time > 0) //check again for the cooldown in case people prep a bunch of popups
to_chat(user, "<span class='notice'>The Low Orbit Ion Cannon is still on cooldown.</span>")
return
generate_ion_law()
command_alert(/datum/command_alert/ion_storm_malicious)
cooldown = world.time + 15 MINUTES