mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Simplified update_mutations_overlay(), we no longer rebuild the entire mutation layer with all mutations every time we get or lose a mutation. I reintroduced in on_acquiring and on_losing some code similar to the old lose_indication gain_indication procs.
Fixed lesser form changeling, when humanized via dna injector, the ling no longer keeps its Human Form power. Simplified the racemut trick in humanize() and monkeyize(). Dna now gets qdel'd, just like reagents, when the mob gets qdel'd. Some tiny fixes here and there. Added a changelog.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
var/text_gain_indication = ""
|
var/text_gain_indication = ""
|
||||||
var/text_lose_indication = ""
|
var/text_lose_indication = ""
|
||||||
var/list/visual_indicators = list()
|
var/list/visual_indicators = list()
|
||||||
var/above_body = 0 //wether the mutation appear above or below the body layer
|
var/layer_used = MUTATIONS_LAYER //which mutation layer to use
|
||||||
var/list/species_allowed = list() //to restrict mutation to only certain species
|
var/list/species_allowed = list() //to restrict mutation to only certain species
|
||||||
var/health_req //minimum health required to acquire the mutation
|
var/health_req //minimum health required to acquire the mutation
|
||||||
|
|
||||||
@@ -62,7 +62,13 @@
|
|||||||
if(text_gain_indication)
|
if(text_gain_indication)
|
||||||
owner << text_gain_indication
|
owner << text_gain_indication
|
||||||
if(visual_indicators.len)
|
if(visual_indicators.len)
|
||||||
owner.update_mutations_overlay()
|
var/list/mut_overlay = list(get_visual_indicator(owner))
|
||||||
|
if(owner.overlays_standing[layer_used])
|
||||||
|
mut_overlay = owner.overlays_standing[layer_used]
|
||||||
|
mut_overlay |= get_visual_indicator(owner)
|
||||||
|
owner.remove_overlay(layer_used)
|
||||||
|
owner.overlays_standing[layer_used] = mut_overlay
|
||||||
|
owner.apply_overlay(layer_used)
|
||||||
|
|
||||||
/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner)
|
/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner)
|
||||||
return
|
return
|
||||||
@@ -84,7 +90,13 @@
|
|||||||
if(text_lose_indication)
|
if(text_lose_indication)
|
||||||
owner << text_lose_indication
|
owner << text_lose_indication
|
||||||
if(visual_indicators.len)
|
if(visual_indicators.len)
|
||||||
owner.update_mutations_overlay()
|
var/list/mut_overlay = list()
|
||||||
|
if(owner.overlays_standing[layer_used])
|
||||||
|
mut_overlay = owner.overlays_standing[layer_used]
|
||||||
|
owner.remove_overlay(layer_used)
|
||||||
|
mut_overlay.Remove(get_visual_indicator(owner))
|
||||||
|
owner.overlays_standing[layer_used] = mut_overlay
|
||||||
|
owner.apply_overlay(layer_used)
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -596,7 +608,7 @@
|
|||||||
quality = POSITIVE
|
quality = POSITIVE
|
||||||
dna_block = NON_SCANNABLE
|
dna_block = NON_SCANNABLE
|
||||||
text_gain_indication = "<span class='notice'>You feel pressure building up behind your eyes.</span>"
|
text_gain_indication = "<span class='notice'>You feel pressure building up behind your eyes.</span>"
|
||||||
above_body = 1
|
layer_used = FRONT_MUTATIONS_LAYER
|
||||||
|
|
||||||
/datum/mutation/human/laser_eyes/New()
|
/datum/mutation/human/laser_eyes/New()
|
||||||
..()
|
..()
|
||||||
@@ -609,29 +621,24 @@
|
|||||||
if(owner.a_intent == "harm")
|
if(owner.a_intent == "harm")
|
||||||
owner.LaserEyes(target)
|
owner.LaserEyes(target)
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/proc/update_mutations_overlay()
|
/mob/living/carbon/proc/update_mutations_overlay()
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/carbon/human/update_mutations_overlay()
|
/mob/living/carbon/human/update_mutations_overlay()
|
||||||
remove_overlay(MUTATIONS_LAYER) //MUTATIONS_LAYER is behind the body layer
|
|
||||||
remove_overlay(FRONT_MUTATIONS_LAYER) //FRONT_MUTATIONS_LAYER is above the body layer
|
|
||||||
var/list/standing = list()
|
|
||||||
var/list/frontstanding = list()
|
|
||||||
|
|
||||||
for(var/datum/mutation/human/CM in dna.mutations)
|
for(var/datum/mutation/human/CM in dna.mutations)
|
||||||
if(CM.species_allowed.len && !CM.species_allowed.Find(dna.species.id))
|
if(CM.species_allowed.len && !CM.species_allowed.Find(dna.species.id))
|
||||||
CM.force_lose(src)
|
CM.force_lose(src) //shouldn't have that mutation at all
|
||||||
continue
|
continue
|
||||||
if(CM.visual_indicators.len)
|
if(CM.visual_indicators.len)
|
||||||
|
var/list/mut_overlay = list()
|
||||||
|
if(overlays_standing[CM.layer_used])
|
||||||
|
mut_overlay = overlays_standing[CM.layer_used]
|
||||||
var/image/V = CM.get_visual_indicator(src)
|
var/image/V = CM.get_visual_indicator(src)
|
||||||
if(CM.above_body)
|
if(!mut_overlay.Find(V)) //either we lack the visual indicator or we have the wrong one
|
||||||
frontstanding += V
|
remove_overlay(CM.layer_used)
|
||||||
else
|
for(var/image/I in CM.visual_indicators)
|
||||||
standing += V
|
mut_overlay.Remove(I)
|
||||||
|
mut_overlay |= V
|
||||||
if(standing.len)
|
overlays_standing[CM.layer_used] = mut_overlay
|
||||||
overlays_standing[MUTATIONS_LAYER] = standing
|
apply_overlay(CM.layer_used)
|
||||||
if(frontstanding.len)
|
|
||||||
overlays_standing[FRONT_MUTATIONS_LAYER] = frontstanding
|
|
||||||
apply_overlay(MUTATIONS_LAYER)
|
|
||||||
apply_overlay(FRONT_MUTATIONS_LAYER)
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutat
|
|||||||
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
|
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
|
||||||
if(prob(probability))
|
if(prob(probability))
|
||||||
M.dna.uni_identity = setblock(M.dna.uni_identity, i, random_string(DNA_BLOCK_SIZE, hex_characters))
|
M.dna.uni_identity = setblock(M.dna.uni_identity, i, random_string(DNA_BLOCK_SIZE, hex_characters))
|
||||||
M.updateappearance()
|
M.updateappearance(mutations_overlay_update=1)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//value in range 1 to values. values must be greater than 0
|
//value in range 1 to values. values must be greater than 0
|
||||||
|
|||||||
@@ -388,8 +388,6 @@ var/list/sting_paths
|
|||||||
/mob/proc/remove_changeling_powers(keep_free_powers=0)
|
/mob/proc/remove_changeling_powers(keep_free_powers=0)
|
||||||
if(ishuman(src) || ismonkey(src))
|
if(ishuman(src) || ismonkey(src))
|
||||||
if(mind && mind.changeling)
|
if(mind && mind.changeling)
|
||||||
digitalcamo = 0
|
|
||||||
digitalinvis = 0
|
|
||||||
mind.changeling.changeling_speak = 0
|
mind.changeling.changeling_speak = 0
|
||||||
mind.changeling.reset()
|
mind.changeling.reset()
|
||||||
for(var/obj/effect/proc_holder/changeling/p in mind.changeling.purchasedpowers)
|
for(var/obj/effect/proc_holder/changeling/p in mind.changeling.purchasedpowers)
|
||||||
|
|||||||
@@ -18,3 +18,7 @@
|
|||||||
|
|
||||||
feedback_add_details("changeling_powers","CAM")
|
feedback_add_details("changeling_powers","CAM")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/effect/proc_holder/changeling/digitalcamo/on_refund(mob/user)
|
||||||
|
user.digitalcamo = 0
|
||||||
|
user.digitalinvis = 0
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
M.dna.blood_type = fields["blood_type"]
|
M.dna.blood_type = fields["blood_type"]
|
||||||
if(fields["UI"]) //UI+UE
|
if(fields["UI"]) //UI+UE
|
||||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||||
M.updateappearance()
|
M.updateappearance(mutations_overlay_update=1)
|
||||||
log_attack(log_msg)
|
log_attack(log_msg)
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
|
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
|
||||||
|
|||||||
@@ -43,10 +43,9 @@
|
|||||||
if(prob(25))
|
if(prob(25))
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
randmutb(H)
|
randmutb(H)
|
||||||
H.domutcheck()
|
|
||||||
else
|
else
|
||||||
randmutg(H)
|
randmutg(H)
|
||||||
H.domutcheck()
|
H.domutcheck()
|
||||||
|
|
||||||
else if(istype(C, /mob/living/carbon/monkey))
|
else if(istype(C, /mob/living/carbon/monkey))
|
||||||
var/mob/living/carbon/monkey/M = C
|
var/mob/living/carbon/monkey/M = C
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
I.real_name = I.dna.real_name
|
I.real_name = I.dna.real_name
|
||||||
I.name = I.dna.real_name
|
I.name = I.dna.real_name
|
||||||
I.updateappearance(mutcolor_update=1)
|
I.updateappearance(mutcolor_update=1)
|
||||||
|
I.domutcheck()
|
||||||
if(W.ears) I.equip_to_slot_or_del(new W.ears.type, slot_ears)
|
if(W.ears) I.equip_to_slot_or_del(new W.ears.type, slot_ears)
|
||||||
if(W.w_uniform) I.equip_to_slot_or_del(new W.w_uniform.type , slot_w_uniform)
|
if(W.w_uniform) I.equip_to_slot_or_del(new W.w_uniform.type , slot_w_uniform)
|
||||||
if(W.shoes) I.equip_to_slot_or_del(new W.shoes.type, slot_shoes)
|
if(W.shoes) I.equip_to_slot_or_del(new W.shoes.type, slot_shoes)
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
for(var/atom/movable/food in stomach_contents)
|
for(var/atom/movable/food in stomach_contents)
|
||||||
qdel(food)
|
qdel(food)
|
||||||
remove_from_all_data_huds()
|
remove_from_all_data_huds()
|
||||||
|
if(dna)
|
||||||
|
qdel(dna)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/carbon/Move(NewLoc, direct)
|
/mob/living/carbon/Move(NewLoc, direct)
|
||||||
|
|||||||
@@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
if(tr_flags & TR_KEEPSE)
|
if(tr_flags & TR_KEEPSE)
|
||||||
O.dna.struc_enzymes = dna.struc_enzymes
|
O.dna.struc_enzymes = dna.struc_enzymes
|
||||||
var/datum/mutation/human/race/R = mutations_list[RACEMUT] //we don't want to keep the race block inactive
|
var/datum/mutation/human/race/R = mutations_list[RACEMUT]
|
||||||
O.dna.struc_enzymes = setblock(O.dna.struc_enzymes, R.dna_block, random_string(DNA_BLOCK_SIZE, list("8","9","a","b","c","d","e", "f")))
|
O.dna.struc_enzymes = R.set_se(O.dna.struc_enzymes, on=1)//we don't want to keep the race block inactive
|
||||||
|
|
||||||
if(suiciding)
|
if(suiciding)
|
||||||
O.suiciding = suiciding
|
O.suiciding = suiciding
|
||||||
@@ -166,8 +166,8 @@
|
|||||||
|
|
||||||
if(tr_flags & TR_KEEPSE)
|
if(tr_flags & TR_KEEPSE)
|
||||||
O.dna.struc_enzymes = dna.struc_enzymes
|
O.dna.struc_enzymes = dna.struc_enzymes
|
||||||
var/datum/mutation/human/race/R = mutations_list[RACEMUT] //we don't want to keep the race block active
|
var/datum/mutation/human/race/R = mutations_list[RACEMUT]
|
||||||
O.dna.struc_enzymes = setblock(O.dna.struc_enzymes, R.dna_block, random_string(DNA_BLOCK_SIZE, list("0","1","2","3","4","5","6")))
|
O.dna.struc_enzymes = R.set_se(O.dna.struc_enzymes, on=0)//we don't want to keep the race block active
|
||||||
O.domutcheck()
|
O.domutcheck()
|
||||||
|
|
||||||
if(suiciding)
|
if(suiciding)
|
||||||
@@ -208,6 +208,10 @@
|
|||||||
|
|
||||||
if(mind)
|
if(mind)
|
||||||
mind.transfer_to(O)
|
mind.transfer_to(O)
|
||||||
|
if(O.mind.changeling)
|
||||||
|
for(var/obj/effect/proc_holder/changeling/humanform/HF in O.mind.changeling.purchasedpowers)
|
||||||
|
mind.changeling.purchasedpowers -= HF
|
||||||
|
|
||||||
O.a_intent = "help"
|
O.a_intent = "help"
|
||||||
if (tr_flags & TR_DEFAULTMSG)
|
if (tr_flags & TR_DEFAULTMSG)
|
||||||
O << "<B>You are now a human.</B>"
|
O << "<B>You are now a human.</B>"
|
||||||
|
|||||||
12
html/changelogs/phil235-DnaMonkeyStuff.yml
Normal file
12
html/changelogs/phil235-DnaMonkeyStuff.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
author: phil235
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- rscdel: "Lizards and other non human species can no longer acquire the hulk mutation. Hulks no longer have red eyes"
|
||||||
|
- bugfix: "Monkeys now always have dna and a blood type (compatible with humans)."
|
||||||
|
- bugfix: "Monkey transformation no longer deletes the human's clothes."
|
||||||
|
- bugfix: "Space Retrovirus now correctly transfers dna SE to the infected human."
|
||||||
|
- bugfix: "Changeling's Anatomic Panacea removes alien embryo again."
|
||||||
|
- bugfix: "Cloning someone now correctly sets up their dna UE."
|
||||||
|
- bugfix: "Fixes the laser eyes mutation not giving glowing red eyes to the human."
|
||||||
|
- bugfix: "Using changeling readaptation now properly removes all evolutions bought (arm blade, chameleon skin, organic suit)."
|
||||||
Reference in New Issue
Block a user