Update ID code in communications computer, make chem dispensers/chem masters accessible to ghosts

This commit is contained in:
Markolie
2015-08-14 20:10:41 +02:00
parent 2175b5d56f
commit 72380b2aad
2 changed files with 14 additions and 7 deletions
@@ -87,7 +87,8 @@ var/shuttle_call/shuttle_calls[0]
if(href_list["login"])
var/mob/living/carbon/human/M = usr
var/obj/item/weapon/card/id/I = M.get_active_hand()||M.wear_id||M.wear_pda
var/obj/item/card = M.get_active_hand()
var/obj/item/weapon/card/id/I = (card && card.GetID())||M.wear_id||M.wear_pda
if (istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
@@ -124,7 +125,8 @@ var/shuttle_call/shuttle_calls[0]
return 1
tmp_alertlevel = text2num(href_list["level"])
var/mob/living/carbon/human/L = usr
var/obj/item/weapon/card/id/I = L.get_active_hand()||L.wear_id||L.wear_pda
var/obj/item/card = L.get_active_hand()
var/obj/item/weapon/card/id/I = (card && card.GetID())||L.wear_id||L.wear_pda
if (istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
+10 -5
View File
@@ -155,8 +155,8 @@
ui.open()
/obj/machinery/chem_dispenser/Topic(href, href_list)
if(stat & (NOPOWER|BROKEN))
return 0 // don't update UIs attached to this object
if(..())
return 1
if(href_list["amount"])
amount = round(text2num(href_list["amount"]), 5) // round to nearest 5
@@ -245,6 +245,9 @@
/obj/machinery/chem_dispenser/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/chem_dispenser/attack_ghost(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
if(stat & BROKEN)
@@ -444,9 +447,8 @@
return
/obj/machinery/chem_master/Topic(href, href_list)
if(stat & (BROKEN|NOPOWER)) return
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
if(..())
return 1
src.add_fingerprint(usr)
usr.set_machine(src)
@@ -636,6 +638,9 @@
/obj/machinery/chem_master/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/chem_master/attack_ghost(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/chem_master/attack_hand(mob/user as mob)
if(stat & BROKEN)