mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
Merge pull request #11458 from PsiOmegaDelta/151117-MultitoolPower
Multitool Upgrade
This commit is contained in:
@@ -70,14 +70,16 @@
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2)
|
||||
var/uses = 10
|
||||
|
||||
var/const/NO_EMAG_ACT = -50
|
||||
/obj/item/weapon/card/emag/resolve_attackby(atom/A, mob/user)
|
||||
var/used_uses = A.emag_act(uses, user, src)
|
||||
if(used_uses < 0)
|
||||
if(used_uses == NO_EMAG_ACT)
|
||||
return ..(A, user)
|
||||
|
||||
uses -= used_uses
|
||||
A.add_fingerprint(user)
|
||||
log_and_message_admins("emagged \an [A].")
|
||||
if(used_uses)
|
||||
log_and_message_admins("emagged \an [A].")
|
||||
|
||||
if(uses<1)
|
||||
user.visible_message("<span class='warning'>\The [src] fizzles and sparks - it seems it's been used once too often, and is now spent.</span>")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef T_BOARD
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
/obj/item/weapon/circuitboard/message_monitor
|
||||
@@ -57,18 +57,6 @@
|
||||
name = T_BOARD("employment records console")
|
||||
build_path = /obj/machinery/computer/skills
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert_engineering
|
||||
name = T_BOARD("station alert console (engineering)")
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert_security
|
||||
name = T_BOARD("station alert console (security)")
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert_all
|
||||
name = T_BOARD("station alert console (all)")
|
||||
build_path = /obj/machinery/computer/station_alert/all
|
||||
|
||||
/obj/item/weapon/circuitboard/atmos_alert
|
||||
name = T_BOARD("atmospheric alert console")
|
||||
build_path = /obj/machinery/computer/atmos_alert
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/obj/item/weapon/circuitboard/stationalert
|
||||
name = T_BOARD("station alert console")
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
var/list/alarm_handlers
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert/New()
|
||||
alarm_handlers = new()
|
||||
set_expansion(/datum/expansion/multitool, new/datum/expansion/multitool/circuitboards/stationalert(src))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert/construct(var/obj/machinery/computer/station_alert/SA)
|
||||
if(..(SA))
|
||||
SA.unregister_monitor()
|
||||
|
||||
var/datum/nano_module/alarm_monitor/monitor = new(SA)
|
||||
monitor.alarm_handlers.Cut()
|
||||
for(var/alarm_handler in alarm_handlers)
|
||||
monitor.alarm_handlers += alarm_handler
|
||||
|
||||
SA.register_monitor(monitor)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert/deconstruct(var/obj/machinery/computer/station_alert/SA)
|
||||
if(..(SA))
|
||||
alarm_handlers.Cut()
|
||||
if(SA.alarm_monitor)
|
||||
for(var/alarm_handler in SA.alarm_monitor.alarm_handlers)
|
||||
alarm_handlers += alarm_handler
|
||||
return 1
|
||||
Reference in New Issue
Block a user