diff --git a/baystation12.dme b/baystation12.dme index 1c5182a856f..5ab7609868a 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -237,6 +237,7 @@ #define FILE_DIR "icons/mecha" #define FILE_DIR "icons/misc" #define FILE_DIR "icons/mob" +#define FILE_DIR "icons/mob/human_races" #define FILE_DIR "icons/obj" #define FILE_DIR "icons/obj/assemblies" #define FILE_DIR "icons/obj/atmospherics" @@ -252,7 +253,6 @@ #define FILE_DIR "icons/vending_icons" #define FILE_DIR "interface" #define FILE_DIR "maps" -#define FILE_DIR "maps/backup" #define FILE_DIR "maps/RandomZLevels" #define FILE_DIR "sound" #define FILE_DIR "sound/AI" diff --git a/code/WorkInProgress/surgery.dm b/code/WorkInProgress/surgery.dm index fd93463c15b..ab19b0e525c 100644 --- a/code/WorkInProgress/surgery.dm +++ b/code/WorkInProgress/surgery.dm @@ -959,6 +959,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) "\blue You have finished adjusting the area around [target]'s [affected.display_name] with \the [tool].") affected.status |= ORGAN_ATTACHABLE affected.amputated = 1 + affected.setAmputatedTree() affected.open = 0 fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/ZAS/FEA_system.dm b/code/ZAS/FEA_system.dm index 6912102a93d..58574baeb7e 100644 --- a/code/ZAS/FEA_system.dm +++ b/code/ZAS/FEA_system.dm @@ -276,7 +276,12 @@ datum rebuilds_to_consider[NT] = T proc/ConsiderRebuild(var/turf/simulated/T, var/turf/NT) + if(!istype(T)) return + //zones should naturally spread to these tiles eventually + if(!T.zone || !NT.zone) + return + if(istype(NT, /turf/simulated) && NT.zone != T.zone) T.zone.RemoveTurf(NT) if(NT.zone) 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/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm index 6b51d6fe234..da3c60bf304 100644 --- a/code/datums/organs/organ_external.dm +++ b/code/datums/organs/organ_external.dm @@ -5,6 +5,7 @@ name = "external" var/icon_name = null var/body_part = null + var/icon_position = 0 var/damage_state = "00" var/brute_dam = 0 @@ -63,8 +64,7 @@ var/nux = brute * rand(10,15) if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) if(prob(5 * brute)) - status |= ORGAN_DESTROYED - droplimb() + droplimb(1) return else if(prob(nux)) @@ -75,8 +75,7 @@ else if(brute > 20) if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) if(prob(5 * brute)) - status |= ORGAN_DESTROYED - droplimb() + droplimb(1) return // If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking @@ -319,10 +318,19 @@ return 1 return 0 + proc/setAmputatedTree() + for(var/datum/organ/external/O in children) + O.amputated=amputated + O.setAmputatedTree() + proc/droplimb(var/override = 0,var/no_explode = 0) + if(destspawn) return if(override) status |= ORGAN_DESTROYED if(status & ORGAN_DESTROYED) + if(body_part == UPPER_TORSO) + return + if(status & ORGAN_SPLINTED) status &= ~ORGAN_SPLINTED if(implant) @@ -337,8 +345,8 @@ var/obj/item/weapon/organ/H switch(body_part) - // if(UPPER_TORSO) just no. - // owner.gib() +// if(UPPER_TORSO) +// owner.gib() if(LOWER_TORSO) owner << "\red You are now sterile." if(HEAD) @@ -396,8 +404,25 @@ if(ismonkey(owner)) H.icon_state = "l_foot_l" owner.u_equip(owner.shoes) - if(ismonkey(owner)) - H.icon = 'monkey.dmi' + if(H) + if(ismonkey(owner)) + H.icon = 'monkey.dmi' + else if(ishuman(owner) && owner.dna) + var/icon/I + switch(owner.dna.mutantrace) + if("tajaran") + I = new('icons/mob/human_races/r_tajaran.dmi') + if("lizard") + I = new('icons/mob/human_races/r_lizard.dmi') + if("skrell") + I = new('icons/mob/human_races/r_skrell.dmi') + else + I = new('icons/mob/human_races/r_human.dmi') + if(I) + H.icon = I.MakeLying() + else + H.icon_state = initial(H.icon_state)+"_l" + var/lol = pick(cardinal) step(H,lol) destspawn = 1 @@ -573,6 +598,7 @@ max_damage = 75 min_broken_damage = 30 body_part = LEG_LEFT + icon_position = LEFT /datum/organ/external/r_arm name = "r_arm" @@ -589,6 +615,7 @@ max_damage = 75 min_broken_damage = 30 body_part = LEG_RIGHT + icon_position = RIGHT /datum/organ/external/l_foot name = "l_foot" @@ -597,6 +624,7 @@ max_damage = 40 min_broken_damage = 15 body_part = FOOT_LEFT + icon_position = LEFT /datum/organ/external/r_foot name = "r_foot" @@ -605,6 +633,7 @@ max_damage = 40 min_broken_damage = 15 body_part = FOOT_RIGHT + icon_position = RIGHT /datum/organ/external/r_hand name = "r_hand" @@ -627,7 +656,7 @@ ****************************************************/ obj/item/weapon/organ - icon = 'human.dmi' + icon = 'icons/mob/human_races/r_human.dmi' obj/item/weapon/organ/New(loc, mob/living/carbon/human/H) ..(loc) @@ -718,25 +747,25 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob) obj/item/weapon/organ/l_arm name = "left arm" - icon_state = "l_arm_l" + icon_state = "l_arm" obj/item/weapon/organ/l_foot name = "left foot" - icon_state = "l_foot_l" + icon_state = "l_foot" obj/item/weapon/organ/l_hand name = "left hand" - icon_state = "l_hand_l" + icon_state = "l_hand" obj/item/weapon/organ/l_leg name = "left leg" - icon_state = "l_leg_l" + icon_state = "l_leg" obj/item/weapon/organ/r_arm name = "right arm" - icon_state = "r_arm_l" + icon_state = "r_arm" obj/item/weapon/organ/r_foot name = "right foot" - icon_state = "r_foot_l" + icon_state = "r_foot" obj/item/weapon/organ/r_hand name = "right hand" - icon_state = "r_hand_l" + icon_state = "r_hand" obj/item/weapon/organ/r_leg name = "right leg" - icon_state = "r_leg_l" + icon_state = "r_leg" 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/area/areas.dm b/code/game/area/areas.dm index 29eb5cd6763..e0e15c0ecd3 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -123,7 +123,7 @@ D.open() for (var/mob/living/silicon/ai/aiPlayer in player_list) aiPlayer.cancelAlarm("Fire", src, src) - for (var/obj/machinery/computer/station_alert/a in player_list) + for (var/obj/machinery/computer/station_alert/a in world) a.cancelAlarm("Fire", src, src) return 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/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm index 16fd85b8dc6..b611b974a30 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/game/machinery/hydroponics.dm @@ -941,8 +941,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) if(se) podman.dna.struc_enzymes = se if(!prob(potency)) //if it fails, plantman! - if(podman.dna) - podman.dna.mutantrace = "plant" + if(podman) +// podman.dna.mutantrace = "plant" + podman.mutations.Add(PLANT) podman.update_mutantrace() else //else, one packet of seeds. maybe two diff --git a/code/game/sound.dm b/code/game/sound.dm index 35d80594ac8..f943b9947e1 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -19,7 +19,7 @@ if (vary) S.frequency = rand(32000, 55000) - for (var/mob/M in range(world.view+extrarange, source)) // Plays for people in range. + for (var/mob/M in range(world.view+extrarange, source)) // Plays for people in range. if(locate(/mob/, M)) var/mob/M2 = locate(/mob/, M) if (M2.client) @@ -48,6 +48,16 @@ S.pan = max(-100, min(100, dx/8.0 * 100)) M << S + + for(var/obj/mecha/mech in range(world.view+extrarange, source)) + var/mob/M = mech.occupant + if (M && M.client) + if(M.ear_deaf <= 0 || !M.ear_deaf) + if(isturf(source)) + var/dx = source.x - M.x + S.pan = max(-100, min(100, dx/8.0 * 100)) + + M << S // Now plays for people in lockers! -- Polymorph /mob/proc/playsound_local(var/atom/source, soundin, vol as num, vary, extrarange as num) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 783f3404e85..4b6e4e17539 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -31,7 +31,7 @@ mob/proc/custom_emote(var/m_type=1,var/message = null) if (istype(M, /mob/new_player)) continue if(findtext(message," snores.")) //Because we have so many sleeping people. - continue + break if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index f0407f0ec3f..6dff94c60c3 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -482,9 +482,9 @@ if (m_type & 1) - for (var/mob/O in viewers(src, null)) + for (var/mob/O in get_mobs_in_view(world.view,src)) O.show_message(message, m_type) else if (m_type & 2) - for (var/mob/O in hearers(src.loc, null)) + for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src))) O.show_message(message, m_type) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a8f55c066f8..dadf5a4a8c5 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!=CONSCIOUS) //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/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 1cf5788612d..cf91b4b43a8 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -55,4 +55,6 @@ var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. - var/xylophone = 0 //For the spoooooooky xylophone cooldown \ No newline at end of file + var/xylophone = 0 //For the spoooooooky xylophone cooldown + + var/mob/remoteview_target = null diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 92522f701be..45cca8c29f2 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1004,7 +1004,8 @@ proc/handle_chemicals_in_body() if(reagents) reagents.metabolize(src) - if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist +// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist + if(PLANT in mutations) var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing if(isturf(loc)) //else, there's considered to be no light var/turf/T = loc @@ -1050,7 +1051,8 @@ if(overeatduration > 1) overeatduration -= 2 //doubled the unfat rate - if(dna && dna.mutantrace == "plant") +// if(dna && dna.mutantrace == "plant") + if(PLANT in mutations) if(nutrition < 200) take_overall_damage(2,0) @@ -1295,9 +1297,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 = 8 else see_in_dark = 2 @@ -1470,7 +1476,12 @@ if(machine) if(!machine.check_eye(src)) reset_view(null) else - if(!(mRemote in mutations) && !client.adminobs) + var/isRemoteObserve = 0 + if((mRemote in mutations) && remoteview_target) + if(remoteview_target.stat==CONSCIOUS) + isRemoteObserve = 1 + if(!isRemoteObserve && !client.adminobs) + remoteview_target = null reset_view(null) return 1 diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 13c2a87ac08..b81fe7ecbbc 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -218,107 +218,133 @@ 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(48,224,40) + 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) + var/list/TONE = ReadRGB(hulk_color_mod) + stand_icon.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3])) + 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) + var/list/TONE = ReadRGB(hulk_color_mod) + temp.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3])) + else if(plant) + temp.ColorTone(plant_color_mod) + + //That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST + //And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part) + 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 +443,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/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 1d7a7705ec4..4c35e671d04 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -147,24 +147,7 @@ return 1 if(href_list["ready"]) - var/num_old_slots = GetAvailableAlienPlayerSlots() - var/new_slots = num_old_slots - if(!ready) - if(num_old_slots >= 1 || preferences.species == "Human") - ready = 1 - new_slots = GetAvailableAlienPlayerSlots() - else - src << "\red Unable to declare ready. Too many players have already elected to play as aliens." - else - ready = 0 - new_slots = GetAvailableAlienPlayerSlots() - - if(num_old_slots < 1 && new_slots >= 1) - for(var/mob/new_player/N in world) - N << "\blue A new alien player slot has opened." - else if(num_old_slots >= 1 && new_slots < 1) - for(var/mob/new_player/N in world) - N << "\red New alien players can no longer enter the game." + ready = !ready if(href_list["refresh"]) src << browse(null, "window=playersetup") //closes the player setup window @@ -205,9 +188,6 @@ if(!is_alien_whitelisted(src, preferences.species) && config.usealienwhitelist) src << alert("You are currently not whitelisted to play [preferences.species].") return 0 - else if(GetAvailableAlienPlayerSlots() < 1) - src << "\red Unable to join game. Too many players have already joined as aliens." - return 0 LateChoices() @@ -356,15 +336,10 @@ src << alert("[rank] is not available. Please try another.") return 0 - var/num_old_slots = GetAvailableAlienPlayerSlots() - var/new_slots = num_old_slots if(preferences.species != "Human") if(!is_alien_whitelisted(src, preferences.species) && config.usealienwhitelist) src << alert("You are currently not whitelisted to play [preferences.species].") return 0 - else if(num_old_slots < 1) - src << "\red Unable to join game. Too many players have already joined as aliens." - return 0 job_master.AssignRole(src, rank, 1) @@ -384,14 +359,6 @@ ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn AnnounceArrival(character, rank) - new_slots = GetAvailableAlienPlayerSlots() - if(num_old_slots < 1 && new_slots >= 1) - for(var/mob/new_player/N in world) - N << "\blue A new alien player slot has opened." - else if(num_old_slots >= 1 && new_slots < 1) - for(var/mob/new_player/N in world) - N << "\red New alien players can no longer enter the game." - else character.Robotize() del(src) @@ -492,22 +459,3 @@ proc/close_spawn_windows() src << browse(null, "window=latechoices") //closes late choices window src << browse(null, "window=playersetup") //closes the player setup window - -//limits the number of alien players in a game -/proc/GetAvailableAlienPlayerSlots() - if(!config.limitalienplayers) - return 9999 - - var/num_players = 0 - - //check new players - for(var/mob/new_player/N in world) - if(N.preferences && N.ready) - num_players++ - - //check players already spawned, only count humans or aliens - for(var/mob/living/carbon/human/H in world) - if(H.ckey) - num_players++ - - return round(num_players * (config.alien_to_human_ratio / 100)) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 8fff49211e6..c5447698f18 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -119,6 +119,8 @@ if(!unmarked || !C.powernet) if(C.d1 == fdir || C.d2 == fdir) . += C + else if(C.d1 == turn(C.d2, 180)) + . += C return . diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 7225b022cf0..99be701f987 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -79,7 +79,8 @@ on_hit(var/atom/target, var/blocked = 0) var/mob/living/M = target - if(ishuman(target) && M.dna && M.dna.mutantrace == "plant") //Plantmen possibly get mutated and damaged by the rays. +// if(ishuman(target) && M.dna && M.dna.mutantrace == "plant") //Plantmen possibly get mutated and damaged by the rays. + if(ishuman(target) && (PLANT in M.mutations)) //Plantmen possibly get mutated and damaged by the rays. if(prob(15)) M.apply_effect((rand(30,80)),IRRADIATE) M.Weaken(5) @@ -116,7 +117,8 @@ on_hit(var/atom/target, var/blocked = 0) var/mob/M = target - if(ishuman(target) && M.dna && M.dna.mutantrace == "plant") //These rays make plantmen fat. +// if(ishuman(target) && M.dna && M.dna.mutantrace == "plant") //These rays make plantmen fat. + if(ishuman(target) && (PLANT in M.mutations)) //These rays make plantmen fat. if(M.nutrition < 500) //sanity check M.nutrition += 30 else if (istype(target, /mob/living/carbon/)) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 5d140703ac2..355ee6a84d9 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1146,7 +1146,8 @@ datum if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.dna) - if(H.dna.mutantrace == "plant") //plantmen take a LOT of damage +// if(H.dna.mutantrace == "plant") //plantmen take a LOT of damage + if(PLANT in H.mutations) //plantmen take a LOT of damage H.adjustToxLoss(10) plasma diff --git a/code/setup.dm b/code/setup.dm index 731245a5402..3837273bd45 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -351,6 +351,7 @@ var/MAX_EXPLOSION_RANGE = 14 //2spooky #define SKELETON 29 +#define PLANT 30 // Other Mutations: #define mNobreath 100 // no need to breathe @@ -595,3 +596,6 @@ var/list/TAGGERLOCATIONS = list("Disposals", #define HOSTILE_STANCE_ATTACK 3 #define HOSTILE_STANCE_ATTACKING 4 #define HOSTILE_STANCE_TIRED 5 + +#define LEFT 1 +#define RIGHT 2 diff --git a/icons/mob/human_races/r_human.dmi b/icons/mob/human_races/r_human.dmi new file mode 100644 index 00000000000..16324b2bee5 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