Merge pull request #1902 from AterIgnis/dna_update

updated DNA code to have more mutations
This commit is contained in:
Mloc
2012-11-10 08:56:30 -08:00
10 changed files with 399 additions and 91 deletions

View File

@@ -335,6 +335,7 @@ its easier to just keep the beam vertical.
/atom/proc/add_fingerprint(mob/living/M as mob)
if(isnull(M)) return
if(isAI(M)) return
if(isnull(M.key)) return
if (!( src.flags ) & FPRINT)
return
@@ -344,6 +345,12 @@ its easier to just keep the beam vertical.
fingerprintshidden = list()
//Fibers~
add_fibers(M)
//He has no prints!
if (mFingerprints in M.mutations)
if(fingerprintslast != M.key)
fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
fingerprintslast = M.key
return 0
//Now, lets get to the dirty work.
//First, make sure their DNA makes sense.
var/mob/living/carbon/human/H = M

View File

@@ -56,9 +56,9 @@
temp += add_zero2(num2hex((hair),1), 3)
uni_identity = temp
if(length(struc_enzymes)!= 42)
if(length(struc_enzymes)!= 3*STRUCDNASIZE)
var/mutstring = ""
for(var/i = 1, i <= 13, i++)
for(var/i = 1, i <= STRUCDNASIZE, i++)
mutstring += add_zero2(num2hex(rand(1,1024)),3)
struc_enzymes = mutstring
@@ -66,7 +66,7 @@
unique_enzymes = md5(character.real_name)
else
if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
if(length(struc_enzymes)!= 42) struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4000"
if(length(struc_enzymes)!= 3*STRUCDNASIZE) struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
/datum/dna/proc/ready_dna(mob/living/carbon/human/character)
var/temp
@@ -268,12 +268,12 @@
else
return 0
if (bnumber == HULKBLOCK || bnumber == TELEBLOCK)
if (bnumber == HULKBLOCK || bnumber == TELEBLOCK || bnumber == NOBREATHBLOCK || bnumber == NOPRINTSBLOCK || bnumber == SMALLSIZEBLOCK || bnumber == SHOCKIMMUNITYBLOCK)
if (temp2 >= 3500 + BLOCKADD)
return 1
else
return 0
if (bnumber == XRAYBLOCK || bnumber == FIREBLOCK)
if (bnumber == XRAYBLOCK || bnumber == FIREBLOCK || bnumber == REMOTEVIEWBLOCK || bnumber == REGENERATEBLOCK || bnumber == INCREASERUNBLOCK || bnumber == REMOTETALKBLOCK || bnumber == MORPHBLOCK)
if (temp2 >= 3050 + BLOCKADD)
return 1
else
@@ -285,11 +285,14 @@
else
return 0
/proc/ismuton(var/block,var/mob/M)
return isblockon(getblock(M.dna.struc_enzymes, block,3),block)
/proc/randmutb(mob/M as mob)
if(!M) return
var/num
var/newdna
num = pick(1,3,FAKEBLOCK,5,CLUMSYBLOCK,7,9,BLINDBLOCK,DEAFBLOCK)
num = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK)
M.dna.check_integrity()
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
M.dna.struc_enzymes = newdna
@@ -299,7 +302,7 @@
if(!M) return
var/num
var/newdna
num = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK)
num = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK)
M.dna.check_integrity()
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
M.dna.struc_enzymes = newdna
@@ -309,13 +312,13 @@
if(!M) return
M.dna.check_integrity()
if(type)
for(var/i = 1, i <= 13, i++)
for(var/i = 1, i <= STRUCDNASIZE-1, i++)
if(prob(p))
M.dna.uni_identity = setblock(M.dna.uni_identity, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
updateappearance(M, M.dna.uni_identity)
else
for(var/i = 1, i <= 13, i++)
for(var/i = 1, i <= STRUCDNASIZE-1, i++)
if(prob(p))
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
domutcheck(M, null)
@@ -325,7 +328,7 @@
if(!M) return
var/num
var/newdna
num = pick(1,2,3,4,5,6,7,8,9,10,11,12,13)
num = rand(1,STRUCDNASIZE-1)
M.dna.check_integrity()
newdna = setblock(M.dna.uni_identity,num,add_zero2(num2hex(rand(1,4095),1),3),3)
M.dna.uni_identity = newdna
@@ -383,32 +386,77 @@
else
return 0
/proc/probinj(var/pr, var/inj)
return prob(pr+inj*pr)
/proc/domutcheck(mob/living/M as mob, connected, inj)
//telekinesis = 1
//firemut = 2
//xray = 4
//hulk = 8
//clumsy = 16
if (!M) return
M.dna.check_integrity()
M.disabilities = 0
M.sdisabilities = 0
var/old_mutations = M.mutations
M.mutations = list()
M.see_in_dark = 2
M.see_invisible = SEE_INVISIBLE_LIVING
M.see_invisible = 0
if (isblockon(getblock(M.dna.struc_enzymes, 1,3),1))
M.disabilities |= NEARSIGHTED
M << "\red Your eyes feel strange."
if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),2))
if(inj || prob(10))
if(ismuton(NOBREATHBLOCK,M))
if(probinj(45,inj) || (mNobreath in old_mutations))
M << "\blue You feel no need to breathe."
M.mutations.Add(mNobreath)
if(ismuton(REMOTEVIEWBLOCK,M))
if(probinj(45,inj) || (mRemote in old_mutations))
M << "\blue Your mind expands"
M.mutations.Add(mRemote)
if(ismuton(REGENERATEBLOCK,M))
if(probinj(45,inj) || (mRegen in old_mutations))
M << "\blue You feel strange"
M.mutations.Add(mRegen)
if(ismuton(INCREASERUNBLOCK,M))
if(probinj(45,inj) || (mRun in old_mutations))
M << "\blue You feel quick"
M.mutations.Add(mRun)
if(ismuton(REMOTETALKBLOCK,M))
if(probinj(45,inj) || (mRemotetalk in old_mutations))
M << "\blue You expand your mind outwards"
M.mutations.Add(mRemotetalk)
if(ismuton(MORPHBLOCK,M))
if(probinj(45,inj) || (mMorph in old_mutations))
M.mutations.Add(mMorph)
M << "\blue Your skin feels strange"
if(ismuton(BLENDBLOCK,M))
if(probinj(45,inj) || (mBlend in old_mutations))
M.mutations.Add(mBlend)
M << "\blue You feel alone"
if(ismuton(HALLUCINATIONBLOCK,M))
if(probinj(45,inj) || (mHallucination in old_mutations))
M.mutations.Add(mHallucination)
M << "\blue Your mind says 'Hello'"
if(ismuton(NOPRINTSBLOCK,M))
if(probinj(45,inj) || (mFingerprints in old_mutations))
M.mutations.Add(mFingerprints)
M << "\blue Your fingers feel numb"
if(ismuton(SHOCKIMMUNITYBLOCK,M))
if(probinj(45,inj) || (mShock in old_mutations))
M.mutations.Add(mShock)
M << "\blue You feel strange"
if(ismuton(SMALLSIZEBLOCK,M))
if(probinj(45,inj) || (mSmallsize in old_mutations))
M << "\blue Your skin feels rubbery"
M.mutations.Add(mSmallsize)
if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),HULKBLOCK))
if(probinj(5,inj) || (HULK in old_mutations))
M << "\blue Your muscles hurt."
M.mutations.Add(HULK)
if (isblockon(getblock(M.dna.struc_enzymes, 3,3),3))
M.disabilities |= EPILEPSY
if (isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK))
M.disabilities |= 2
M << "\red You get a headache."
if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),4))
if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),FAKEBLOCK))
M << "\red You feel strange."
if (prob(95))
if(prob(50))
@@ -417,40 +465,43 @@
randmuti(M)
else
randmutg(M)
if (isblockon(getblock(M.dna.struc_enzymes, 5,3),5))
M.disabilities |= COUGHING
if (isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK))
M.disabilities |= 4
M << "\red You start coughing."
if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),6))
if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK))
M << "\red You feel lightheaded."
M.mutations.Add(CLUMSY)
if (isblockon(getblock(M.dna.struc_enzymes, 7,3),7))
M.disabilities |= TOURETTES
if (isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK))
M.disabilities |= 8
M << "\red You twitch."
if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),8))
if(inj || prob(30))
if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),XRAYBLOCK))
if(probinj(30,inj) || (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 = SEE_INVISIBLE_LEVEL_TWO
M.see_invisible = 2
M.mutations.Add(XRAY)
if (isblockon(getblock(M.dna.struc_enzymes, 9,3),9))
M.disabilities |= NERVOUS
if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK))
M.disabilities |= 16
M << "\red You feel nervous."
if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),10))
if(inj || prob(30))
if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),FIREBLOCK))
if(probinj(30,inj) || (COLD_RESISTANCE in old_mutations))
M << "\blue Your body feels warm."
M.mutations.Add(COLD_RESISTANCE)
if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),11))
M.sdisabilities |= BLIND
if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK))
M.disabilities |= 128
M << "\red You can't seem to see anything."
if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),12))
if(inj || prob(25))
if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),TELEBLOCK))
if(probinj(15,inj) || (TK in old_mutations))
M << "\blue You feel smarter."
M.mutations.Add(TK)
if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),13))
M.sdisabilities |= DEAF
if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK))
M.disabilities |= 32
M.ear_deaf = 1
M << "\red You can't seem to hear anything..."
M << "\red Its kinda quiet.."
if (isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK))
M.disabilities |= 1
M << "Your eyes feel weird..."
/* If you want the new mutations to work, UNCOMMENT THIS.
if(istype(M, /mob/living/carbon))
@@ -459,7 +510,7 @@
*/
//////////////////////////////////////////////////////////// Monkey Block
if (isblockon(getblock(M.dna.struc_enzymes, 14,3),14) && istype(M, /mob/living/carbon/human))
if (isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
// human > monkey
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
@@ -529,7 +580,7 @@
del(M)
return
if (!isblockon(getblock(M.dna.struc_enzymes, 14,3),14) && !istype(M, /mob/living/carbon/human))
if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
// monkey > human,
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
@@ -897,6 +948,21 @@
onclose(user, "scannernew")
return
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/buffer)
var/list/arr = list()
for(var/i = 1, i <= length(buffer)/3, i++)
arr += "[i]:[copytext(buffer,i*3-2,i*3+1)]"
return arr
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/buffer)
var/pos = findtext(blk,":")
if(!pos) return 0
var/id = text2num(copytext(blk,1,pos))
if(!id) return 0
I.block = id
I.dna = copytext(buffer,id*3-2,id*3+1)
return 1
/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
if(..())
return
@@ -1135,7 +1201,7 @@
src.temphtml += text("<A href='?src=\ref[];strucpulse=1'>Irradiate</A><BR>", src)
src.delete = 0
if (href_list["strucmenuplus"])
if (src.strucblock < 14)
if (src.strucblock < STRUCDNASIZE)
src.strucblock++
else
src.strucblock = 1
@@ -1144,7 +1210,7 @@
if (src.strucblock > 1)
src.strucblock--
else
src.strucblock = 14
src.strucblock = STRUCDNASIZE
dopage(src,"strucmenu")
if (href_list["strucmenusubplus"])
if (src.subblock < 3)
@@ -1161,7 +1227,7 @@
if (href_list["semenuset"] && href_list["semenusubset"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
var/menuset = text2num(href_list["semenuset"])
var/menusubset = text2num(href_list["semenusubset"])
if ((menuset <= 14) && (menuset >= 1))
if ((menuset <= STRUCDNASIZE) && (menuset >= 1))
src.strucblock = menuset
if ((menusubset <= 3) && (menusubset >= 1))
src.subblock = menusubset
@@ -1191,9 +1257,9 @@
oldblock = src.strucblock
block = miniscramble(block, src.radstrength, src.radduration)
newblock = null
if (src.strucblock > 1 && src.strucblock < 5)
if (src.strucblock > 1 && src.strucblock < STRUCDNASIZE/2)
src.strucblock++
else if (src.strucblock > 5 && src.strucblock < 14)
else if (src.strucblock > STRUCDNASIZE/2 && src.strucblock < STRUCDNASIZE)
src.strucblock--
if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
@@ -1236,7 +1302,7 @@
src.temphtml += text("By: <font color='blue'>[]</FONT><BR>", src.buffer1owner)
src.temphtml += text("Label: <font color='blue'>[]</FONT><BR>", src.buffer1label)
if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : <A href='?src=\ref[];b1addui=1'>UI</A> - <A href='?src=\ref[];b1adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b1addse=1'>SE</A><BR>", src, src, src)
if (src.buffer1) src.temphtml += text("Transfer to: <A href='?src=\ref[];b1transfer=1'>Occupant</A> - <A href='?src=\ref[];b1injector=1'>Injector</A><BR>", src, src)
if (src.buffer1) src.temphtml += text("Transfer to: <A href='?src=\ref[];b1transfer=1'>Occupant</A> - <A href='?src=\ref[];b1injector=1'>Full Injector</A> - <A href='?src=\ref[];b1injector=2'>Iso Injector</A><BR>", src, src, src)
//if (src.buffer1) src.temphtml += text("<A href='?src=\ref[];b1iso=1'>Isolate Block</A><BR>", src)
if (src.buffer1) src.temphtml += "Disk: <A href='?src=\ref[src];save_disk=1'>Save To</a> | <A href='?src=\ref[src];load_disk=1'>Load From</a><br>"
if (src.buffer1) src.temphtml += text("<A href='?src=\ref[];b1label=1'>Edit Label</A><BR>", src)
@@ -1250,7 +1316,7 @@
src.temphtml += text("By: <font color='blue'>[]</FONT><BR>", src.buffer2owner)
src.temphtml += text("Label: <font color='blue'>[]</FONT><BR>", src.buffer2label)
if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : <A href='?src=\ref[];b2addui=1'>UI</A> - <A href='?src=\ref[];b2adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b2addse=1'>SE</A><BR>", src, src, src)
if (src.buffer2) src.temphtml += text("Transfer to: <A href='?src=\ref[];b2transfer=1'>Occupant</A> - <A href='?src=\ref[];b2injector=1'>Injector</A><BR>", src, src)
if (src.buffer2) src.temphtml += text("Transfer to: <A href='?src=\ref[];b2transfer=1'>Occupant</A> - <A href='?src=\ref[];b2injector=1'>Full Injector</A> - <A href='?src=\ref[];b2injector=2'>Iso Injector</A><BR>", src, src, src)
//if (src.buffer2) src.temphtml += text("<A href='?src=\ref[];b2iso=1'>Isolate Block</A><BR>", src)
if (src.buffer2) src.temphtml += "Disk: <A href='?src=\ref[src];save_disk=2'>Save To</a> | <A href='?src=\ref[src];load_disk=2'>Load From</a><br>"
if (src.buffer2) src.temphtml += text("<A href='?src=\ref[];b2label=1'>Edit Label</A><BR>", src)
@@ -1264,7 +1330,7 @@
src.temphtml += text("By: <font color='blue'>[]</FONT><BR>", src.buffer3owner)
src.temphtml += text("Label: <font color='blue'>[]</FONT><BR>", src.buffer3label)
if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : <A href='?src=\ref[];b3addui=1'>UI</A> - <A href='?src=\ref[];b3adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b3addse=1'>SE</A><BR>", src, src, src)
if (src.buffer3) src.temphtml += text("Transfer to: <A href='?src=\ref[];b3transfer=1'>Occupant</A> - <A href='?src=\ref[];b3injector=1'>Injector</A><BR>", src, src)
if (src.buffer3) src.temphtml += text("Transfer to: <A href='?src=\ref[];b3transfer=1'>Occupant</A> - <A href='?src=\ref[];b3injector=1'>Full Injector</A> - <A href='?src=\ref[];b3injector=2'>Iso Injector</A><BR>", src, src, src)
//if (src.buffer3) src.temphtml += text("<A href='?src=\ref[];b3iso=1'>Isolate Block</A><BR>", src)
if (src.buffer3) src.temphtml += "Disk: <A href='?src=\ref[src];save_disk=3'>Save To</a> | <A href='?src=\ref[src];load_disk=3'>Load From</a><br>"
if (src.buffer3) src.temphtml += text("<A href='?src=\ref[];b3label=1'>Edit Label</A><BR>", src)
@@ -1443,49 +1509,76 @@
src.delete = 0
if (href_list["b1injector"])
if (src.injectorready)
var/success = 1
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
I.dna = src.buffer1
I.dnatype = src.buffer1type
I.loc = src.loc
I.name += " ([src.buffer1label])"
if (src.buffer1iue) I.ue = src.buffer1owner //lazy haw haw
src.temphtml = "Injector created."
src.delete = 0
src.injectorready = 0
spawn(300)
src.injectorready = 1
if(href_list["b1injector"]=="2")
var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffer1)
success = setInjectorBlock(I,blk,src.buffer1)
else
I.dna = src.buffer1
if(success)
I.loc = src.loc
I.name += " ([src.buffer1label])"
if (src.buffer1iue) I.ue = src.buffer1owner //lazy haw haw
src.temphtml = "Injector created."
src.delete = 0
src.injectorready = 0
spawn(300)
src.injectorready = 1
else
src.temphtml = "Error in injector creation."
src.delete = 0
else
src.temphtml = "Replicator not ready yet."
src.delete = 0
if (href_list["b2injector"])
if (src.injectorready)
var/success = 1
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
I.dna = src.buffer2
I.dnatype = src.buffer2type
I.loc = src.loc
I.name += " ([src.buffer2label])"
if (src.buffer2iue) I.ue = src.buffer2owner //lazy haw haw
src.temphtml = "Injector created."
src.delete = 0
src.injectorready = 0
spawn(300)
src.injectorready = 1
if(href_list["b2injector"]=="2")
var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffer2)
success = setInjectorBlock(I,blk,src.buffer2)
else
I.dna = src.buffer2
if(success)
I.loc = src.loc
I.name += " ([src.buffer2label])"
if (src.buffer2iue) I.ue = src.buffer2owner //lazy haw haw
src.temphtml = "Injector created."
src.delete = 0
src.injectorready = 0
spawn(300)
src.injectorready = 1
else
src.temphtml = "Error in injector creation."
src.delete = 0
else
src.temphtml = "Replicator not ready yet."
src.delete = 0
if (href_list["b3injector"])
if (src.injectorready)
var/success = 1
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
I.dna = src.buffer3
I.dnatype = src.buffer3type
I.loc = src.loc
I.name += " ([src.buffer3label])"
if (src.buffer3iue) I.ue = src.buffer3owner //lazy haw haw
src.temphtml = "Injector created."
src.delete = 0
src.injectorready = 0
spawn(300)
src.injectorready = 1
if(href_list["b3injector"]=="2")
var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffer3)
success = setInjectorBlock(I,blk,src.buffer3)
else
I.dna = src.buffer3
if(success)
I.loc = src.loc
I.name += " ([src.buffer3label])"
if (src.buffer3iue) I.ue = src.buffer3owner //lazy haw haw
src.temphtml = "Injector created."
src.delete = 0
src.injectorready = 0
spawn(300)
src.injectorready = 1
else
src.temphtml = "Error in injector creation."
src.delete = 0
else
src.temphtml = "Replicator not ready yet."
src.delete = 0

View File

@@ -34,9 +34,29 @@ var/FIREBLOCK = 0
var/XRAYBLOCK = 0
var/CLUMSYBLOCK = 0
var/FAKEBLOCK = 0
var/COUGHBLOCK = 0
var/GLASSESBLOCK = 0
var/EPILEPSYBLOCK = 0
var/TWITCHBLOCK = 0
var/NERVOUSBLOCK = 0
var/MONKEYBLOCK = 27
var/BLOCKADD = 0
var/DIFFMUT = 0
var/HEADACHEBLOCK = 0
var/NOBREATHBLOCK = 0
var/REMOTEVIEWBLOCK = 0
var/REGENERATEBLOCK = 0
var/INCREASERUNBLOCK = 0
var/REMOTETALKBLOCK = 0
var/MORPHBLOCK = 0
var/BLENDBLOCK = 0
var/HALLUCINATIONBLOCK = 0
var/NOPRINTSBLOCK = 0
var/SHOCKIMMUNITYBLOCK = 0
var/SMALLSIZEBLOCK = 0
var/skipupdate = 0
///////////////
var/eventchance = 3 //% per 5 mins

View File

@@ -134,7 +134,7 @@
if(istype(M) && M.lying) //Pulling lying down people is slower
tally += 3
if(MINCREASERUN in mutations)
if(mRun in mutations)
tally = 0
return tally

View File

@@ -193,6 +193,8 @@
if(suiciding)
msg += "<span class='warning'>[t_He] [t_has] bitten off [t_his] own tongue and [t_has] suffered major bloodloss!</span>\n"
if(mSmallsize in mutations)
msg += "[t_He] [t_is] small halfling!\n"
var/distance = get_dist(usr,src)
if(istype(usr, /mob/dead/observer) || usr.stat == 2) // ghosts can see anything

View File

@@ -816,3 +816,130 @@
spawn(350) //wait 35 seconds before next volley
lastpuke = 0
/mob/living/carbon/human/proc/morph()
set name = "Morph"
set category = "Superpower"
if(!(mMorph in mutations))
src.verbs -= /mob/living/carbon/human/proc/morph
return
var/new_facial = input("Please select facial hair color.", "Character Generation",rgb(r_facial,g_facial,b_facial)) as color
if(new_facial)
r_facial = hex2num(copytext(new_facial, 2, 4))
g_facial = hex2num(copytext(new_facial, 4, 6))
b_facial = hex2num(copytext(new_facial, 6, 8))
var/new_hair = input("Please select hair color.", "Character Generation",rgb(r_hair,g_hair,b_hair)) as color
if(new_facial)
r_hair = hex2num(copytext(new_hair, 2, 4))
g_hair = hex2num(copytext(new_hair, 4, 6))
b_hair = hex2num(copytext(new_hair, 6, 8))
var/new_eyes = input("Please select eye color.", "Character Generation",rgb(r_eyes,g_eyes,b_eyes)) as color
if(new_eyes)
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
b_eyes = hex2num(copytext(new_eyes, 6, 8))
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", "[35-s_tone]") as text
if (!new_tone)
new_tone = 35
s_tone = max(min(round(text2num(new_tone)), 220), 1)
s_tone = -s_tone + 35
// hair
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
var/list/hairs = list()
// loop through potential hairs
for(var/x in all_hairs)
var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x
hairs.Add(H.name) // add hair name to hairs
del(H) // delete the hair after it's all done
var/new_style = input("Please select hair style", "Character Generation",h_style) as null|anything in hairs
// if new style selected (not cancel)
if (new_style)
h_style = new_style
// facial hair
var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
var/list/fhairs = list()
for(var/x in all_fhairs)
var/datum/sprite_accessory/facial_hair/H = new x
fhairs.Add(H.name)
del(H)
new_style = input("Please select facial style", "Character Generation",f_style) as null|anything in fhairs
if(new_style)
f_style = new_style
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female")
if (new_gender)
if(new_gender == "Male")
gender = MALE
else
gender = FEMALE
regenerate_icons()
check_dna()
visible_message("\blue \The [src] morphs and changes [get_visible_gender() == MALE ? "his" : get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "\blue You change your appearance!", "\red Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!")
/mob/living/carbon/human/proc/remotesay()
set name = "Project mind"
set category = "Superpower"
if(!(mRemotetalk in src.mutations))
src.verbs -= /mob/living/carbon/human/proc/remotesay
return
var/list/creatures = list()
for(var/mob/living/carbon/h in world)
creatures += h
var/mob/target = input ("Who do you want to project your mind to ?") as null|anything in creatures
if (isnull(target))
return
var/say = input ("What do you wish to say")
if(mRemotetalk in target.mutations)
target.show_message("\blue You hear [src.real_name]'s voice: [say]")
else
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
for(var/mob/dead/observer/G in world)
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
/mob/living/carbon/human/proc/remoteobserve()
set name = "Remote View"
set category = "Superpower"
if(!(mRemote in src.mutations))
reset_view(0)
src.verbs -= /mob/living/carbon/human/proc/remoteobserve
return
if(client.eye != client.mob)
reset_view(0)
return
var/list/mob/creatures = list()
for(var/mob/living/carbon/h in world)
var/turf/temp_turf = get_turf(h)
if(temp_turf.z != 1 && temp_turf.z != 5) //Not on mining or the station.
continue
creatures += h
var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures
if (target)
reset_view(target)
else
reset_view(0)
/mob/living/carbon/human/proc/get_visible_gender()
if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
return NEUTER
return gender

View File

@@ -33,6 +33,9 @@
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
if(mRun in mutations)
tally = 0
return (tally+config.human_delay)
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)

