Skip to content

Commit

Permalink
bugfix: DNA injectors don't loose their sprite. (#3981)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeberdir authored and Dimach committed Dec 5, 2023
1 parent 3bd0139 commit 067dd84
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions code/game/objects/items/weapons/dna_injector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,20 @@
/obj/item/dnainjector/proc/inject(mob/living/M, mob/user)
if(used)
return
if(istype(M,/mob/living))
if(isliving(M))
M.apply_effect(rand(20 / (damage_coeff ** 2), 50 / (damage_coeff ** 2)), IRRADIATE, 0, 1)
var/mob/living/carbon/human/H
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
H = M

if(!buf)
log_runtime(EXCEPTION("[src] used by [user] on [M] failed to initialize properly."), src)
return

used = TRUE
icon_state = "[icon_state]0"
desc += " This one is used up."

spawn(0) //Some mutations have sleeps in them, like monkey
if(!(NOCLONE in M.mutations) && !(H && (NO_DNA in H.dna.species.species_traits))) // prevents drained people from having their DNA changed
var/prev_ue = M.dna.unique_enzymes
Expand Down Expand Up @@ -150,9 +154,6 @@
add_attack_logs(user, M, attack_log, ATKLOG_ALL)

inject(M, user)
used = TRUE
icon_state = "[icon_state]0"
desc += " This one is used up."

/obj/item/dnainjector/hulkmut
name = "DNA-Injector (Hulk)"
Expand Down Expand Up @@ -232,7 +233,7 @@
..()

/obj/item/dnainjector/telemut/darkbundle
name = "DNA injector"
name = "DNA-injector"
desc = "Good. Let the hate flow through you."


Expand Down Expand Up @@ -680,7 +681,7 @@
..()

/obj/item/dnainjector/anticomic
name = "DNA-Injector (Ant-Comic)"
name = "DNA-Injector (Anti-Comic)"
desc = "Honk...?"
datatype = DNA2_BUF_SE
value = 0x001
Expand Down

0 comments on commit 067dd84

Please sign in to comment.