[MIRROR] Adds an extra malf AI ability: Remote emagging. Also tidies up emag code and coverts a lot of things to balloon alerts [MDB IGNORE] (#22469)

* Adds an extra malf AI ability: Remote emagging. Also tidies up emag code and coverts a lot of things to balloon alerts

* Update communications.dm

* Modular override

* Some modular adjustments, removes 'emagged' vars in favor of obj_flags

* whoops, mobs don't have obj_flags.

---------

Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
This commit is contained in:
SkyratBot
2023-07-15 22:46:17 +02:00
committed by GitHub
parent 986585d0de
commit e264ee3644
109 changed files with 690 additions and 379 deletions
@@ -320,18 +320,22 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
if(response == "Yes")
turn_on(user)
/obj/item/modular_computer/emag_act(mob/user, forced)
/obj/item/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card, forced)
if(!enabled && !forced)
to_chat(user, span_warning("You'd need to turn the [src] on first."))
balloon_alert(user, "turn it on first!")
return FALSE
if(obj_flags & EMAGGED)
to_chat(user, span_notice("You swipe \the [src]. A console window fills the screen, but it quickly closes itself after only a few lines are written to it."))
balloon_alert(user, "already emagged!")
if (emag_card)
to_chat(user, span_notice("You swipe \the [src] with [emag_card]. A console window fills the screen, but it quickly closes itself after only a few lines are written to it."))
return FALSE
. = ..()
obj_flags |= EMAGGED
device_theme = PDA_THEME_SYNDICATE
to_chat(user, span_notice("You swipe \the [src]. A console window momentarily fills the screen, with white text rapidly scrolling past."))
balloon_alert(user, "syndieOS loaded")
if (emag_card)
to_chat(user, span_notice("You swipe \the [src] with [emag_card]. A console window momentarily fills the screen, with white text rapidly scrolling past."))
return TRUE
/obj/item/modular_computer/examine(mob/user)
@@ -61,9 +61,9 @@
if(cpu)
cpu.attack_ghost(user)
/obj/machinery/modular_computer/emag_act(mob/user)
/obj/machinery/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card)
if(!cpu)
to_chat(user, span_warning("You'd need to turn the [src] on first."))
balloon_alert(user, "turn it on first!")
return FALSE
return cpu.emag_act(user)