View File

@@ -353,12 +353,28 @@
if((COLD_RESISTANCE in mutations) || (prob(1)))
heal_organ_damage(0,1)
if(mHallucination in mutations)
hallucination = 100
halloss = 0
if(mSmallsize in mutations)
if(!(pass_flags & PASSTABLE))
pass_flags |= PASSTABLE
else
if(pass_flags & PASSTABLE)
pass_flags &= ~PASSTABLE
// Make nanoregen heal youu, -3 all damage types
if(NANOREGEN in augmentations)
if((NANOREGEN in augmentations) || (mRegen in mutations))
var/healed = 0
var/hptoreg = 3
if(stat==UNCONSCIOUS) hptoreg=1
var/hptoreg = 0
if(NANOREGEN in augmentations)
hptoreg += 3
if(mRegen in mutations)
hptoreg += 2
if(stat==UNCONSCIOUS) hptoreg/=2
if(stat==DEAD) hptoreg=0
for(var/i=0, i<hptoreg, i++)
var/list/damages = new/list()
if(getToxLoss())
@@ -404,6 +420,27 @@
if(prob(5))
src << "\blue You feel your wounds mending..."
if(!(/mob/living/carbon/human/proc/morph in src.verbs))
if(mMorph in mutations)
src.verbs += /mob/living/carbon/human/proc/morph
else
if(!(mMorph in mutations))
src.verbs -= /mob/living/carbon/human/proc/morph
if(!(/mob/living/carbon/human/proc/remoteobserve in src.verbs))
if(mRemote in mutations)
src.verbs += /mob/living/carbon/human/proc/remoteobserve
else
if(!(mRemote in mutations))
src.verbs -= /mob/living/carbon/human/proc/remoteobserve
if(!(/mob/living/carbon/human/proc/remotesay in src.verbs))
if(mRemotetalk in mutations)
src.verbs += /mob/living/carbon/human/proc/remotesay
else
if(!(mRemotetalk in mutations))
src.verbs -= /mob/living/carbon/human/proc/remotesay
if ((HULK in mutations) && health <= 25)
mutations.Remove(HULK)
update_mutations() //update our mutation overlays
@@ -535,10 +572,10 @@
proc/handle_breath(datum/gas_mixture/breath)
if(nodamage || REBREATHER in augmentations)
if(nodamage || (REBREATHER in augmentations) || (mNobreath in mutations))
return
if(!breath || (breath.total_moles == 0) || suiciding)
if(!breath || (breath.total_moles() == 0) || suiciding)
if(reagents.has_reagent("inaprovaline"))
return
if(suiciding)
@@ -966,7 +1003,7 @@
adjustToxLoss(-1)
adjustOxyLoss(-1)
//The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
/* //The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(FAT in mutations)
if(overeatduration < 100)
src << "\blue You feel fit again!"
@@ -975,7 +1012,7 @@
update_mutations(0)
update_inv_w_uniform(0)
update_inv_wear_suit()
/* else
else
if(overeatduration > 500)
src << "\red You suddenly feel blubbery!"
mutations.Add(FAT)
@@ -983,7 +1020,8 @@
update_mutations(0)
update_inv_w_uniform(0)
update_inv_wear_suit()
AND YOU */
*/
// nutrition decrease
if (nutrition > 0 && stat != 2)
nutrition = max (0, nutrition - HUNGER_FACTOR)
@@ -1394,7 +1432,8 @@ AND YOU */
if(machine)
if(!machine.check_eye(src)) reset_view(null)
else
if(!client.adminobs) reset_view(null)
if(!(mRemote in mutations) && !client.adminobs)
reset_view(null)
return 1
proc/handle_random_events()

