diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 7358096104d..2522523e4d7 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -111,29 +111,31 @@ proc/get_id_photo(var/mob/living/carbon/human/H) var/g = "m" if (H.gender == FEMALE) g = "f" + + var/icon/icobase switch(H.get_species()) if("Tajaran") - preview_icon = new /icon('icons/effects/species.dmi', "tajaran_[g]_s") - preview_icon.Blend(new /icon('icons/effects/species.dmi', "tajtail_s"), ICON_OVERLAY) + icobase = 'icons/mob/human_races/r_tajaran.dmi' if( "Soghun") - preview_icon = new /icon('icons/effects/species.dmi', "lizard_[g]_s") - preview_icon.Blend(new /icon('icons/effects/species.dmi', "sogtail_s"), ICON_OVERLAY) + icobase = 'icons/mob/human_races/r_lizard.dmi' if("Skrell") - preview_icon = new /icon('icons/effects/species.dmi', "skrell_[g]_s") + icobase = 'icons/mob/human_races/r_skrell.dmi' else - preview_icon = new /icon('human.dmi', "torso_[g]_s") - preview_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY) - preview_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY) - preview_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY) + icobase = 'icons/mob/human_races/r_human.dmi' - for(var/datum/organ/external/E in H.organs) - if(E.status & ORGAN_CUT_AWAY) continue + preview_icon = new /icon(icobase, "torso_[g]") + var/icon/temp + temp = new /icon(icobase, "groin_[g]") + preview_icon.Blend(temp, ICON_OVERLAY) + temp = new /icon(icobase, "head_[g]") + preview_icon.Blend(temp, ICON_OVERLAY) - var/icon/temp = new /icon('human.dmi', "[E.name]_s") - if(E.status & ORGAN_ROBOT) - temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) - - preview_icon.Blend(temp, ICON_OVERLAY) + for(var/datum/organ/external/E in H.organs) + if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue + temp = new /icon(icobase, "[E.name]") + if(E.status & ORGAN_ROBOT) + temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + preview_icon.Blend(temp, ICON_OVERLAY) // Skin tone if(H.get_species() == "Human") diff --git a/code/defines/procs/icon_procs.dm b/code/defines/procs/icon_procs.dm index c8d731bcde1..ce56408ead4 100644 --- a/code/defines/procs/icon_procs.dm +++ b/code/defines/procs/icon_procs.dm @@ -7,6 +7,16 @@ #define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87)) icon + proc/MakeLying() + var/icon/I = new(src,dir=SOUTH) + I.BecomeLying() + return I + + proc/BecomeLying() + Turn(90) + Shift(SOUTH,6) + Shift(EAST,1) + // Multiply all alpha values by this float proc/ChangeOpacity(opacity = 1.0) MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0) diff --git a/code/game/dna.dm b/code/game/dna.dm index d4628e6f9a7..80a250620f0 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -399,9 +399,17 @@ var/old_mutations = M.mutations M.mutations = list() - M.see_in_dark = 2 - M.see_invisible = 0 +// M.see_in_dark = 2 +// M.see_invisible = 0 + if(PLANT in old_mutations) + M.mutations.Add(PLANT) + if(SKELETON in old_mutations) + M.mutations.Add(SKELETON) + if(FAT in old_mutations) + M.mutations.Add(FAT) + if(HUSK in old_mutations) + M.mutations.Add(HUSK) if(ismuton(NOBREATHBLOCK,M)) if(probinj(45,inj) || (mNobreath in old_mutations)) @@ -478,9 +486,9 @@ 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 = 2 +// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) +// M.see_in_dark = 8 +// M.see_invisible = 2 M.mutations.Add(XRAY) if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK)) M.disabilities |= NERVOUS @@ -1648,4 +1656,4 @@ src.add_fingerprint(usr) src.updateUsrDialog() return -/////////////////////////// DNA MACHINES \ No newline at end of file +/////////////////////////// DNA MACHINES diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a8f55c066f8..d164c4fb9d9 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -821,6 +821,12 @@ /mob/living/carbon/human/proc/morph() set name = "Morph" set category = "Superpower" + + if(stat!=CONSCIOUS) + reset_view(0) + remoteview_target = null + return + if(!(mMorph in mutations)) src.verbs -= /mob/living/carbon/human/proc/morph return @@ -894,6 +900,12 @@ /mob/living/carbon/human/proc/remotesay() set name = "Project mind" set category = "Superpower" + + if(stat!=CONSCIOUS) + reset_view(0) + remoteview_target = null + return + if(!(mRemotetalk in src.mutations)) src.verbs -= /mob/living/carbon/human/proc/remotesay return @@ -917,12 +929,19 @@ set name = "Remote View" set category = "Superpower" + if(stat!=CONSCIOUS) + remoteview_target = null + reset_view(0) + return + if(!(mRemote in src.mutations)) + remoteview_target = null reset_view(0) src.verbs -= /mob/living/carbon/human/proc/remoteobserve return if(client.eye != client.mob) + remoteview_target = null reset_view(0) return @@ -930,15 +949,17 @@ 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. + if((temp_turf.z != 1 && temp_turf.z != 5) || h.stat==DEAD) //Not on mining or the station. Or dead continue creatures += h var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures if (target) + remoteview_target = target reset_view(target) else + remoteview_target = null reset_view(0) /mob/living/carbon/human/proc/get_visible_gender() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 92522f701be..6908d550ae4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1295,9 +1295,13 @@ sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) if(dna) switch(dna.mutantrace) - if("lizard","metroid") + if("metroid") see_in_dark = 3 see_invisible = SEE_INVISIBLE_LEVEL_ONE + if("lizard") + see_in_dark = 3 + if("tajaran") + see_in_dark = 5 else see_in_dark = 2 diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 13c2a87ac08..5de8d28fd18 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -218,107 +218,127 @@ proc/get_damage_icon_part(damage_state, body_part) /mob/living/carbon/human/proc/update_body(var/update_icons=1) if(stand_icon) del(stand_icon) if(lying_icon) del(lying_icon) - if(dna && dna.mutantrace) return + + var/husk_color_mod = rgb(96,88,80) + var/hulk_color_mod = rgb(24,72,24) + var/plant_color_mod = rgb(144,224,144) var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete var/fat = (FAT in src.mutations) + var/hulk = (HULK in src.mutations) var/skeleton = (SKELETON in src.mutations) + var/plant = (PLANT in src.mutations) var/g = "m" if(gender == FEMALE) g = "f" - // whether to draw the individual limbs - var/individual_limbs = 0 - - //Base mob icon - if(husk) - stand_icon = new /icon('icons/mob/human.dmi', "husk_s") - lying_icon = new /icon('icons/mob/human.dmi', "husk_l") - else if(fat) - stand_icon = new /icon('icons/mob/human.dmi', "fatbody_s") - lying_icon = new /icon('icons/mob/human.dmi', "fatbody_l") - else if(skeleton) - stand_icon = new /icon('icons/mob/human.dmi', "skeleton_s") - lying_icon = new /icon('icons/mob/human.dmi', "skeleton_l") + var/icon/icobase + if(skeleton) + icobase = 'icons/mob/human_races/r_skeleton.dmi' + else if(dna) + switch(dna.mutantrace) + if("tajaran") + icobase = 'icons/mob/human_races/r_tajaran.dmi' + if("lizard") + icobase = 'icons/mob/human_races/r_lizard.dmi' + if("skrell") + icobase = 'icons/mob/human_races/r_skrell.dmi' + else + icobase = 'icons/mob/human_races/r_human.dmi' else - stand_icon = new /icon('icons/mob/human.dmi', "torso_[g]_s") - lying_icon = new /icon('icons/mob/human.dmi', "torso_[g]_l") - individual_limbs = 1 + icobase = 'icons/mob/human_races/r_human.dmi' - // Draw each individual limb - if(individual_limbs) - stand_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_l"), ICON_OVERLAY) + if(!skeleton) + stand_icon = new /icon(icobase, "torso_[g][fat?"_fat":""]") + if(husk) + stand_icon.ColorTone(husk_color_mod) + else if(hulk) + stand_icon.ColorTone(hulk_color_mod) + else if(plant) + stand_icon.ColorTone(plant_color_mod) + else + stand_icon = new /icon(icobase, "torso") - var/datum/organ/external/head = get_organ("head") - if(head && !(head.status & ORGAN_DESTROYED)) - stand_icon.Blend(new /icon('icons/mob/human.dmi', "head_[g]_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('icons/mob/human.dmi', "head_[g]_l"), ICON_OVERLAY) + var/datum/organ/external/head = get_organ("head") + var/has_head = 0 + if(head && !(head.status & ORGAN_DESTROYED)) + has_head = 1 - for(var/datum/organ/external/part in organs) - if(!istype(part, /datum/organ/external/groin) \ - && !istype(part, /datum/organ/external/chest) \ - && !istype(part, /datum/organ/external/head) \ - && !(part.status & ORGAN_DESTROYED)) - var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s") - if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + for(var/datum/organ/external/part in organs) + if(!istype(part, /datum/organ/external/chest) && !(part.status & ORGAN_DESTROYED)) + var/icon/temp + if(istype(part, /datum/organ/external/groin)) + if(skeleton) + temp = new /icon(icobase, "groin") + else + temp = new /icon(icobase, "groin_[g]") + else if(istype(part, /datum/organ/external/head)) + if(skeleton) + temp = new /icon(icobase, "head") + else + temp = new /icon(icobase, "head_[g]") + else + temp = new /icon(icobase, "[part.icon_name]") + if(part.status & ORGAN_ROBOT) + temp.GrayScale() + else if(!skeleton) + if(husk) + temp.ColorTone(husk_color_mod) + else if(hulk) + temp.ColorTone(hulk_color_mod) + else if(plant) + temp.ColorTone(plant_color_mod) + + if(part.icon_position&(LEFT|RIGHT)) + var/icon/temp2 = new('icons/mob/human.dmi',"blank") + temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH) + temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH) + if(!(part.icon_position & LEFT)) + temp2.Insert(new/icon(temp,dir=EAST),dir=EAST) + if(!(part.icon_position & RIGHT)) + temp2.Insert(new/icon(temp,dir=WEST),dir=WEST) + stand_icon.Blend(temp2, ICON_OVERLAY) + temp2 = new('icons/mob/human.dmi',"blank") + if(part.icon_position & LEFT) + temp2.Insert(new/icon(temp,dir=EAST),dir=EAST) + if(part.icon_position & RIGHT) + temp2.Insert(new/icon(temp,dir=WEST),dir=WEST) + stand_icon.Blend(temp2, ICON_UNDERLAY) + else stand_icon.Blend(temp, ICON_OVERLAY) - temp = new /icon('human.dmi', "[part.icon_name]_l") - if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) - lying_icon.Blend(temp , ICON_OVERLAY) - - stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY) - - if (husk) - var/icon/husk_s = new /icon('human.dmi', "husk_s") - var/icon/husk_l = new /icon('human.dmi', "husk_l") - - for(var/datum/organ/external/part in organs) - if(!istype(part, /datum/organ/external/groin) \ - && !istype(part, /datum/organ/external/chest) \ - && !istype(part, /datum/organ/external/head) \ - && (part.status & ORGAN_DESTROYED)) - husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT) - husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT) - - stand_icon.Blend(husk_s, ICON_OVERLAY) - lying_icon.Blend(husk_l, ICON_OVERLAY) //Skin tone - if(!skeleton) + if(!skeleton && !husk && !hulk && !plant) if(s_tone >= 0) stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) - lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) else stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) - lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) - //Eyes - if(!skeleton) - var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s") - var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l") - eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) - eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) - stand_icon.Blend(eyes_s, ICON_OVERLAY) - lying_icon.Blend(eyes_l, ICON_OVERLAY) - // Note: These used to be in update_face(), and the fact they're here will make it difficult to create a disembodied head - var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s") - var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l") - eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) - eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) - stand_icon.Blend(eyes_s, ICON_OVERLAY) - lying_icon.Blend(eyes_l, ICON_OVERLAY) + if(husk) + var/icon/mask = new(stand_icon) + var/icon/husk_over = new(icobase,"overlay_husk") + mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0) + husk_over.Blend(mask, ICON_ADD) + stand_icon.Blend(husk_over, ICON_OVERLAY) + + if(has_head) + //Eyes + if(!skeleton) + var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s") + eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) + stand_icon.Blend(eyes_s, ICON_OVERLAY) //Mouth (lipstick!) if(lip_style) //skeletons are allowed to wear lipstick no matter what you think, agouri. stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY) - lying_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY) //Underwear if(underwear >0 && underwear < 12) if(!fat && !skeleton) stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY) + + lying_icon = stand_icon.MakeLying() + if(update_icons) update_icons() @@ -417,27 +437,29 @@ proc/get_damage_icon_part(damage_state, body_part) var/fat if( FAT in mutations ) fat = "fat" - var/g = "m" - if (gender == FEMALE) g = "f" +// var/g = "m" +// if (gender == FEMALE) g = "f" //BS12 EDIT if(dna) switch(dna.mutantrace) if("golem","metroid") - overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_l") - overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_s") - if("lizard", "tajaran", "skrell") - overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_l") - overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_s") - if("plant") - if(stat == DEAD) //TODO - overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d") - else - overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l") - overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s") + var/icon/I = new('icons/effects/genetics.dmi',"[dna.mutantrace][fat]_s") + overlays_standing[MUTANTRACE_LAYER] = image(I) + overlays_lying[MUTANTRACE_LAYER] = image(I.MakeLying()) +// if("lizard", "tajaran", "skrell") +// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_l") +// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_s") +// if("plant") +// if(stat == DEAD) //TODO +// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d") +// else +// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l") +// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s") else overlays_lying[MUTANTRACE_LAYER] = null overlays_standing[MUTANTRACE_LAYER] = null - update_body(0) + if(!dna || !(dna.mutantrace in list("golem","metroid"))) + update_body(0) update_hair(0) if(update_icons) update_icons() diff --git a/icons/mob/human_races/r_human.dmi b/icons/mob/human_races/r_human.dmi new file mode 100644 index 00000000000..3fec1061f64 Binary files /dev/null and b/icons/mob/human_races/r_human.dmi differ diff --git a/icons/mob/human_races/r_lizard.dmi b/icons/mob/human_races/r_lizard.dmi new file mode 100644 index 00000000000..70d29e573eb Binary files /dev/null and b/icons/mob/human_races/r_lizard.dmi differ diff --git a/icons/mob/human_races/r_skeleton.dmi b/icons/mob/human_races/r_skeleton.dmi new file mode 100644 index 00000000000..cbf854161d9 Binary files /dev/null and b/icons/mob/human_races/r_skeleton.dmi differ diff --git a/icons/mob/human_races/r_skrell.dmi b/icons/mob/human_races/r_skrell.dmi new file mode 100644 index 00000000000..daf33ee223e Binary files /dev/null and b/icons/mob/human_races/r_skrell.dmi differ diff --git a/icons/mob/human_races/r_tajaran.dmi b/icons/mob/human_races/r_tajaran.dmi new file mode 100644 index 00000000000..def8ba83d27 Binary files /dev/null and b/icons/mob/human_races/r_tajaran.dmi differ