From 5ce97a7d2597ea4c2a342e7a265d5c90180b78ca Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Fri, 7 Feb 2014 00:29:24 -0800 Subject: [PATCH] More DNA fixes. --- code/game/dna/dna2_domutcheck.dm | 314 ------------------------ code/modules/admin/admin.dm | 10 +- code/modules/admin/verbs/debug.dm | 2 +- code/modules/events/disease_outbreak.dm | 4 +- 4 files changed, 10 insertions(+), 320 deletions(-) diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm index 88adaf3305e..954c86f2a6a 100644 --- a/code/game/dna/dna2_domutcheck.dm +++ b/code/game/dna/dna2_domutcheck.dm @@ -41,317 +41,3 @@ if(M) M.active_genes -= gene.type M.update_icon = 1 - -/* Old, inflexibile -/proc/domutcheck(var/mob/living/M, var/connected, var/flags) - if (!M) return - - M.dna.check_integrity() - - M.disabilities = 0 - M.sdisabilities = 0 - var/old_mutations = M.mutations - M.mutations = list() - M.pass_flags = 0 -// M.see_in_dark = 2 -// M.see_invisible = 0 - - if(PLANT in old_mutations) - M.mutations.Add(PLANT) - if(SKELETON in old_mutations) - M.mutations.Add(SKELETON) - if(M_FAT in old_mutations) - M.mutations.Add(M_FAT) - if(M_HUSK in old_mutations) - M.mutations.Add(M_HUSK) - - var/inj = (flags & MUTCHK_FROM_INJECTOR) == MUTCHK_FROM_INJECTOR - var/forced = (flags & MUTCHK_FORCED) == MUTCHK_FORCED - - if(M.dna.GetSEState(NOBREATHBLOCK)) - if(forced || probinj(45,inj) || (M_NO_BREATH in old_mutations)) - M << "\blue You feel no need to breathe." - M.mutations.Add(M_NO_BREATH) - if(M.dna.GetSEState(REMOTEVIEWBLOCK)) - if(forced || probinj(45,inj) || (M_REMOTE_VIEW in old_mutations)) - M << "\blue Your mind expands" - M.mutations.Add(M_REMOTE_VIEW) - M.verbs += /mob/living/carbon/human/proc/remoteobserve - if(M.dna.GetSEState(REGENERATEBLOCK)) - if(forced || probinj(45,inj) || (M_REGEN in old_mutations)) - M << "\blue You feel better" - M.mutations.Add(M_REGEN) - if(M.dna.GetSEState(INCREASERUNBLOCK)) - if(forced || probinj(45,inj) || (M_RUN in old_mutations)) - M << "\blue Your leg muscles pulsate." - M.mutations.Add(M_RUN) - if(M.dna.GetSEState(REMOTETALKBLOCK)) - if(forced || probinj(45,inj) || (M_REMOTE_TALK in old_mutations)) - M << "\blue You expand your mind outwards" - M.mutations.Add(M_REMOTE_TALK) - M.verbs += /mob/living/carbon/human/proc/remotesay - if(M.dna.GetSEState(MORPHBLOCK)) - if(forced || probinj(45,inj) || (M_MORPH in old_mutations)) - M.mutations.Add(M_MORPH) - M << "\blue Your skin feels strange" - M.verbs += /mob/living/carbon/human/proc/morph - if(M.dna.GetSEState(COLDBLOCK)) - if(!(M_RESIST_COLD in old_mutations)) - if(forced || probinj(15,inj) || (M_RESIST_HEAT in old_mutations)) - M.mutations.Add(M_RESIST_HEAT) - M << "\blue Your skin is icy to the touch" - else - if(forced || probinj(5,inj) || (M_RESIST_HEAT in old_mutations)) - M.mutations.Add(M_RESIST_HEAT) - M << "\blue Your skin is icy to the touch" - if(M.dna.GetSEState(HALLUCINATIONBLOCK)) - if(forced || probinj(45,inj) || (M_HALLUCINATE in old_mutations)) - M.mutations.Add(M_HALLUCINATE) - M << "\red Your mind says 'Hello'" - if(M.dna.GetSEState(NOPRINTSBLOCK)) - if(forced || probinj(45,inj) || (M_FINGERPRINTS in old_mutations)) - M.mutations.Add(M_FINGERPRINTS) - M << "\blue Your fingers feel numb" - if(M.dna.GetSEState(SHOCKIMMUNITYBLOCK)) - if(forced || probinj(45,inj) || (M_NO_SHOCK in old_mutations)) - M.mutations.Add(M_NO_SHOCK) - M << "\blue Your skin feels strange" - if(M.dna.GetSEState(SMALLSIZEBLOCK)) - if(forced || probinj(45,inj) || (M_DWARF in old_mutations)) - M << "\blue Your skin feels rubbery" - M.mutations.Add(M_DWARF) - M.pass_flags |= 1 - - - - if (M.dna.GetSEState(HULKBLOCK)) - if(forced || probinj(5,inj) || (M_HULK in old_mutations)) - M << "\blue Your muscles hurt." - M.mutations.Add(M_HULK) - if (M.dna.GetSEState(HEADACHEBLOCK)) - M.disabilities |= EPILEPSY - M << "\red You get a headache." - if (M.dna.GetSEState(FAKEBLOCK)) - M << "\red You feel strange." - if (prob(95)) - if(prob(50)) - randmutb(M) - else - randmuti(M) - else - randmutg(M) - if (M.dna.GetSEState(COUGHBLOCK)) - M.disabilities |= COUGHING - M << "\red You start coughing." - if (M.dna.GetSEState(CLUMSYBLOCK)) - M << "\red You feel lightheaded." - M.mutations.Add(M_CLUMSY) - if (M.dna.GetSEState(TWITCHBLOCK)) - M.disabilities |= TOURETTES - M << "\red You twitch." - if (M.dna.GetSEState(XRAYBLOCK)) - if(forced || probinj(30,inj) || (M_XRAY in old_mutations)) - M << "\blue The walls suddenly disappear." -// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) -// M.see_in_dark = 8 -// M.see_invisible = 2 - M.mutations.Add(M_XRAY) - if (M.dna.GetSEState(NERVOUSBLOCK)) - M.disabilities |= NERVOUS - M << "\red You feel nervous." - if (M.dna.GetSEState(FIREBLOCK)) - if(!(M_RESIST_HEAT in old_mutations)) - if(forced || probinj(30,inj) || (M_RESIST_COLD in old_mutations)) - M << "\blue Your body feels warm." - M.mutations.Add(M_RESIST_COLD) - else - if(forced || probinj(5,inj) || (M_RESIST_COLD in old_mutations)) - M << "\blue Your body feels warm." - M.mutations.Add(M_RESIST_COLD) - if (M.dna.GetSEState(BLINDBLOCK)) - M.sdisabilities |= BLIND - M << "\red You can't seem to see anything." - if (M.dna.GetSEState(TELEBLOCK)) - if(forced || probinj(15,inj) || (M_TK in old_mutations)) - M << "\blue You feel smarter." - M.mutations.Add(M_TK) - if (M.dna.GetSEState(DEAFBLOCK)) - M.sdisabilities |= DEAF - M.ear_deaf = 1 - M << "\red Its kinda quiet.." - if (M.dna.GetSEState(GLASSESBLOCK)) - M.disabilities |= NEARSIGHTED - M << "Your eyes feel weird..." - - /* If you want the new mutations to work, UNCOMMENT THIS. - if(istype(M, /mob/living/carbon)) - for (var/datum/mutations/mut in global_mutations) - mut.check_mutation(M) - */ - -//////////////////////////////////////////////////////////// Monkey Block - if (M.dna.GetSEState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human)) - // human > monkey - var/mob/living/carbon/human/H = M - H.monkeyizing = 1 - var/list/implants = list() //Try to preserve implants. - for(var/obj/item/weapon/implant/W in H) - implants += W - W.loc = null - - if(!connected) - for(var/obj/item/W in (H.contents-implants)) - if (W==H.w_uniform) // will be teared - continue - H.drop_from_inventory(W) - M.monkeyizing = 1 - M.canmove = 0 - M.icon = null - M.invisibility = 101 - var/atom/movable/overlay/animation = new( M.loc ) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - flick("h2monkey", animation) - sleep(48) - del(animation) - - - var/mob/living/carbon/monkey/O = null - if(H.species.primitive) - O = new H.species.primitive(src) - else - H.gib() //Trying to change the species of a creature with no primitive var set is messy. - return - - if(M) - if (M.dna) - O.dna = M.dna.Clone() - M.dna = null - - if (M.suiciding) - O.suiciding = M.suiciding - M.suiciding = null - - - for(var/datum/disease/D in M.viruses) - O.viruses += D - D.affected_mob = O - M.viruses -= D - - - for(var/obj/T in (M.contents-implants)) - del(T) - - O.loc = M.loc - - if(M.mind) - M.mind.transfer_to(O) //transfer our mind to the cute little monkey - - if (connected) //inside dna thing - var/obj/machinery/dna_scannernew/C = connected - O.loc = C - C.occupant = O - connected = null - O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6)) - O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss()) - O.adjustToxLoss(M.getToxLoss() + 20) - O.adjustOxyLoss(M.getOxyLoss()) - O.stat = M.stat - O.a_intent = "hurt" - for (var/obj/item/weapon/implant/I in implants) - I.loc = O - I.implanted = O -// O.update_icon = 1 //queue a full icon update at next life() call - del(M) - return - - if (!M.dna.GetSEState(MONKEYBLOCK) && !istype(M, /mob/living/carbon/human)) - // monkey > human, - var/mob/living/carbon/monkey/Mo = M - Mo.monkeyizing = 1 - var/list/implants = list() //Still preserving implants - for(var/obj/item/weapon/implant/W in Mo) - implants += W - W.loc = null - if(!connected) - for(var/obj/item/W in (Mo.contents-implants)) - Mo.drop_from_inventory(W) - M.monkeyizing = 1 - M.canmove = 0 - M.icon = null - M.invisibility = 101 - var/atom/movable/overlay/animation = new( M.loc ) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - flick("monkey2h", animation) - sleep(48) - del(animation) - - var/mob/living/carbon/human/O = new( src ) - if(Mo.greaterform) - O.set_species(Mo.greaterform) - - if (M.dna.GetUIState(DNA_UI_GENDER)) - O.gender = FEMALE - else - O.gender = MALE - - if (M) - if (M.dna) - O.dna = M.dna.Clone() - M.dna = null - - if (M.suiciding) - O.suiciding = M.suiciding - M.suiciding = null - - for(var/datum/disease/D in M.viruses) - O.viruses += D - D.affected_mob = O - M.viruses -= D - - //for(var/obj/T in M) - // del(T) - - O.loc = M.loc - - if(M.mind) - M.mind.transfer_to(O) //transfer our mind to the human - - if (connected) //inside dna thing - var/obj/machinery/dna_scannernew/C = connected - O.loc = C - C.occupant = O - connected = null - - var/i - while (!i) - var/randomname - if (O.gender == MALE) - randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names))) - else - randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names))) - if (findname(randomname)) - continue - else - O.real_name = randomname - i++ - O.UpdateAppearance() - O.take_overall_damage(M.getBruteLoss(), M.getFireLoss()) - O.adjustToxLoss(M.getToxLoss()) - O.adjustOxyLoss(M.getOxyLoss()) - O.stat = M.stat - for (var/obj/item/weapon/implant/I in implants) - I.loc = O - I.implanted = O -// O.update_icon = 1 //queue a full icon update at next life() call - del(M) - return -//////////////////////////////////////////////////////////// Monkey Block - if(M) - M.update_icon = 1 //queue a full icon update at next life() call - return null -/////////////////////////// DNA MISC-PROCS -*/ \ No newline at end of file diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 40435be11ff..a076bed08a7 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -120,12 +120,12 @@ var/global/floorIsLava = 0 else body += "Animalize | " - // MUTATIONS + // DNA2 - Admin Hax if(iscarbon(M)) body += "

" body += "DNA Blocks:
" var/bname - for(var/block=1;block
 12345