Skip to content

Commit 3a0cf40

Browse files
authored
Makes cling and smuta transforms update your sec HUD (#15085)
1 parent 9dfb8b4 commit 3a0cf40

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

code/game/gamemodes/changeling/changeling_power.dm

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,4 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
9494
if(!D)
9595
return
9696

97-
H.set_species(D.species.type, retain_damage = TRUE)
98-
H.dna = D.Clone()
99-
H.real_name = D.real_name
100-
domutcheck(H, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
101-
H.flavor_text = ""
102-
H.dna.UpdateSE()
103-
H.dna.UpdateUI()
104-
H.sync_organ_dna(1)
105-
H.UpdateAppearance()
97+
H.change_dna(D, TRUE)

code/modules/mob/living/carbon/human/human.dm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,22 @@
12251225
else
12261226
to_chat(usr, "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>")
12271227

1228+
1229+
/mob/living/carbon/human/proc/change_dna(datum/dna/new_dna, include_species_change = FALSE, keep_flavor_text = FALSE)
1230+
if(include_species_change)
1231+
set_species(new_dna.species.type, retain_damage = TRUE)
1232+
dna = new_dna.Clone()
1233+
real_name = new_dna.real_name
1234+
domutcheck(src, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
1235+
if(!keep_flavor_text)
1236+
flavor_text = ""
1237+
dna.UpdateSE()
1238+
dna.UpdateUI()
1239+
sync_organ_dna(TRUE)
1240+
UpdateAppearance()
1241+
sec_hud_set_ID()
1242+
1243+
12281244
/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE, skip_same_check = FALSE, retain_damage = FALSE)
12291245
if(!skip_same_check)
12301246
if(dna.species.name == initial(new_species.name))

code/modules/reagents/chemistry/reagents/toxins.dm

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,7 @@
221221
var/mob/living/carbon/human/H = M
222222
var/datum/dna/D = data["dna"]
223223
if(!D.species.is_small)
224-
H.set_species(D.species.type, retain_damage = TRUE)
225-
H.dna = D.Clone()
226-
H.real_name = D.real_name
227-
domutcheck(H, null, MUTCHK_FORCED)
228-
H.dna.UpdateSE()
229-
H.dna.UpdateUI()
230-
H.sync_organ_dna(TRUE)
231-
H.UpdateAppearance()
224+
H.change_dna(D, TRUE, TRUE)
232225

233226
return ..()
234227

0 commit comments

Comments
 (0)