diff --git a/code/__HELPERS/traits.dm b/code/__HELPERS/traits.dm index 5534c19cdd1..b92fb82f9af 100644 --- a/code/__HELPERS/traits.dm +++ b/code/__HELPERS/traits.dm @@ -164,6 +164,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_BLOODCRAWL_EAT "bloodcrawl_eat" #define TRAIT_DWARF "dwarf" #define TRAIT_SILENT_FOOTSTEPS "silent_footsteps" //makes your footsteps completely silent +#define TRAIT_MESON_VISION "meson_vision" +#define TRAIT_FLASH_PROTECTION "flash_protection" +#define TRAIT_NIGHT_VISION "night_vision" #define TRAIT_COMIC_SANS "comic_sans" #define TRAIT_NOFINGERPRINTS "no_fingerprints" diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index 1119ac364cc..2c49057e636 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -5,7 +5,6 @@ GLOBAL_VAR_INIT(deafblock, 0) GLOBAL_VAR_INIT(hulkblock, 0) GLOBAL_VAR_INIT(teleblock, 0) GLOBAL_VAR_INIT(fireblock, 0) -GLOBAL_VAR_INIT(xrayblock, 0) GLOBAL_VAR_INIT(clumsyblock, 0) GLOBAL_VAR_INIT(fakeblock, 0) GLOBAL_VAR_INIT(coughblock, 0) @@ -30,6 +29,9 @@ GLOBAL_VAR_INIT(hallucinationblock, 0) GLOBAL_VAR_INIT(noprintsblock, 0) GLOBAL_VAR_INIT(shockimmunityblock, 0) GLOBAL_VAR_INIT(smallsizeblock, 0) +GLOBAL_VAR_INIT(mesonblock, 0) +GLOBAL_VAR_INIT(noflashblock, 0) +GLOBAL_VAR_INIT(nightvisionblock, 0) /////////////////////////////// // Goon Stuff diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index 39551da14b6..90840095938 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -46,6 +46,9 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_DWARF" = TRAIT_DWARF, "TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS, "TRAIT_ALCOHOL_TOLERANCE" = TRAIT_ALCOHOL_TOLERANCE, + "TRAIT_MESON_VISION" = TRAIT_MESON_VISION, + "TRAIT_FLASH_PROTECTION" = TRAIT_FLASH_PROTECTION, + "TRAIT_NIGHT_VISION" = TRAIT_NIGHT_VISION, "TRAIT_COMIC_SANS" = TRAIT_COMIC_SANS, "TRAIT_NOFINGERPRINTS" = TRAIT_NOFINGERPRINTS, diff --git a/code/game/dna/mutations/disabilities.dm b/code/game/dna/mutations/disabilities.dm index bcb11eb1631..a03c686140a 100644 --- a/code/game/dna/mutations/disabilities.dm +++ b/code/game/dna/mutations/disabilities.dm @@ -140,12 +140,16 @@ /datum/mutation/disability/colourblindness/activate(mob/M) ..() M.update_client_colour() //Handle the activation of the colourblindness on the mob. - M.update_icons() //Apply eyeshine as needed. + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.update_misc_effects() /datum/mutation/disability/colourblindness/deactivate(mob/M) ..() M.update_client_colour() //Handle the deactivation of the colourblindness on the mob. - M.update_icons() //Remove eyeshine as needed. + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.update_misc_effects() /datum/mutation/disability/deaf name = "Deafness" diff --git a/code/game/dna/mutations/powers.dm b/code/game/dna/mutations/powers.dm index 3d2f991acb6..20c37357c50 100644 --- a/code/game/dna/mutations/powers.dm +++ b/code/game/dna/mutations/powers.dm @@ -158,28 +158,6 @@ M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH //temporary fix until the problem can be solved. to_chat(M, "You suddenly feel very weak.") -/datum/mutation/xray - name = "X-Ray Vision" - activation_messages = list("The walls suddenly disappear.") - deactivation_messages = list("The walls around you re-appear.") - instability = GENE_INSTABILITY_MAJOR - traits_to_add = list(TRAIT_XRAY_VISION) - activation_prob = 15 - -/datum/mutation/xray/New() - ..() - block = GLOB.xrayblock - -/datum/mutation/xray/activate(mob/living/M) - ..() - M.update_sight() - M.update_icons() //Apply eyeshine as needed. - -/datum/mutation/xray/deactivate(mob/living/M) - ..() - M.update_sight() - M.update_icons() //Remove eyeshine as needed. - /datum/mutation/tk name = "Telekenesis" activation_messages = list("You feel smarter.") @@ -1181,3 +1159,58 @@ else H.remoteview_target = null H.reset_perspective() + +/datum/mutation/meson_vision + name = "Meson Vision" + activation_messages = list("More information seems to reach your eyes...") + deactivation_messages = list("The amount of information reaching your eyes fades...") + instability = GENE_INSTABILITY_MINOR + traits_to_add = list(TRAIT_MESON_VISION) + +/datum/mutation/meson_vision/New() + ..() + block = GLOB.mesonblock + +/datum/mutation/meson_vision/activate(mob/living/M) + ..() + M.update_sight() + +/datum/mutation/meson_vision/deactivate(mob/living/M) + ..() + M.update_sight() + +/datum/mutation/night_vision + name = "Night Vision" + activation_messages = list("Were the lights always that bright?") + deactivation_messages = list("The ambient light level returns to normal...") + instability = GENE_INSTABILITY_MODERATE + traits_to_add = list(TRAIT_NIGHT_VISION) + +/datum/mutation/night_vision/New() + ..() + block = GLOB.nightvisionblock + +/datum/mutation/night_vision/activate(mob/living/M) + ..() + M.update_sight() + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.update_misc_effects() + +/datum/mutation/night_vision/deactivate(mob/living/M) + ..() + M.update_sight() + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.update_misc_effects() + +/datum/mutation/flash_protection + name = "Flash Protection" + activation_messages = list("You stop noticing the glare from lights...") + deactivation_messages = list("Lights begin glaring again...") + instability = GENE_INSTABILITY_MINOR + traits_to_add = list(TRAIT_FLASH_PROTECTION) + +/datum/mutation/flash_protection/New() + ..() + block = GLOB.noflashblock diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index d749f8ef553..7315b52b062 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -40,7 +40,6 @@ GLOB.hulkblock = getAssignedBlock("HULK", numsToAssign, DNA_HARD_BOUNDS, good=1) GLOB.teleblock = getAssignedBlock("TELE", numsToAssign, DNA_HARD_BOUNDS, good=1) GLOB.fireblock = getAssignedBlock("FIRE", numsToAssign, DNA_HARDER_BOUNDS, good=1) - GLOB.xrayblock = getAssignedBlock("XRAY", numsToAssign, DNA_HARDER_BOUNDS, good=1) GLOB.clumsyblock = getAssignedBlock("CLUMSY", numsToAssign) GLOB.fakeblock = getAssignedBlock("FAKE", numsToAssign) GLOB.coughblock = getAssignedBlock("COUGH", numsToAssign) @@ -49,6 +48,10 @@ GLOB.twitchblock = getAssignedBlock("TWITCH", numsToAssign) GLOB.nervousblock = getAssignedBlock("NERVOUS", numsToAssign) GLOB.wingdingsblock = getAssignedBlock("WINGDINGS", numsToAssign) + GLOB.mesonblock = getAssignedBlock("MESONS", numsToAssign, good=1) + GLOB.noflashblock = getAssignedBlock("NOFLASH", numsToAssign, DNA_HARDER_BOUNDS, good=1) + GLOB.nightvisionblock = getAssignedBlock("NIGHTVISION", numsToAssign, DNA_HARDER_BOUNDS, good=1) + // Bay muts GLOB.breathlessblock = getAssignedBlock("BREATHLESS", numsToAssign, DNA_HARD_BOUNDS, good=1) @@ -62,7 +65,6 @@ GLOB.noprintsblock = getAssignedBlock("NOPRINTS", numsToAssign, DNA_HARD_BOUNDS, good=1) GLOB.shockimmunityblock = getAssignedBlock("SHOCKIMMUNITY", numsToAssign, good=1) GLOB.smallsizeblock = getAssignedBlock("SMALLSIZE", numsToAssign, DNA_HARD_BOUNDS, good=1) - // // Goon muts ///////////////////////////////////////////// diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 46d347e0db7..02b53d2ff56 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -170,28 +170,6 @@ block = GLOB.hulkblock ..() -/obj/item/dnainjector/xraymut - name = "DNA-Injector (Xray)" - desc = "Finally you can see what the Captain does." - datatype = DNA2_BUF_SE - value = 0xFFF - forcedmutation = TRUE - -/obj/item/dnainjector/xraymut/Initialize() - block = GLOB.xrayblock - ..() - -/obj/item/dnainjector/antixray - name = "DNA-Injector (Anti-Xray)" - desc = "It will make you see harder." - datatype = DNA2_BUF_SE - value = 0x001 - forcedmutation = TRUE - -/obj/item/dnainjector/antixray/Initialize() - block = GLOB.xrayblock - ..() - /obj/item/dnainjector/firemut name = "DNA-Injector (Fire)" desc = "Gives you fire." diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 9fb4684f3ff..972ab8ed7bd 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -716,7 +716,6 @@ new /obj/item/stack/cable_coil(src) new /obj/item/restraints/handcuffs(src) - new /obj/item/dnainjector/xraymut(src) new /obj/item/dnainjector/firemut(src) new /obj/item/dnainjector/telemut(src) new /obj/item/dnainjector/hulkmut(src) diff --git a/code/modules/antagonists/wishgranter/wishgranter.dm b/code/modules/antagonists/wishgranter/wishgranter.dm index 92e6336d693..99efbc811f4 100644 --- a/code/modules/antagonists/wishgranter/wishgranter.dm +++ b/code/modules/antagonists/wishgranter/wishgranter.dm @@ -25,9 +25,6 @@ H.dna.SetSEState(GLOB.hulkblock, TRUE) singlemutcheck(H, GLOB.hulkblock, MUTCHK_FORCED) - H.dna.SetSEState(GLOB.xrayblock, TRUE) - singlemutcheck(H, GLOB.xrayblock, MUTCHK_FORCED) - H.dna.SetSEState(GLOB.fireblock, TRUE) singlemutcheck(H, GLOB.fireblock, MUTCHK_FORCED) diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index 2377deca844..511fbb92294 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -79,8 +79,6 @@ ADD_TRAIT(user, TRAIT_LASEREYES, "ww_wishgranter") user.dna.SetSEState(GLOB.fireblock, TRUE) singlemutcheck(user, GLOB.fireblock, MUTCHK_FORCED) - user.dna.SetSEState(GLOB.xrayblock, TRUE) - singlemutcheck(user, GLOB.xrayblock, MUTCHK_FORCED) if(ishuman(user)) var/mob/living/carbon/human/human = user if(!isshadowperson(human)) diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index 56c5c820559..f289a2dc8e1 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -104,21 +104,7 @@ new /obj/item/toy/katana(src) if(85 to 86) new /obj/item/defibrillator/compact(src) - if(87) //1% chance - new /obj/item/weed_extract(src) - if(88) - new /obj/item/organ/internal/brain(src) - if(89) - new /obj/item/organ/internal/brain/xeno(src) - if(90) - new /obj/item/organ/internal/heart(src) - if(91) - new /obj/item/soulstone/anybody(src) - if(92) - new /obj/item/katana(src) - if(93) - new /obj/item/dnainjector/xraymut(src) - if(94) + if(87 to 88) new /obj/item/storage/backpack/clown(src) new /obj/item/clothing/under/rank/clown(src) new /obj/item/clothing/shoes/clown_shoes(src) @@ -128,6 +114,18 @@ new /obj/item/toy/crayon/rainbow(src) new /obj/item/reagent_containers/spray/waterflower(src) new /obj/item/reagent_containers/food/drinks/bottle/bottleofbanana(src) + if(89) //1% chance + new /obj/item/weed_extract(src) + if(90) + new /obj/item/organ/internal/brain(src) + if(91) + new /obj/item/organ/internal/brain/xeno(src) + if(92) + new /obj/item/organ/internal/heart(src) + if(93) + new /obj/item/soulstone/anybody(src) + if(94) + new /obj/item/katana(src) if(95) new /obj/item/clothing/under/mime(src) new /obj/item/clothing/shoes/black(src) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 6b275922345..2fbe42a7ecc 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1205,6 +1205,14 @@ so that different stomachs can handle things in different ways VB*/ sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) see_in_dark = max(see_in_dark, 8) + if(HAS_TRAIT(src, TRAIT_MESON_VISION)) + sight |= SEE_TURFS + lighting_alpha = min(lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) + + if(HAS_TRAIT(src, TRAIT_NIGHT_VISION)) + see_in_dark = max(see_in_dark, 8) + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 7d1ae80a955..f7cc37fbd8b 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -894,13 +894,21 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(!isnull(H.vision_type.lighting_alpha)) H.lighting_alpha = min(H.vision_type.lighting_alpha, H.lighting_alpha) - if(HAS_TRAIT(src, TRAIT_THERMAL_VISION)) + if(HAS_TRAIT(H, TRAIT_MESON_VISION)) + H.sight |= SEE_TURFS + H.lighting_alpha = min(H.lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) + + if(HAS_TRAIT(H, TRAIT_THERMAL_VISION)) H.sight |= (SEE_MOBS) H.lighting_alpha = min(H.lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) if(HAS_TRAIT(H, TRAIT_XRAY_VISION)) H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + if(HAS_TRAIT(H, TRAIT_NIGHT_VISION)) + H.see_in_dark = max(H.see_in_dark, 8) + H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + if(H.has_status_effect(STATUS_EFFECT_SUMMONEDGHOST)) H.see_invisible = SEE_INVISIBLE_OBSERVER diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index bd0aad32dac..148e73e873f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -760,7 +760,7 @@ //called when the mob receives a bright flash /mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash) - if(check_eye_prot() < intensity && (override_blindness_check || !HAS_TRAIT(src, TRAIT_BLIND))) + if(check_eye_prot() < intensity && (override_blindness_check || !HAS_TRAIT(src, TRAIT_BLIND)) && !HAS_TRAIT(src, TRAIT_FLASH_PROTECTION)) overlay_fullscreen("flash", type) addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25) return 1 diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 996817666ca..e2ac3506855 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -221,7 +221,7 @@ return var/mob/living/carbon/human/H = user var/immune = istype(H.glasses, /obj/item/clothing/glasses/meson) - if(!immune && (get_dist(user, src) < HALLUCINATION_RANGE(power))) + if(!immune && !HAS_TRAIT(H, TRAIT_MESON_VISION) && (get_dist(user, src) < HALLUCINATION_RANGE(power))) . += "You get headaches just from looking at it." /obj/machinery/power/supermatter_crystal/detailed_examine() @@ -537,7 +537,7 @@ //Makes em go mad and accumulate rads. for(var/mob/living/carbon/human/l in view(src, HALLUCINATION_RANGE(power))) // If they can see it without mesons on. Bad on them. - if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) + if(!istype(l.glasses, /obj/item/clothing/glasses/meson) && !HAS_TRAIT(l, TRAIT_MESON_VISION)) var/D = sqrt(1 / max(1, get_dist(l, src))) l.hallucination += power * hallucination_power * D l.hallucination = clamp(l.hallucination, 0, 200)