From 108888879188cb45fd739635bdb77ed8e0c2fb7f Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Thu, 19 Dec 2013 08:15:42 -0800 Subject: [PATCH] DNA2 EPISODE 2: Revenge of the Bugs Made after DNA2 hit /vg/'s main server after no one tested anything. * Gene activation/deactivation made modular, refactors domutcheck. * Standardized genetics disks and injectors a bit in response to buffer corruption issues. (Untested) * Lots of major bug fixes. * Skin tones fixed. Still needs further testing. All I did was mess around with monkeys. Conflicts: code/game/dna/dna2.dm code/game/dna/dna2_domutcheck.dm code/game/dna/dna2_helpers.dm code/game/dna/genes/disabilities.dm code/game/dna/genes/powers.dm code/modules/mob/living/carbon/monkey/monkey.dm --- baystation12.int | 5 +++++ code/game/dna/dna2.dm | 6 +++++- code/game/dna/dna2_domutcheck.dm | 3 --- code/game/dna/dna2_helpers.dm | 5 +---- code/game/dna/genes/disabilities.dm | 10 +++++----- code/game/dna/genes/powers.dm | 2 +- code/modules/mob/living/carbon/monkey/monkey.dm | 2 +- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/baystation12.int b/baystation12.int index b82874fded5..fb3d85be3c3 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,6 +1,11 @@ // BEGIN_INTERNALS /* MAP_ICON_TYPE: 0 +WINDOW: code\__HELPERS\unsorted.dm;code\game\dna\dna2.dm;code\game\dna\dna2_domutcheck.dm;code\game\dna\dna2_helpers.dm;code\game\dna\dna_modifier.dm;code\game\machinery\cloning.dm;code\game\objects\items\weapons\dna_injector.dm;code\game\dna\genes\disabilities.dm;code\game\gamemodes\setupgame.dm;code\setup.dm;code\global.dm +LAST_COMPILE_VERSION: 501.1217 +DIR: code code\game code\game\dna code\game\dna\genes code\game\gamemodes code\game\objects code\game\objects\items code\game\objects\items\weapons +FILE: code\game\objects\items\weapons\dna_injector.dm +LAST_COMPILE_TIME: 1387468589 AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index e8f4ddc4a8b..74d8a661485 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -46,6 +46,9 @@ var/global/list/datum/dna/gene/dna_genes[0] ///////////////// // GENE DEFINES ///////////////// +// Skip checking if it's already active. +// Used for genes that check for value rather than a binary on/off. +#define GENE_ALWAYS_ACTIVATE 1 // Skip checking if it's already active. // Used for genes that check for value rather than a binary on/off. @@ -75,6 +78,7 @@ var/global/list/datum/dna/gene/dna_genes[0] // New stuff var/species = "Human" +/* // Make a copy of this strand. // USE THIS WHEN COPYING STUFF OR YOU'LL GET CORRUPTION! /datum/dna/proc/Clone() @@ -91,7 +95,7 @@ var/global/list/datum/dna/gene/dna_genes[0] new_dna.UpdateUI() new_dna.UpdateSE() return new_dna - +/* /////////////////////////////////////// // UNIQUE IDENTITY /////////////////////////////////////// diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm index a53fc49c292..3327d700f4d 100644 --- a/code/game/dna/dna2_domutcheck.dm +++ b/code/game/dna/dna2_domutcheck.dm @@ -40,9 +40,6 @@ //else // testing("[M] - Failed to activate [gene.name] - [gene_active?"+":"-"]active, [gene_prior_status?"+":"-"]prior") - - // PROC CONTINUES BELOW AFTER COMMENTED CODE. - /* Old, inflexibile /proc/domutcheck(var/mob/living/M, var/connected, var/flags) if (!M) return diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 216832f3cf7..6f180993fb8 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -143,8 +143,7 @@ H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255) H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255) - var/new_s_tone = dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) - H.s_tone = 35 - max(min( round(new_s_tone), 220),1) //Warning MATH. Blame the person that wrote modules/client/preferences.dm, line 994 + H.s_tone = 35 - dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) // Value can be negative. if (dna.GetUIState(DNA_UI_GENDER)) H.gender = FEMALE @@ -171,5 +170,3 @@ // Used below, simple injection modifier. /proc/probinj(var/pr, var/inj) return prob(pr+inj*pr) - -/////////////////////////// DNA MISC-PROCS diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index e312111f6f3..a06a3a0364c 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -32,7 +32,7 @@ M.mutations.Add(mutation) if(disability) M.disabilities|=disability - if(sdisability) + if(mutation) M.sdisabilities|=sdisability if(activation_message) M << "\red [activation_message]" @@ -41,9 +41,9 @@ if(mutation && (mutation in M.mutations)) M.mutations.Remove(mutation) if(disability) - M.disabilities &= ~disability - if(sdisability) - M.sdisabilities &= ~sdisability + M.disabilities-=disability + if(mutation) + M.sdisabilities-=sdisability if(deactivation_message) M << "\red [deactivation_message]" @@ -122,4 +122,4 @@ disability=NEARSIGHTED New() - block=GLASSESBLOCK \ No newline at end of file + block=GLASSESBLOCK diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index a8a9eefee7d..9ac9f06b0d3 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -164,4 +164,4 @@ activation_prob=15 New() - block=TELEBLOCK \ No newline at end of file + block=TELEBLOCK diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 42fbb8fa02e..a37f16ff1a3 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -14,7 +14,7 @@ //var/uni_append = "12C4E2" // Small appearance modifier for different species. var/list/uni_append = list(0x12C,0x4E2) // Same as above for DNA2. var/update_muts = 1 // Monkey gene must be set at start. - var/alien = 0 //Used for reagent metabolism. + var/alien = 0 //Used for reagent metabolism. /mob/living/carbon/monkey/tajara name = "farwa"