Skip to content

Commit

Permalink
Removed generate_uni_identity from randomize_human() proc since it's …
Browse files Browse the repository at this point in the history
…already called by ready_dna right after.

Simplifies mutation overlay updating code.
  • Loading branch information
phil235 committed Sep 13, 2015
1 parent 428a28a commit c958866
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
26 changes: 4 additions & 22 deletions code/datums/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
return 1
owner.dna.mutations.Add(src)
owner << text_gain_indication
if(visual_indicators.len)
owner.update_mutation_overlays()

/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner)
return
Expand All @@ -75,6 +77,8 @@
/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
if(owner && istype(owner) && (owner.dna.mutations.Remove(src)))
owner << text_lose_indication
if(visual_indicators.len)
owner.update_mutation_overlays()
return 0
return 1

Expand Down Expand Up @@ -102,7 +106,6 @@
if(..())
return
var/status = CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH
owner.update_mutation_overlays()
owner.status_flags &= ~status

/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target)
Expand All @@ -123,7 +126,6 @@
if(..())
return
owner.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH
owner.update_mutation_overlays()

/datum/mutation/human/hulk/say_mod(message)
if(message)
Expand All @@ -145,16 +147,6 @@
/datum/mutation/human/telekinesis/get_visual_indicator(mob/living/carbon/human/owner)
return visual_indicators[1]

/datum/mutation/human/telekinesis/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.update_mutation_overlays()

/datum/mutation/human/telekinesis/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.update_mutation_overlays()

/datum/mutation/human/telekinesis/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
target.attack_tk(owner)

Expand All @@ -173,16 +165,6 @@
/datum/mutation/human/cold_resistance/get_visual_indicator(mob/living/carbon/human/owner)
return visual_indicators[1]

/datum/mutation/human/cold_resistance/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.update_mutation_overlays()

/datum/mutation/human/cold_resistance/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.update_mutation_overlays()

/datum/mutation/human/cold_resistance/on_life(mob/living/carbon/human/owner)
if(owner.getFireLoss())
if(prob(1))
Expand Down
1 change: 0 additions & 1 deletion code/modules/admin/create_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
H.facial_hair_color = H.hair_color
H.eye_color = random_eye_color()
H.dna.blood_type = random_blood_type()
H.dna.generate_uni_identity(H)
H.update_body()
H.update_hair()

0 comments on commit c958866

Please sign in to comment.