Only malf AI can hack doors with cut ai wires, flash emps cameras (#21610)

* Only malf AI can hack doors with cut ai wires, flash emp

* weaker emp = less time

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: JimKil3 <47290811+JimKil3@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: JimKil3 <47290811+JimKil3@users.noreply.github.com>

* FLASH. AH AH

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: JimKil3 <47290811+JimKil3@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2023-08-12 13:43:05 -04:00
committed by GitHub
parent 121603c825
commit 7907e1dc38
3 changed files with 28 additions and 9 deletions
+19
View File
@@ -137,6 +137,20 @@
return 1
user.visible_message("<span class='disarm'>[user] fails to blind [M] with [src]!</span>", "<span class='warning'>You fail to blind [M] with [src]!</span>")
/obj/item/flash/afterattack(atom/target, mob/living/user, proximity, params)
if(!proximity)
return
if(!istype(target, /obj/machinery/camera))
return
if(!try_use_flash(user))
return
var/obj/machinery/camera/C = target
C.emp_act(EMP_HEAVY)
to_chat(user,"<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>")
log_admin("[key_name(user)] EMPd a camera with a flash")
user.create_attack_log("[key_name(user)] EMPd a camera with a flash")
add_attack_logs(user, C, "EMPd with [src]", ATKLOG_ALL)
/obj/item/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
if(!try_use_flash(user))
@@ -144,6 +158,11 @@
user.visible_message("<span class='disarm'>[user]'s [name] emits a blinding light!</span>", "<span class='danger'>Your [name] emits a blinding light!</span>")
for(var/mob/living/carbon/M in oviewers(3, null))
flash_carbon(M, user, 6 SECONDS, 0)
for(var/obj/machinery/camera/C in view(3, user))
C.emp_act(EMP_LIGHT)
log_admin("[key_name(user)] EMPd a camera with a flash")
user.create_attack_log("[key_name(user)] EMPd a camera with a flash")
add_attack_logs(user, C, "EMPd with [src]", ATKLOG_ALL)
/obj/item/flash/emp_act(severity)