Merge pull request #13811 from BlackMajor/borg-hypo
Prevents borg hypos from injecting if it would OD the target while on help intent
This commit is contained in:
+6
@@ -102,6 +102,12 @@ Borg Hypospray
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, 1, user.zone_selected,bypass_protection))
|
||||
if(user.a_intent == INTENT_HELP) //Prevents mediborgs from OD'ing people unless on harm intent
|
||||
for(var/datum/reagent/RG in R.reagent_list)
|
||||
if(M.reagents.has_reagent(RG.type) && !RG.overdose_threshold == 0)
|
||||
if(((M.reagents.get_reagent_amount(RG.type)) + amount_per_transfer_from_this > RG.overdose_threshold))
|
||||
to_chat(user, "<span class='warning'>Injecting [M] with more [RG] would overdose them.</span>")
|
||||
return
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
var/fraction = min(amount_per_transfer_from_this/R.total_volume, 1)
|
||||
Reference in New Issue
Block a user