Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: DNA injectors don't loose their sprite. #3981

Merged
merged 2 commits into from
Dec 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading