tgstation/-tg-station — pull request #438 by Carn (2013-04-21 22:14:01+00:00)
Title: DNA rework

Initial Commit. Map needs fixing (removal of missing objects). Injectors are broken (awaiting Pete's changes). This is not ready for a pull.

Reduces code size by ~1000 lines. Resolves 283

DNA modification uses normally distributed random numbers. Radiation strength dictates the standard deviation of the change in the hex character hit (higher output means greater chance for a large change) . Similarly, radiation duration dictates how likely we are to hit the hex-character we clicked on (longer duration means more likely to hit). Irradiation is strength*duration*multiplier

All balancing is done via multiplier defines so you can rebalance it easily.

DNA blocks/structuring all uses defines. Making modification/expansion easier. I'll likely expand this into a datum-based system to allow more interesting features, reduce code further and allow admins to interact with the way dna strings behave.

DNA strings can be spliced together using merge_text().
e.g. string 1: "Hello World"
string 2: "Seeya______"
result: "Seeya World"
This isn't used except for admin-spawnable SE injectors at the moment. If anybody is interested in coding some sort of lab for isolating genes let me know.

r_hair, g_hair, b_hair, r_facial, g_facial, b_facial, r_eyes, g_eyes, b_eyes were removed and made into 3 short hex-colors.

Skin tones now support colours other than shades of brown. I've had to restrict it heavily until other stuff is done. Skin tones include Albino Caucasian, Oriental, Mediterranean, etc.

Data disks and DNA injectors were reworked (WIP) to use associative lists so transferring data is just a matter of doing list.Copy()

var/dna is now defined at /mob/living/carbon level. Only monkeys and humans may have dna currently. Support is there for all carbon-based lifeforms to have dna (with changelings and xenos possibly having larger dna-strings).

DNA modifier console has almost all controls on one screen.

dna helper procs like ready_dna() and such were changed to make them more versatile. There is now a hardset_dna() proc as an alternative to ready_dna which can initialize dna with properties passed into it or update an existing dna string (useful for cloning and antag spawning)