Fixes a small issue with Syndicate mediborgs

This commit is contained in:
Xhuis
2015-10-02 15:53:21 -04:00
parent 16c8eac8e3
commit 40918f93c5
2 changed files with 6 additions and 4 deletions
@@ -540,7 +540,7 @@
/mob/living/carbon/human/proc/canUseHUD()
return !(src.stat || src.weakened || src.stunned || src.restrained())
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone)
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, var/penetrate_thick = 0)
. = 1 // Default to returning true.
if(user && !target_zone)
target_zone = user.zone_sel.selecting
@@ -549,10 +549,10 @@
// If targeting the head, see if the head item is thin enough.
// If targeting anything else, see if the wear suit is thin enough.
if(above_neck(target_zone))
if(head && head.flags & THICKMATERIAL)
if(head && head.flags & THICKMATERIAL && !penetrate_thick)
. = 0
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
if(wear_suit && wear_suit.flags & THICKMATERIAL && !penetrate_thick)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
@@ -21,6 +21,7 @@ Borg Hypospray
var/charge_cost = 50
var/charge_tick = 0
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
var/bypass_protection = 0 //If the hypospray can go through armor or thick material
var/list/datum/reagents/reagent_list = list()
var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "antitoxin", "epinephrine", "spaceacillin")
@@ -89,7 +90,7 @@ Borg Hypospray
return
if (!( istype(M) ))
return
if (R.total_volume && M.can_inject(user, 1))
if (R.total_volume && M.can_inject(user, 1, penetrate_thick = 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)
@@ -133,6 +134,7 @@ Borg Hypospray
charge_cost = 20
recharge_time = 2
reagent_ids = list("syndicate_nanites", "potass_iodide", "morphine")
bypass_protection = 1
/*
Borg Shaker