diff --git a/code/game/dna.dm b/code/game/dna.dm index cb58013e016..13f90e7d506 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -550,15 +550,11 @@ var/mob/living/carbon/monkey/O = null - switch(M.dna.mutantrace) - if("tajaran") - O = new /mob/living/carbon/monkey/tajara(src) - if("lizard") - O = new /mob/living/carbon/monkey/unathi(src) - if("skrell") - O = new /mob/living/carbon/monkey/skrell(src) - else - O = new /mob/living/carbon/monkey(src) + if(H.species.primitive) + O = new H.species.primitive(src) + else + H.gib() //Trying to change the species of a creature with no primitive var set is messy. + return if(M) if (M.dna) @@ -626,6 +622,9 @@ del(animation) var/mob/living/carbon/human/O = new( src ) + if(Mo.greaterform) + O.set_species(Mo.greaterform) + if (isblockon(getblock(M.dna.uni_identity, 11,3),11)) O.gender = FEMALE else diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index e8ba6c49137..2a442dbad84 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -53,7 +53,7 @@ /obj/item/clothing/mask/breath/vox/mob_can_equip(M as mob, slot) var/mob/living/carbon/human/V = M - if(V.dna.mutantrace != "vox") + if(V.species.name != "Vox") V << "This clearly isn't designed for your species!" return 0 diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index 7e9b18f5ef9..0115eef3113 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -3,14 +3,14 @@ var/up = 0 //So Unathi helmets play nicely with the weldervision check. mob_can_equip(M as mob, slot) var/mob/living/carbon/human/U = M - if(U.dna.mutantrace != "lizard") + if(U.species.name != "Unathi") U << "This clearly isn't designed for your species!" return 0 return ..() /obj/item/clothing/suit/space/unathi/mob_can_equip(M as mob, slot) var/mob/living/carbon/human/U = M - if(U.dna.mutantrace != "lizard") + if(U.species.name != "Unathi") U << "This clearly isn't designed for your species!" return 0 @@ -79,14 +79,14 @@ /obj/item/clothing/head/helmet/space/vox/mob_can_equip(M as mob, slot) var/mob/living/carbon/human/V = M - if(V.dna.mutantrace != "vox") + if(V.species.name != "Vox") V << "This clearly isn't designed for your species!" return 0 return ..() /obj/item/clothing/suit/space/vox/mob_can_equip(M as mob, slot) var/mob/living/carbon/human/V = M - if(V.dna.mutantrace != "vox") + if(V.species.name != "Vox") V << "This clearly isn't designed for your species!" return 0 @@ -117,7 +117,7 @@ /obj/item/clothing/gloves/yellow/vox/mob_can_equip(M as mob, slot) var/mob/living/carbon/human/U = M - if(U.dna.mutantrace != "vox") + if(U.species.name != "Vox") U << "This clearly isn't designed for your species!" return 0 return ..() @@ -149,7 +149,7 @@ /obj/item/clothing/shoes/magboots/vox/mob_can_equip(M as mob, slot) var/mob/living/carbon/human/U = M - if(U.dna.mutantrace != "vox") + if(U.species.name != "Vox") U << "This clearly isn't designed for your species!" return 0 return ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 2803a0b8b56..df8dec56156 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -835,17 +835,6 @@ return species.name -/mob/living/carbon/get_species() - if(src.dna) - if(src.dna.mutantrace == "lizard") - return "Unathi" - else if(src.dna.mutantrace == "skrell") - return "Skrell" - else if(src.dna.mutantrace == "tajaran") - return "Tajaran" - else if(src.dna.mutantrace == "vox") - return "vox" - /mob/living/carbon/human/proc/play_xylophone() if(!src.xylophone) visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.") @@ -1272,6 +1261,12 @@ mob/living/carbon/human/yank_out_object() species = all_species[new_species] + see_in_dark = species.darksight + if(see_in_dark > 2) + see_invisible = SEE_INVISIBLE_LEVEL_ONE + else + see_invisible = SEE_INVISIBLE_LIVING + spawn(0) update_icons() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8634e086512..d61cdd1cc7c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1146,14 +1146,12 @@ sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) if(dna) switch(dna.mutantrace) - if("lizard","slime") + if("slime") see_in_dark = 3 see_invisible = SEE_INVISIBLE_LEVEL_ONE - if("shadow","tajaran") + if("shadow") see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_ONE - else - see_in_dark = 2 if(XRAY in mutations) sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index ecd799b5277..09c659b2d60 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -10,116 +10,39 @@ update_icon = 0 ///no need to call regenerate_icon var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie + var/greaterform = "Human" //Used when humanizing a monkey. + var/ico = "monkey" //Used when updating icons. /mob/living/carbon/monkey/tajara name = "farwa" voice_name = "farwa" voice_message = "mews" say_message = "mews" - icon_state = "tajkey1" + ico = "tajkey" /mob/living/carbon/monkey/skrell name = "neaera" voice_name = "neaera" voice_message = "squicks" say_message = "squicks" - icon_state = "skrellkey1" + ico = "skrellkey" + /mob/living/carbon/monkey/unathi name = "stok" voice_name = "stok" voice_message = "hisses" say_message = "hisses" - icon_state = "stokkey1" - -/mob/living/carbon/monkey/unathi/New() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src - - if(name == "stok") - name = text("stok ([rand(1, 1000)])") - real_name = name - if (!(dna)) - if(gender == NEUTER) - gender = pick(MALE, FEMALE) - dna = new /datum/dna( null ) - dna.real_name = real_name - dna.uni_identity = "000000000000000000DC0000066000" - dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" - dna.unique_enzymes = md5(name) - dna.mutantrace = "lizard" - //////////blah - var/gendervar - if (gender == MALE) - gendervar = add_zero2(num2hex((rand(1,2049)),1), 3) - else - gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3) - dna.uni_identity += gendervar - dna.uni_identity += "044" - dna.uni_identity += "C5D" - ..() -/mob/living/carbon/monkey/skrell/New() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src - if(name == "neaera") - name = text("neaera ([rand(1, 1000)])") - real_name = name - if (!(dna)) - if(gender == NEUTER) - gender = pick(MALE, FEMALE) - dna = new /datum/dna( null ) - dna.real_name = real_name - dna.uni_identity = "000000000000000000DC0000066000" - dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" - dna.unique_enzymes = md5(name) - dna.mutantrace = "skrell" - //////////blah - var/gendervar - if (gender == MALE) - gendervar = add_zero2(num2hex((rand(1,2049)),1), 3) - else - gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3) - dna.uni_identity += gendervar - dna.uni_identity += "01C" - dna.uni_identity += "C92" - ..() -/mob/living/carbon/monkey/tajara/New() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src - - if(name == "farwa") - name = text("farwa ([rand(1, 1000)])") - real_name = name - if (!(dna)) - if(gender == NEUTER) - gender = pick(MALE, FEMALE) - dna = new /datum/dna( null ) - dna.real_name = real_name - dna.uni_identity = "000000000000000000DC0000066000" - dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" - dna.unique_enzymes = md5(name) - dna.mutantrace = "tajaran" - //////////blah - var/gendervar - if (gender == MALE) - gendervar = add_zero2(num2hex((rand(1,2049)),1), 3) - else - gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3) - dna.uni_identity += gendervar - dna.uni_identity += "0A0" - dna.uni_identity += "E00" - ..() + ico = "stokkey" /mob/living/carbon/monkey/New() var/datum/reagents/R = new/datum/reagents(1000) reagents = R R.my_atom = src - if(name == "monkey") - name = text("monkey ([rand(1, 1000)])") - real_name = name + if(name == "monkey" || name == "farwa" || name == "stok" || name == "neara") //Hideous but necessary to stop Pun-Pun becoming generic. + name = "[name] ([rand(1, 1000)])" + real_name = name + if (!(dna)) if(gender == NEUTER) gender = pick(MALE, FEMALE) @@ -138,8 +61,27 @@ dna.uni_identity += "12C" dna.uni_identity += "4E2" ..() + update_icons() return +/mob/living/carbon/monkey/unathi/New() + + ..() + dna.mutantrace = "lizard" + greaterform = "Unathi" + +/mob/living/carbon/monkey/skrell/New() + + ..() + dna.mutantrace = "skrell" + greaterform = "Skrell" + +/mob/living/carbon/monkey/tajara/New() + + ..() + dna.mutantrace = "tajaran" + greaterform = "Tajaran" + /mob/living/carbon/monkey/movement_delay() var/tally = 0 if(reagents) diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm index ffff64b06f8..660f7f4b839 100644 --- a/code/modules/mob/living/carbon/monkey/update_icons.dm +++ b/code/modules/mob/living/carbon/monkey/update_icons.dm @@ -28,14 +28,7 @@ update_hud() lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again overlays.Cut() - var/ico = "monkey" - switch(src.dna.mutantrace) //On monkey spawn, check the DNA of the mob. If alien, change to appropriate alien monkey sprite - if("tajaran") - ico = "tajkey" - if("lizard") - ico = "stokkey" - if("skrell") - ico = "skrellkey" + if(lying) icon_state = ico + "0" for(var/image/I in overlays_lying) diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 5d193fb4ec2..f6e6ff43322 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -9,10 +9,11 @@ var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set. var/eyes = "eyes_s" // Icon for eyes. - var/tail // Name of tail image in species effects icon file. var/primitive // Lesser form, if any (ie. monkey for humans) + var/tail // Name of tail image in species effects icon file. var/language // Default racial language, if any. var/attack_verb = "punch" // Empty hand hurt intent verb. + var/mutantrace // Safeguard due to old code. var/breath_type // Non-oxygen gas breathed, if any. @@ -24,6 +25,7 @@ var/heat_level_2 = 400 // Heat damage level 2 above this point. var/heat_level_3 = 1000 // Heat damage level 2 above this point. + var/darksight = 2 var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure. var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning. var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning. @@ -36,6 +38,8 @@ /datum/species/human name = "Human" + primitive = /mob/living/carbon/monkey + flags = HAS_LIPS | HAS_UNDERWEAR /datum/species/unathi @@ -45,6 +49,8 @@ language = "Sinta'unathi" tail = "sogtail" attack_verb = "scratch" + primitive = /mob/living/carbon/monkey/unathi + darksight = 3 flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL @@ -55,6 +61,9 @@ language = "Siik'mas" tail = "tajtail" attack_verb = "scratch" + darksight = 8 + + primitive = /mob/living/carbon/monkey/tajara flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL @@ -63,6 +72,7 @@ icobase = 'icons/mob/human_races/r_skrell.dmi' deform = 'icons/mob/human_races/r_def_skrell.dmi' language = "Skrellian" + primitive = /mob/living/carbon/monkey/skrell flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index cb34e9d25ce..b7ac6233556 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -367,7 +367,7 @@ var/list/department_radio_keys = list( for (var/M in listening) if(hascall(M,"say_understands")) - if ((M:say_understands(src) && !speaking) || M.universal_speak) + if ((M:say_understands(src) && !speaking)) //world << "[M] understood [src] (0)." heard_a += M else if(ismob(M)) @@ -381,7 +381,7 @@ var/list/department_radio_keys = list( for(var/datum/language/L in P.languages) if(speaking.name == L.name) understood = 1 - if(understood) + if(understood || P.universal_speak) //world << "[M] understood [src] (1)." heard_a += M else diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 7976e9c27af..bb5ed93e2ab 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -21,102 +21,33 @@ sleep(48) //animation = null + if(!species.primitive) //If the creature in question has no primitive set, this is going to be messy. + gib() + return + var/mob/living/carbon/monkey/O = null - switch(dna.mutantrace) - if("tajara") - O = new /mob/living/carbon/monkey/tajara( loc ) - O.name = "farwa" - O.dna = dna - dna = null - O.dna.uni_identity = "000000000000000000DC00000660004DA0A0E00" - //O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" - O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8" - O.loc = loc - O.viruses = viruses - viruses = list() - for(var/datum/disease/D in O.viruses) - D.affected_mob = O + O = new species.primitive(loc) - if (client) - client.mob = O - if(mind) - mind.transfer_to(O) - O << "You are now a farwa. " - O.a_intent = "hurt" - spawn(0)//To prevent the proc from returning null. - del(src) - del(animation) - if("lizard") - O = new /mob/living/carbon/monkey/unathi( loc ) - O.name = "stok" - O.dna = dna - dna = null - O.dna.uni_identity = "000000000000000000DC00000660002A8044C5D" - //O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" - O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8" - O.loc = loc - O.viruses = viruses - viruses = list() - for(var/datum/disease/D in O.viruses) - D.affected_mob = O + O.dna = dna + O.dna.uni_identity = "000000000000000000DC00000660004DA0A0E00" + O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8" + O.viruses = viruses + O.a_intent = "hurt" - if (client) - client.mob = O - if(mind) - mind.transfer_to(O) - O << "You are now a stok. " - O.a_intent = "hurt" - spawn(0)//To prevent the proc from returning null. - del(src) - del(animation) - if("skrell") - O = new /mob/living/carbon/monkey/unathi( loc ) - O.name = "neaera" - O.dna = dna - dna = null - O.dna.uni_identity = "000000000000000000DC00000660002A8044C5D" - //O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" - O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8" - O.loc = loc - O.viruses = viruses - viruses = list() - for(var/datum/disease/D in O.viruses) - D.affected_mob = O + for(var/datum/disease/D in O.viruses) + D.affected_mob = O - if (client) - client.mob = O - if(mind) - mind.transfer_to(O) - O << "You are now a neaera. " - O.a_intent = "hurt" - spawn(0)//To prevent the proc from returning null. - del(src) - del(animation) - else - O = new /mob/living/carbon/monkey( loc ) - O.name = "monkey" - O.dna = dna - dna = null - O.dna.uni_identity = "00600200A00E0110148FC01300B009" - //O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" - O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8" - O.loc = loc - O.viruses = viruses - viruses = list() - for(var/datum/disease/D in O.viruses) - D.affected_mob = O + if (client) + client.mob = O + if(mind) + mind.transfer_to(O) - if (client) - client.mob = O - if(mind) - mind.transfer_to(O) - O << "You are now a monkey." - O.a_intent = "hurt" - spawn(0)//To prevent the proc from returning null. - del(src) - del(animation) + O << "You are now [O]. " + spawn(0)//To prevent the proc from returning null. + del(src) + del(animation) return O