mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-19 05:26:28 +00:00
DNA modification uses normally distributed random numbers. Radiation strength dictates the standard deviation of the change in the hex character which is 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. All balancing is done via multiplier defines so you can rebalance it easily. DNA blocks and structuring all use 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. 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 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. DNA modifier console has almost all controls on one screen. UIs and UEs can be injected separately (appearance and name, respectively) 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) Every block of SEs are in randomised positions. Disabled automatic logging of world.log, as it produced undesirable behaviour. Mr Muggles and God Emperor of Mankind disks removed. Floor() removed. (it was completely uneccesary, that is what round() is). Fixed spelling mistakes in modularchangling.dm (thanks tenebrosity) Tanning removed from beaches (again) Experimental: monkeys and humans do not have dna until first attempt to read dna (using check_dna_integrity(mob)) This is mainly due to the way everything is hardcoded into New(). Changelog.html updated Signed-off-by: carnie <elly1989@rocketmail.com>
152 lines
5.2 KiB
Plaintext
152 lines
5.2 KiB
Plaintext
//CONTAINS: Suit fibers and Detective's Scanning Computer
|
|
|
|
atom/var/list/suit_fibers
|
|
|
|
atom/proc/add_fibers(mob/living/carbon/human/M)
|
|
if(M.gloves && istype(M.gloves,/obj/item/clothing/))
|
|
var/obj/item/clothing/gloves/G = M.gloves
|
|
if(G.transfer_blood) //bloodied gloves transfer blood to touched objects
|
|
if(add_blood(G.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
|
|
G.transfer_blood--
|
|
else if(M.bloody_hands)
|
|
if(add_blood(M.bloody_hands_mob))
|
|
M.bloody_hands--
|
|
if(!suit_fibers) suit_fibers = list()
|
|
var/fibertext
|
|
var/item_multiplier = istype(src,/obj/item)?1.2:1
|
|
if(M.wear_suit)
|
|
fibertext = "Material from \a [M.wear_suit]."
|
|
if(prob(10*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
if(!(M.wear_suit.body_parts_covered & CHEST))
|
|
if(M.w_uniform)
|
|
fibertext = "Fibers from \a [M.w_uniform]."
|
|
if(prob(12*item_multiplier) && !(fibertext in suit_fibers)) //Wearing a suit means less of the uniform exposed.
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
if(!(M.wear_suit.body_parts_covered & HANDS))
|
|
if(M.gloves)
|
|
fibertext = "Material from a pair of [M.gloves.name]."
|
|
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
else if(M.w_uniform)
|
|
fibertext = "Fibers from \a [M.w_uniform]."
|
|
if(prob(15*item_multiplier) && !(fibertext in suit_fibers))
|
|
// "Added fibertext: [fibertext]"
|
|
suit_fibers += fibertext
|
|
if(M.gloves)
|
|
fibertext = "Material from a pair of [M.gloves.name]."
|
|
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += "Material from a pair of [M.gloves.name]."
|
|
else if(M.gloves)
|
|
fibertext = "Material from a pair of [M.gloves.name]."
|
|
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
|
//world.log << "Added fibertext: [fibertext]"
|
|
suit_fibers += "Material from a pair of [M.gloves.name]."
|
|
|
|
/atom/proc/add_hiddenprint(mob/living/M as mob)
|
|
if(isnull(M)) return
|
|
if(isnull(M.key)) return
|
|
if(!( flags ) & FPRINT)
|
|
return
|
|
if(ishuman(M))
|
|
var/mob/living/carbon/human/H = M
|
|
if(!istype(H.dna, /datum/dna))
|
|
return 0
|
|
if(H.gloves)
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
return 0
|
|
if(!( fingerprints ))
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
return 1
|
|
else
|
|
if(fingerprintslast != M.key)
|
|
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
|
|
fingerprintslast = M.key
|
|
return
|
|
|
|
//Set ignoregloves to add prints irrespective of the mob having gloves on.
|
|
/atom/proc/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
|
|
if(isnull(M)) return
|
|
if(isnull(M.key)) return
|
|
if(!(flags & FPRINT))
|
|
return
|
|
if(ishuman(M))
|
|
//Add the list if it does not exist.
|
|
if(!fingerprintshidden)
|
|
fingerprintshidden = list()
|
|
|
|
//Fibers~
|
|
add_fibers(M)
|
|
|
|
//Now, lets get to the dirty work.
|
|
//First, make sure their DNA makes sense.
|
|
var/mob/living/carbon/human/H = M
|
|
check_dna_integrity(H) //sets up dna and its variables if it was missing somehow
|
|
|
|
//Now, deal with gloves.
|
|
if(!ignoregloves)
|
|
if(H.gloves && H.gloves != src)
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
H.gloves.add_fingerprint(M)
|
|
|
|
//Deal with gloves the pass finger/palm prints.
|
|
if(H.gloves != src)
|
|
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
|
|
return 0
|
|
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
|
|
return 0
|
|
|
|
//More adminstuffz
|
|
if(fingerprintslast != H.key)
|
|
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
|
fingerprintslast = H.key
|
|
|
|
//Make the list if it does not exist.
|
|
if(!fingerprints)
|
|
fingerprints = list()
|
|
|
|
//Hash this shit.
|
|
var/full_print = md5(H.dna.uni_identity)
|
|
|
|
// Add the fingerprints
|
|
fingerprints[full_print] = full_print
|
|
|
|
return 1
|
|
else
|
|
//Smudge up dem prints some
|
|
if(fingerprintslast != M.key)
|
|
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
|
|
fingerprintslast = M.key
|
|
|
|
return
|
|
|
|
|
|
/atom/proc/transfer_fingerprints_to(var/atom/A)
|
|
|
|
// Make sure everything are lists.
|
|
if(!islist(A.fingerprints))
|
|
A.fingerprints = list()
|
|
if(!islist(A.fingerprintshidden))
|
|
A.fingerprintshidden = list()
|
|
|
|
if(!islist(fingerprints))
|
|
fingerprints = list()
|
|
if(!islist(A.fingerprintshidden))
|
|
fingerprintshidden = list()
|
|
|
|
// Transfer
|
|
if(fingerprints)
|
|
A.fingerprints |= fingerprints.Copy() //detective
|
|
if(fingerprintshidden)
|
|
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
|
|
A.fingerprintslast = fingerprintslast |