This commit is contained in:
Fox McCloud
2018-07-17 18:18:16 -04:00
parent f075ef7836
commit 0a613a8f42
17 changed files with 32 additions and 30 deletions
+1 -1
View File
@@ -420,7 +420,7 @@ var/global/list/bad_blocks[0]
data["UE"] = unique_enzymes
data["SE"] = SE.Copy() // This is probably too lazy for my own good
data["UI"] = UI.Copy()
data["species"] = species.type // This works because `species` is a string, not a datum
data["species"] = species.type
// Because old DNA coders were insane or something
data["b_type"] = b_type
data["real_name"] = real_name
+6 -4
View File
@@ -7,8 +7,8 @@
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
return ishuman(M)
/datum/dna/gene/monkey/activate(var/mob/living/carbon/human/H, var/connected, var/flags)
if(!istype(H,/mob/living/carbon/human))
/datum/dna/gene/monkey/activate(mob/living/carbon/human/H, connected, flags)
if(!istype(H))
return
if(issmall(H))
return
@@ -41,13 +41,14 @@
if(H.client)
H.hud_used = new /datum/hud/monkey(H, ui_style2icon(H.client.prefs.UI_style), H.client.prefs.UI_style_color, H.client.prefs.UI_style_alpha)
H.hud_used.show_hud(H.hud_used.hud_version)
to_chat(H, "<B>You are now a [H.dna.species.name].</B>")
return H
/datum/dna/gene/monkey/deactivate(var/mob/living/carbon/human/H, var/connected, var/flags)
if(!istype(H,/mob/living/carbon/human))
/datum/dna/gene/monkey/deactivate(mob/living/carbon/human/H, connected, flags)
if(!istype(H))
return
for(var/obj/item/W in H)
if(W == H.w_uniform) // will be torn
@@ -81,6 +82,7 @@
if(H.client)
H.hud_used = new /datum/hud/human(H, ui_style2icon(H.client.prefs.UI_style), H.client.prefs.UI_style_color, H.client.prefs.UI_style_alpha)
H.hud_used.show_hud(H.hud_used.hud_version)
to_chat(H, "<B>You are now a [H.dna.species.name].</B>")
@@ -375,7 +375,7 @@ var/list/sting_paths
path.on_purchase(src)
var/mob/living/carbon/C = src //only carbons have dna now, so we have to typecaste
mind.changeling.absorbed_dna |= C.dna
mind.changeling.absorbed_dna |= C.dna.Clone()
mind.changeling.trim_dna()
return 1
@@ -26,10 +26,10 @@
to_chat(user, "<span class='notice'>We transform our appearance.</span>")
user.dna.SetSEState(MONKEYBLOCK,0,1)
genemutcheck(user,MONKEYBLOCK,null,MUTCHK_FORCED)
if(istype(user))
user.set_species(chosen_dna.species.type)
user.dna = chosen_dna.Clone()
user.real_name = chosen_dna.real_name
if(istype(user))
user.set_species(chosen_dna.species)
domutcheck(user,null,MUTCHK_FORCED)
user.flavor_text = ""
user.dna.UpdateSE()
@@ -21,13 +21,9 @@
to_chat(H, "<span class='warning'>We cannot perform this ability in this form!</span>")
return
user.dna = user.dna.Clone()
H.visible_message("<span class='warning'>[H] transforms!</span>")
changeling.geneticdamage = 30
to_chat(H, "<span class='warning'>Our genes cry out!</span>")
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/implant/W in H)
implants += W
H.monkeyize()
changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/humanform(null)
feedback_add_details("changeling_powers","LF")
@@ -111,11 +111,11 @@
target.visible_message("<span class='danger'>[target] begins to violenty convulse!</span>","<span class='userdanger'>You feel a tiny prick and a begin to uncontrollably convulse!</span>")
spawn(10)
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.set_species(NewDNA.species.type)
target.dna = NewDNA.Clone()
target.real_name = NewDNA.real_name
var/mob/living/carbon/human/H = target
if(istype(H))
H.set_species(NewDNA.species)
target.UpdateAppearance()
domutcheck(target, null)
feedback_add_details("changeling_powers","TS")
@@ -14,10 +14,10 @@
if(!chosen_dna)
return
if(ishuman(user))
user.set_species(chosen_dna.species.type)
user.dna = chosen_dna.Clone()
user.real_name = chosen_dna.real_name
if(ishuman(user))
user.set_species(chosen_dna.species)
domutcheck(user, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
user.flavor_text = ""
user.dna.UpdateSE()
@@ -217,8 +217,8 @@
var/mob/living/carbon/human/interactive/greytide/clone = new(src)
var/datum/dna/owner_dna = H.dna
clone.rename_character(clone.name, owner_dna.real_name)
clone.set_species(H.dna.species.type)
clone.dna = owner_dna.Clone()
clone.set_species(H.dna.species)
clone.body_accessory = H.body_accessory
domutcheck(clone)
+1 -1
View File
@@ -321,7 +321,7 @@ var/global/list/multiverse = list()
to_chat(M, "<B>You are an alternate version of [user.real_name] from another universe! Help [user.p_them()] accomplish [user.p_their()] goals at all costs.</B>")
M.faction = list("[user.real_name]")
if(duplicate_self)
M.set_species(user.dna.species) //duplicate the sword user's species.
M.set_species(user.dna.species.type) //duplicate the sword user's species.
else
if(prob(50))
var/list/list_all_species = list(/datum/species/human, /datum/species/unathi, /datum/species/skrell, /datum/species/tajaran, /datum/species/kidan, /datum/species/golem, /datum/species/diona, /datum/species/machine, /datum/species/slime, /datum/species/grey, /datum/species/vulpkanin)
+1 -1
View File
@@ -231,7 +231,7 @@
R.dna = new /datum/dna()
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
H.set_species(R.dna.species)
H.set_species(R.dna.species.type)
occupant = H
if(!R.dna.real_name) //to prevent null names
+2 -2
View File
@@ -300,7 +300,7 @@
/obj/machinery/transformer/transmogrifier/do_transform(mob/living/carbon/human/H)
if(!istype(H))
return
if(!istype(target_species))
if(!ispath(target_species))
to_chat(H, "<span class='warning'>'[target_species]' is not a valid species!</span>")
return
H.set_species(target_species)
@@ -336,7 +336,7 @@
to_chat(H, "<span class='warning'>No genetic template configured!</span>")
return
var/prev_ue = H.dna.unique_enzymes
H.set_species(template.species)
H.set_species(template.species.type)
H.dna = template.Clone()
H.real_name = template.real_name
H.sync_organ_dna(assimilate = 0, old_ue = prev_ue)
+1 -1
View File
@@ -1252,7 +1252,7 @@
icon_state = "monkeycube"
bitesize = 12
filling_color = "#ADAC7F"
var/monkey_type = "Monkey"
var/datum/species/monkey_type = /datum/species/monkey
list_reagents = list("nutriment" = 2)
/obj/item/reagent_containers/food/snacks/monkeycube/water_act(volume, temperature)
@@ -4,7 +4,7 @@
AC.ui_interact(user, state = state)
/mob/living/carbon/human/proc/change_species(datum/species/new_species)
if(!new_species || dna.species.type == new_species || !(initial(new_species.name) in all_species))
if(!new_species || dna.species.type == new_species || !ispath(new_species, /datum/species))
return FALSE
set_species(new_species, null, TRUE)
@@ -16,7 +16,7 @@
dna = new /datum/dna(null)
// Species name is handled by set_species()
set_species(new_species, 1, delay_icon_update = 1)
set_species(new_species, 1, delay_icon_update = 1, skip_same_check = TRUE)
..()
@@ -1274,7 +1274,10 @@
else
to_chat(usr, "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>")
/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE)
/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE, skip_same_check = FALSE)
if(!skip_same_check)
if(dna.species.name == initial(new_species.name))
return
var/datum/species/oldspecies = dna.species
if(oldspecies)
@@ -1934,7 +1937,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
dna.deserialize(data["dna"])
real_name = dna.real_name
name = real_name
set_species(dna.species)
set_species(dna.species.type, skip_same_check = TRUE)
age = data["age"]
undershirt = data["ushirt"]
underwear = data["uwear"]
@@ -208,8 +208,8 @@
var/datum/dna/toDoppel = chosen.dna
T.real_name = toDoppel.real_name
T.set_species(chosen.dna.species.type)
T.dna = toDoppel.Clone()
T.set_species(chosen.dna.species)
T.body_accessory = chosen.body_accessory
T.UpdateAppearance()
domutcheck(T)
@@ -31,7 +31,8 @@
if(href_list["race"])
if(can_change(APPEARANCE_RACE) && (href_list["race"] in valid_species))
if(owner.change_species(href_list["race"]))
var/datum/species/S = all_species[href_list["race"]]
if(owner.change_species(S.type))
cut_and_generate_data()
// Species change creates new organs - runtimes ahoy if we forget this
head_organ = owner.get_organ("head")
+1 -1
View File
@@ -36,8 +36,8 @@ proc/build_virtual_avatar(mob/living/carbon/human/H, location, datum/map_templat
vr_avatar.real_me = V.real_me
else
vr_avatar.real_me = H
vr_avatar.set_species(H.dna.species.type)
vr_avatar.dna = H.dna.Clone()
vr_avatar.set_species(H.dna.species)
vr_avatar.name = H.name
vr_avatar.real_name = H.real_name
vr_avatar.undershirt = H.undershirt