Merge pull request #27532 from optimumtact/dnainjectors

DNA injector inject proc now properly returns success
This commit is contained in:
Leo
2017-05-23 00:43:47 -03:00
committed by GitHub

View File

@@ -51,6 +51,7 @@
M.updateappearance(mutations_overlay_update=1)
log_attack(log_msg)
return TRUE
return FALSE
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
if(!user.IsAdvancedToolUser())
@@ -307,11 +308,11 @@
/obj/item/weapon/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
prepare()
if(M.stat == DEAD) //prevents dead people from having their DNA changed
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
return FALSE
if(M.has_dna() && !(M.disabilities & NOCLONE))
if(M.stat == DEAD) //prevents dead people from having their DNA changed
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
return
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
var/endtime = world.time+duration
@@ -352,9 +353,9 @@
M.updateappearance(mutations_overlay_update=1)
M.dna.temporary_mutations[UI_CHANGED] = endtime
log_attack(log_msg)
return TRUE
else
to_chat(user, "<span class='notice'>It appears that [M] does not have compatible DNA.</span>")
return
return FALSE
/obj/item/weapon/dnainjector/timed/hulk
name = "\improper DNA injector (Hulk)"