Replace backup implant boxes with special implanter

Stores 4 inside the implanter, so medical people can just carry one with them if they want. Added more to the vendors to offset the smaller number per thing (7 per box vs 4 per implanter). The sprite is unique, and represents how many are left on the outside. Orange means just one left, flashing red means empty.

You can take the implants out if you want, swap them between implanters, etc. This one is self-cleaning, and can't cause infections, yay. So if you have to leave one in the lobby for people, now you don't have to feel bad about horrible cross-contamination?
This commit is contained in:
Arokha Sieyes
2017-03-09 23:13:52 -05:00
parent cbf32f5482
commit 57f475392e
5 changed files with 30 additions and 24 deletions
+13 -7
View File
@@ -71,20 +71,25 @@
/obj/item/weapon/backup_implanter/New()
..()
for(var/i = 1 to max_implants)
imps[i] = new /obj/item/weapon/implant/backup(src)
var/obj/item/weapon/implant/backup/imp = new(src)
imps |= imp
imp.germ_level = 0
update()
/obj/item/weapon/backup_implanter/update()
/obj/item/weapon/backup_implanter/proc/update()
icon_state = "[initial(icon_state)][imps.len]"
germ_level = 0
/obj/item/weapon/backup_implanter/attack_hand(mob/user as mob)
/obj/item/weapon/backup_implanter/attack_self(mob/user as mob)
if(!istype(user))
return
if(imps.len)
user << "<span class='notice'>You eject a backup implant.</span>"
imps[imps.len].forceMove(get_turf(user))
user.put_in_any_hand_if_possible(imps.len)
var/obj/item/weapon/implant/backup/imp = imps[imps.len]
imp.forceMove(get_turf(user))
imps -= imp
user.put_in_any_hand_if_possible(imp)
update()
else
user << "<span class='warning'>\The [src] is empty.</span>"
@@ -94,7 +99,9 @@
/obj/item/weapon/backup_implanter/attackby(obj/W, mob/user)
if(istype(W,/obj/item/weapon/implant/backup))
if(imps.len < max_implants)
user.unEquip(W)
imps |= W
W.germ_level = 0
W.forceMove(src)
update()
user << "<span class='notice'>You load \the [W] into \the [src].</span>"
@@ -115,14 +122,13 @@
if(user && M && (get_turf(M) == T1) && src && src.imps.len)
M.visible_message("<span class='notice'>[M] has been backup implanted by [user].</span>")
admin_attack_log(user, M, "Implanted using \the [src.name] ([src.imp.name])", "Implanted with \the [src.name] ([src.imp.name])", "used an implanter, [src.name] ([src.imp.name]), on")
var/obj/item/weapon/implant/backup/imp = imps[imps.len]
if(imp.implanted(M))
imp.forceMove(M)
imps -= imp
imp.imp_in = M
imp.implanted = 1
admin_attack_log(user, M, "Implanted using \the [src.name] ([imp.name])", "Implanted with \the [src.name] ([imp.name])", "used an implanter, [src.name] ([imp.name]), on")
if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)