updated DNA code to have more mutations

This commit is contained in:
Ater Ignis
2012-11-10 14:12:25 +04:00
parent 6bfdbdd606
commit 8b71b7d106
10 changed files with 399 additions and 91 deletions

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