Announcement system overhaul, crew monitor system overhaul, add portable crew monitor

This commit is contained in:
Markolie
2015-02-16 19:03:29 +01:00
parent 0792a40379
commit ad167dc541
102 changed files with 882 additions and 563 deletions
+8 -1
View File
@@ -51,6 +51,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
var/ownjob = null //related to above
var/ownrank = null // this one is rank, never alt title
var/obj/item/device/paicard/pai = null // A slot for a personal AI device
@@ -217,9 +218,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
detonate = 0
/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text)
/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text, newrank as null|text)
owner = newname
ownjob = newjob
if(newrank)
ownrank = newrank
else
ownrank = ownjob
name = newname + " (" + ownjob + ")"
@@ -575,6 +580,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
id_check(U, 1)
if("UpdateInfo")
ownjob = id.assignment
ownrank = id.rank
name = "PDA-[owner] ([ownjob])"
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
@@ -1069,6 +1075,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!owner)
owner = idcard.registered_name
ownjob = idcard.assignment
ownrank = idcard.rank
name = "PDA-[owner] ([ownjob])"
user << "<span class='notice'>Card scanned.</span>"
else
@@ -0,0 +1,18 @@
/obj/item/device/sensor_device
name = "handheld crew monitor"
desc = "A miniature machine that tracks suit sensors across the station."
icon = 'icons/obj/device.dmi'
icon_state = "scanner"
w_class = 2.0
slot_flags = SLOT_BELT
origin_tech = "programming=3;materials=3;magnets=3"
var/obj/nano_module/crew_monitor/crew_monitor
/obj/item/device/sensor_device/New()
crew_monitor = new(src)
/obj/item/device/sensor_device/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
crew_monitor.ui_interact(user, ui_key, ui, force_open)
@@ -95,7 +95,8 @@
"/obj/item/device/flashlight/pen",
"/obj/item/clothing/mask/surgical",
"/obj/item/clothing/gloves/color/latex",
"/obj/item/weapon/reagent_containers/hypospray/autoinjector"
"/obj/item/weapon/reagent_containers/hypospray/autoinjector",
"/obj/item/device/sensor_device"
)
+8 -4
View File
@@ -21,11 +21,15 @@
// Reagent ID => friendly name
var/list/reagents_to_log=list()
/obj/Topic(href, href_list, var/nowindow = 0)
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
// Calling Topic without a corresponding window open causes runtime errors
if(nowindow)
return 0
return ..()
if(!nowindow && ..())
return 1
if(usr.can_interact_with_interface(nano_host(), checkrange) != STATUS_INTERACTIVE)
return 1
add_fingerprint(usr)
return 0
/obj/Destroy()
machines -= src
@@ -234,4 +234,6 @@
sleep(2)
new /obj/item/clothing/suit/space/eva/paramedic(src)
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
new /obj/item/device/sensor_device(src)
return