View File

@@ -40,6 +40,8 @@
/mob/living/proc/burn_skin(burn_amount)
if(istype(src, /mob/living/carbon/human))
//world << "DEBUG: burn_skin(), mutations=[mutations]"
if(mShock in src.mutations) //shockproof
return 0
if (COLD_RESISTANCE in src.mutations) //fireproof
return 0
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part

View File

@@ -308,6 +308,8 @@ var/MAX_EXPLOSION_RANGE = 14
// mob/var/list/mutations
#define STRUCDNASIZE 27
// Generic mutations:
#define TK 1
#define COLD_RESISTANCE 2
@@ -350,6 +352,19 @@ var/MAX_EXPLOSION_RANGE = 14
//2spooky
#define SKELETON 29
// Other Mutations:
#define mNobreath 100 // no need to breathe
#define mRemote 101 // remote viewing
#define mRegen 102 // health regen
#define mRun 103 // no slowdown
#define mRemotetalk 104 // remote talking
#define mMorph 105 // changing appearance
#define mBlend 106 // nothing (seriously nothing)
#define mHallucination 107 // hallucinations
#define mFingerprints 108 // no fingerprints
#define mShock 109 // insulated hands
#define mSmallsize 110 // table climbing
//disabilities
#define NEARSIGHTED 1
#define EPILEPSY 2