Merge pull request #12199 from Aranclanos/hypomedborg

Fixes medborgs injecting mobs without reagents with their hypospray
This commit is contained in:
Razharas
2015-10-10 03:17:11 +03:00
@@ -83,14 +83,14 @@ Borg Hypospray
R.cell.use(charge_cost) //Take power from borg...
RG.add_reagent(reagent_ids[mode], 5) //And fill hypo with reagent.
/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/M, mob/user)
/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/carbon/M, mob/user)
var/datum/reagents/R = reagent_list[mode]
if(!R.total_volume)
user << "<span class='notice'>The injector is empty.</span>"
return
if (!( istype(M) ))
if(!istype(M))
return
if (R.total_volume && M.can_inject(user, 1, penetrate_thick = bypass_protection))
if(R.total_volume && M.can_inject(user, 1, bypass_protection))
M << "<span class='warning'>You feel a tiny prick!</span>"
user << "<span class='notice'>You inject [M] with the injector.</span>"
var/fraction = min(amount_per_transfer_from_this/R.total_volume, 1)
@@ -98,7 +98,6 @@ Borg Hypospray
if(M.reagents)
var/trans = R.trans_to(M, amount_per_transfer_from_this)
user << "<span class='notice'>[trans] unit\s injected. [R.total_volume] unit\s remaining.</span>"
return
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user)
var/chosen_reagent = modes[input(user, "What reagent do you want to dispense?") as null|anything in reagent_ids]