diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index aa6d2f2625c..a6b346ee1c2 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -332,3 +332,4 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new()) /obj/machinery/atmospherics/update_remote_sight(mob/user) user.sight |= (SEE_TURFS|BLIND) + . = ..() diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 56d954313cc..0063feae9cf 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -43,6 +43,7 @@ /mob/proc/create_mob_hud() if(client && !hud_used) hud_used = new /datum/hud(src) + update_sight() /datum/hud/New(mob/owner) mymob = owner diff --git a/code/datums/vision_override.dm b/code/datums/vision_override.dm index 140ceb8d5fa..86aab6d65ec 100644 --- a/code/datums/vision_override.dm +++ b/code/datums/vision_override.dm @@ -1,13 +1,15 @@ /datum/vision_override var/name = "vision override" - var/see_in_dark = 0 - var/see_invisible = 0 - var/light_sensitive = 0 + var/sight_flags = 0 + var/see_in_dark = 0 + var/lighting_alpha + + var/light_sensitive = 0 /datum/vision_override/nightvision see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE /datum/vision_override/nightvision/thermals sight_flags = SEE_MOBS diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e46c1290637..f30fa412a8f 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -675,6 +675,7 @@ var/list/blood_splatter_icons = list() //the sight changes to give to the mob whose perspective is set to that atom (e.g. A mob with nightvision loses its nightvision while looking through a normal camera) /atom/proc/update_remote_sight(mob/living/user) + sync_lighting_plane_alpha() return /atom/proc/checkpass(passflag) diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index e6e9dfe4196..bf2143b9784 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -178,7 +178,8 @@ environment_smash = ENVIRONMENT_SMASH_RWALLS pressure_resistance = 100 //100 kPa difference required to push throw_pressure_limit = 120 //120 kPa difference required to throw - + see_in_dark = 8 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE /mob/living/simple_animal/hostile/blob/blobbernaut/blob_act() return diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index ca1dffbfa74..02af98f74c5 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -5,8 +5,8 @@ icon_state = "marker" see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM invisibility = INVISIBILITY_OBSERVER + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE pass_flags = PASSBLOB faction = list("blob") @@ -20,7 +20,6 @@ var/is_offspring = FALSE var/datum/reagent/blob/blob_reagent_datum = new/datum/reagent/blob() var/list/blob_mobs = list() - var/ghostimage = null /mob/camera/blob/New() var/new_name = "[initial(name)] ([rand(1, 999)])" @@ -35,9 +34,6 @@ blob_core.adjustcolors(blob_reagent_datum.color) color = blob_reagent_datum.complementary_color - ghostimage = image(src.icon,src,src.icon_state) - ghost_darkness_images |= ghostimage //so ghosts can see the blob cursor when they disable darkness - updateallghostimages() ..() /mob/camera/blob/Life(seconds, times_fired) @@ -45,13 +41,6 @@ qdel(src) ..() -/mob/camera/blob/Destroy() - if(ghostimage) - ghost_darkness_images -= ghostimage - QDEL_NULL(ghostimage) - updateallghostimages() - return ..() - /mob/camera/blob/Login() ..() sync_mind() diff --git a/code/game/gamemodes/devil/imp/imp.dm b/code/game/gamemodes/devil/imp/imp.dm index b012edc1930..e863eaf1f6a 100644 --- a/code/game/gamemodes/devil/imp/imp.dm +++ b/code/game/gamemodes/devil/imp/imp.dm @@ -29,7 +29,7 @@ melee_damage_lower = 10 melee_damage_upper = 15 see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE var/boost var/playstyle_string = "You are an imp, a mischevious creature from hell. You are the lowest rank on the hellish totem pole \ Though you are not obligated to help, perhaps by aiding a higher ranking devil, you might just get a promotion. However, you are incapable \ diff --git a/code/game/gamemodes/devil/true_devil/_true_devil.dm b/code/game/gamemodes/devil/true_devil/_true_devil.dm index 18058b42279..a6c04c5dcc0 100644 --- a/code/game/gamemodes/devil/true_devil/_true_devil.dm +++ b/code/game/gamemodes/devil/true_devil/_true_devil.dm @@ -30,22 +30,6 @@ E.insert() ..() - -/mob/living/carbon/true_devil/update_sight() - if(stat == DEAD) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - else - sight = (SEE_TURFS | SEE_OBJS) - see_in_dark = 2 - see_invisible = SEE_INVISIBLE_LIVING - - if(see_override) - see_invisible = see_override - // inventory system could use some love /mob/living/carbon/true_devil/put_in_hands(obj/item/W) if(!W) diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 830ae26f3c1..c44150a8450 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -496,7 +496,7 @@ return var/upgradedcams = 0 - see_override = SEE_INVISIBLE_MINIMUM //Night-vision, without which X-ray would be very limited in power. + see_override = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE //Night-vision, without which X-ray would be very limited in power. update_sight() for(var/obj/machinery/camera/C in cameranet.cameras) diff --git a/code/game/gamemodes/miniantags/guardian/types/ranged.dm b/code/game/gamemodes/miniantags/guardian/types/ranged.dm index 0979ed45a6c..641d44dae2e 100644 --- a/code/game/gamemodes/miniantags/guardian/types/ranged.dm +++ b/code/game/gamemodes/miniantags/guardian/types/ranged.dm @@ -16,7 +16,7 @@ ranged = 1 rapid = 1 range = 13 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE see_in_dark = 8 playstyle_string = "As a Ranged type, you have only light damage resistance, but are capable of spraying shards of crystal at incredibly high speed. You can also deploy surveillance snares to monitor enemy movement. Finally, you can switch to scout mode, in which you can't attack, but can move without limit." magic_fluff_string = "..And draw the Sentinel, an alien master of ranged combat." @@ -53,12 +53,22 @@ to_chat(src, "You have to be recalled to toggle modes!") /mob/living/simple_animal/hostile/guardian/ranged/ToggleLight() - if(see_invisible == SEE_INVISIBLE_MINIMUM) - to_chat(src, "You deactivate your night vision.") - see_invisible = SEE_INVISIBLE_LIVING - else - to_chat(src, "You activate your night vision.") - see_invisible = SEE_INVISIBLE_MINIMUM + var/msg + switch(lighting_alpha) + if (LIGHTING_PLANE_ALPHA_VISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + msg = "You activate your night vision." + if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + msg = "You increase your night vision." + if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE + msg = "You maximize your night vision." + else + lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + msg = "You deactivate your night vision." + + to_chat(src, "[msg]") /mob/living/simple_animal/hostile/guardian/ranged/verb/Snare() set name = "Set Surveillance Trap" diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index 3bb36870d31..bcaecfb0eea 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -27,7 +27,7 @@ melee_damage_lower = 20 melee_damage_upper = 20 see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE idle_vision_range = 1 // Only attack when target is close wander = 0 attacktext = "glomps" diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index bde3f7ee8e9..2096522ba0b 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -18,7 +18,7 @@ health = INFINITY //Revenants don't use health, they use essence instead maxHealth = INFINITY see_in_dark = 8 - see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE universal_understand = 1 response_help = "passes through" response_disarm = "swings at" @@ -51,7 +51,6 @@ var/draining = 0 //If the revenant is draining someone. var/list/drained_mobs = list() //Cannot harvest the same mob twice var/perfectsouls = 0 //How many perfect, regen-cap increasing souls the revenant has. - var/image/ghostimage = null //Visible to ghost with darkness off /mob/living/simple_animal/revenant/Life(seconds, times_fired) @@ -91,13 +90,6 @@ if(essence == 0) to_chat(src, "You feel your essence fraying!") -/mob/living/simple_animal/revenant/update_sight() - if(!client) - return - if(stat == DEAD) - grant_death_vision() - return - /mob/living/simple_animal/revenant/say(message) if(!message) return @@ -120,9 +112,6 @@ /mob/living/simple_animal/revenant/New() ..() - ghostimage = image(src.icon,src,src.icon_state) - ghost_darkness_images |= ghostimage - updateallghostimages() remove_from_all_data_huds() addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 15 seconds to put in a ghost (Or wait 15 seconds before giving it objectives) @@ -196,8 +185,6 @@ . = ..() if(!.) return FALSE - ghost_darkness_images -= ghostimage - updateallghostimages() to_chat(src, "NO! No... it's too late, you can feel your essence breaking apart...") notransform = 1 diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index cdb55aa1b31..34bf06f07f7 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -110,8 +110,6 @@ message = "You toggle your night vision." action_icon_state = "r_nightvision" action_background_icon_state = "bg_revenant" - non_night_vision = INVISIBILITY_REVENANT - night_vision = SEE_INVISIBLE_OBSERVER_NOLIGHTING //Transmit: the revemant's only direct way to communicate. Sends a single message silently to a single mob /obj/effect/proc_holder/spell/targeted/revenant_transmit diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index 7e74de27267..68b886207e3 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -33,7 +33,7 @@ melee_damage_lower = 30 melee_damage_upper = 30 see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE var/boost = 0 bloodcrawl = BLOODCRAWL_EAT diff --git a/code/game/gamemodes/shadowling/ascendant_shadowling.dm b/code/game/gamemodes/shadowling/ascendant_shadowling.dm index 51f4d147bba..9eeadeaba0f 100644 --- a/code/game/gamemodes/shadowling/ascendant_shadowling.dm +++ b/code/game/gamemodes/shadowling/ascendant_shadowling.dm @@ -12,7 +12,7 @@ speed = 0 var/phasing = 0 see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE universal_speak = 1 diff --git a/code/game/gamemodes/shadowling/shadowling_items.dm b/code/game/gamemodes/shadowling/shadowling_items.dm index 500c3ee25c5..69f5688829c 100644 --- a/code/game/gamemodes/shadowling/shadowling_items.dm +++ b/code/game/gamemodes/shadowling/shadowling_items.dm @@ -81,4 +81,5 @@ unacidable = 1 flash_protect = -1 vision_flags = SEE_MOBS + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE flags = ABSTRACT | NODROP \ No newline at end of file diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm index aff40200c6b..deb054f6d3e 100644 --- a/code/game/gamemodes/wizard/rightandwrong.dm +++ b/code/game/gamemodes/wizard/rightandwrong.dm @@ -146,7 +146,8 @@ H.mutations.Add(XRAY) H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) H.see_in_dark = 8 - H.see_invisible = SEE_INVISIBLE_LEVEL_TWO + H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + H.update_sight() to_chat(H, "The walls suddenly disappear.") if("voodoo") new /obj/item/voodoo(get_turf(H)) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 66cdff69b3f..e33848b61c5 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -333,7 +333,7 @@ user.mutations.Add(XRAY) user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) user.see_in_dark = 8 - user.see_invisible = SEE_INVISIBLE_LEVEL_TWO + user.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE to_chat(user, "The walls suddenly disappear.") return 1 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 7535381197a..a21b399f5db 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -382,14 +382,17 @@ user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2) /obj/machinery/camera/update_remote_sight(mob/living/user) - user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras if(isXRay()) user.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) user.see_in_dark = max(user.see_in_dark, 8) + user.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE else - user.sight = 0 - user.see_in_dark = 2 - return 1 + user.sight = initial(user.sight) + user.see_in_dark = initial(user.see_in_dark) + user.lighting_alpha = initial(user.lighting_alpha) + + ..() + return TRUE /obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets. var/turf/prev_turf diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index f278ee2adda..d4175b10ae1 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -72,7 +72,7 @@ // called when turf state changes // hide the object if turf is intact /obj/machinery/navbeacon/hide(intact) - invisibility = intact ? INVISIBILITY_MAXIMUM : SEE_INVISIBLE_MINIMUM + invisibility = intact ? INVISIBILITY_MAXIMUM : 0 updateicon() // update the icon_state diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 6cfd1d63942..45e36d9a30c 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1518,6 +1518,8 @@ if(user == occupant) user.sight |= occupant_sight_flags + ..() + /obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y) if(!no_effect) if(selected) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 24c8cbcd3b7..0a44c439fc0 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -76,7 +76,7 @@ var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes) if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind to_chat(user, "[M]'s pupils are unresponsive to the light!") - else if((XRAY in M.mutations) || eyes.get_dark_view() >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms). + else if((XRAY in M.mutations) || eyes.see_in_dark >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms). to_chat(user, "[M]'s pupils glow eerily!") else //they're okay! if(M.flash_eyes(visual = 1)) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 484151de797..5e103f14c72 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -154,6 +154,7 @@ var/darkness_view = 0 //Base human is 2 var/invis_view = SEE_INVISIBLE_LIVING var/invis_override = 0 + var/lighting_alpha var/emagged = 0 var/list/color_view = null//overrides client.color while worn @@ -281,9 +282,11 @@ BLIND // can't see anything slot_flags = SLOT_HEAD var/blockTracking // Do we block AI tracking? var/HUDType = null - var/darkness_view = 0 - var/helmet_goggles_invis_view = 0 + var/vision_flags = 0 + var/darkness_view = 0 + var/lighting_alpha + var/can_toggle = null //Mask diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index b527bb2717d..6a7da898b25 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -37,7 +37,7 @@ item_state = "glasses" origin_tech = "magnets=1;engineering=2" vision_flags = SEE_TURFS - invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE prescription_upgradable = 1 species_fit = list("Vox") sprite_sheets = list( @@ -53,6 +53,7 @@ item_state = "glasses" origin_tech = "magnets=4;engineering=5;plasmatech=4" darkness_view = 8 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE prescription_upgradable = 0 /obj/item/clothing/glasses/meson/prescription @@ -104,7 +105,7 @@ icon_state = "nvpurple" item_state = "glasses" darkness_view = 8 - invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE //don't render darkness while wearing these /obj/item/clothing/glasses/janitor name = "Janitorial Goggles" @@ -123,7 +124,7 @@ item_state = "glasses" origin_tech = "materials=4;magnets=4;plasmatech=4;engineering=4" darkness_view = 8 - invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE //don't render darkness while wearing these species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/eyes.dmi', @@ -382,6 +383,7 @@ item_state = "glasses" origin_tech = "magnets=3" vision_flags = SEE_MOBS + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE flash_protect = -1 species_fit = list("Vox") sprite_sheets = list( @@ -389,18 +391,18 @@ "Grey" = 'icons/mob/species/grey/eyes.dmi' ) - emp_act(severity) - if(istype(src.loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/M = src.loc - to_chat(M, "The Optical Thermal Scanner overloads and blinds you!") - if(M.glasses == src) - M.EyeBlind(3) - M.EyeBlurry(5) - if(!(M.disabilities & NEARSIGHTED)) - M.BecomeNearsighted() - spawn(100) - M.CureNearsighted() - ..() +/obj/item/clothing/glasses/thermal/emp_act(severity) + if(istype(src.loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/M = src.loc + to_chat(M, "The Optical Thermal Scanner overloads and blinds you!") + if(M.glasses == src) + M.EyeBlind(3) + M.EyeBlurry(5) + if(!(M.disabilities & NEARSIGHTED)) + M.BecomeNearsighted() + spawn(100) + M.CureNearsighted() + ..() /obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete name = "Optical Meson Scanner" @@ -507,7 +509,7 @@ scan_reagents = 1 flags = NODROP flags_cover = null - invis_view = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE /obj/item/clothing/glasses/godeye/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, src) && W != src && W.loc == user) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index d778ea5e63a..ad775b04c14 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -51,7 +51,7 @@ item_state = "glasses" origin_tech = "magnets=4;biotech=4;plasmatech=4;engineering=5" darkness_view = 8 - invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE prescription_upgradable = 0 /obj/item/clothing/glasses/hud/diagnostic @@ -73,7 +73,7 @@ item_state = "glasses" origin_tech = "magnets=4;powerstorage=4;plasmatech=4;engineering=5" darkness_view = 8 - invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE prescription_upgradable = 0 /obj/item/clothing/glasses/hud/security @@ -105,6 +105,7 @@ icon_state = "jensenshades" item_state = "jensenshades" vision_flags = SEE_MOBS + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE /obj/item/clothing/glasses/hud/security/night name = "\improper Night Vision Security HUD" @@ -112,7 +113,7 @@ icon_state = "securityhudnight" origin_tech = "magnets=4;combat=4;plasmatech=4;engineering=5" darkness_view = 8 - invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE //don't render darkness while wearing these prescription_upgradable = 0 /obj/item/clothing/glasses/hud/security/sunglasses/read_only @@ -154,7 +155,7 @@ icon_state = "hydroponichudnight" item_state = "glasses" darkness_view = 8 - invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE prescription_upgradable = 0 /obj/item/clothing/glasses/hud/security/tajblind diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 35b4b6a75e0..6e3a0302cbc 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -50,6 +50,7 @@ desc = "A helmet with a built-in thermal scanning visor." icon_state = "helmetthermals" vision_flags = SEE_MOBS + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE /obj/item/clothing/head/helmet/meson name = "meson visor helmet" @@ -67,7 +68,7 @@ name = "night-vision helmet" desc = "A helmet with a built-in pair of night vision goggles." icon_state = "helmetNVG" - helmet_goggles_invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE //don't render darkness while wearing these /obj/item/clothing/head/helmet/alt name = "bulletproof helmet" diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 8a79b192d0c..6b86d8f5d5c 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -47,7 +47,7 @@ max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT unacidable = 1 vision_flags = SEE_MOBS - helmet_goggles_invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE //don't render darkness while wearing these HUDType = MEDHUD strip_delay = 130 diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index 878a3951202..5a39264e668 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -184,42 +184,46 @@ generic_pixel_x = 1 vehicle_move_delay = 1 -// Wisp Lantern +//Wisp Lantern /obj/item/wisp_lantern name = "spooky lantern" desc = "This lantern gives off no light, but is home to a friendly wisp." icon = 'icons/obj/lighting.dmi' icon_state = "lantern-blue" + item_state = "lantern" var/obj/effect/wisp/wisp /obj/item/wisp_lantern/attack_self(mob/user) if(!wisp) to_chat(user, "The wisp has gone missing!") + icon_state = "lantern" return + if(wisp.loc == src) to_chat(user, "You release the wisp. It begins to bob around your head.") - user.sight |= SEE_MOBS icon_state = "lantern" - wisp.orbit(user, 20, forceMove = TRUE) + wisp.orbit(user, 20) + user.update_sight() feedback_add_details("wisp_lantern","F") // freed else to_chat(user, "You return the wisp to the lantern.") + var/mob/target if(wisp.orbiting) - var/atom/A = wisp.orbiting - if(isliving(A)) - var/mob/living/M = A - M.sight &= ~SEE_MOBS - to_chat(M, "Your vision returns to normal.") - + target = wisp.orbiting wisp.stop_orbit() - wisp.loc = src + wisp.forceMove(src) + + if (istype(target)) + target.update_sight() + to_chat(target, "Your vision returns to normal.") + icon_state = "lantern-blue" feedback_add_details("wisp_lantern","R") // returned -/obj/item/wisp_lantern/New() - ..() +/obj/item/wisp_lantern/Initialize() + . = ..() wisp = new(src) /obj/item/wisp_lantern/Destroy() @@ -228,19 +232,19 @@ qdel(wisp) else wisp.visible_message("[wisp] has a sad feeling for a moment, then it passes.") - return ..() + ..() /obj/effect/wisp name = "friendly wisp" desc = "Happy to light your way." icon = 'icons/obj/lighting.dmi' icon_state = "orb" - layer = ABOVE_ALL_MOB_LAYER - light_power = 1 light_range = 7 + layer = ABOVE_ALL_MOB_LAYER + var/sight_flags = SEE_MOBS + var/lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE //Red/Blue Cubes - /obj/item/warp_cube name = "blue cube" desc = "A mysterious blue cube." diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index cf8b897104c..08e7bf305ca 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -184,28 +184,6 @@ mode = MINEDRONE_COLLECT SetCollectBehavior() - -/mob/living/simple_animal/hostile/mining_drone/update_sight() - if(!client) - return - if(stat == DEAD) - grant_death_vision() - return - - if(mesons_active) - sight |= SEE_TURFS - see_invisible = SEE_INVISIBLE_MINIMUM - else - sight &= ~SEE_TURFS - see_invisible = SEE_INVISIBLE_LIVING - - see_in_dark = initial(see_in_dark) - - if(client.eye != src) - var/atom/A = client.eye - if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. - return - //Actions for sentient minebots /datum/action/innate/minedrone @@ -232,10 +210,16 @@ /datum/action/innate/minedrone/toggle_meson_vision/Activate() var/mob/living/simple_animal/hostile/mining_drone/user = owner - user.mesons_active = !user.mesons_active - user.update_sight() + if(user.sight & SEE_TURFS) + user.sight &= ~SEE_TURFS + user.lighting_alpha = initial(user.lighting_alpha) + else + user.sight |= SEE_TURFS + user.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - to_chat(user, "You toggle your meson vision [(user.mesons_active) ? "on" : "off"].") + user.sync_lighting_plane_alpha() + + to_chat(user, "You toggle your meson vision [(user.sight & SEE_TURFS) ? "on" : "off"].") /datum/action/innate/minedrone/toggle_mode name = "Toggle Mode" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index dfd4e1e3332..aaad280cc0d 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -666,14 +666,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set desc = "Toggles your ability to see things only ghosts can see, like other ghosts" set category = "Ghost" ghostvision = !(ghostvision) - updateghostsight() + update_sight() to_chat(usr, "You [(ghostvision?"now":"no longer")] have ghost vision.") /mob/dead/observer/verb/toggle_darkness() set name = "Toggle Darkness" set category = "Ghost" - seedarkness = !(seedarkness) - updateghostsight() + switch(lighting_alpha) + if (LIGHTING_PLANE_ALPHA_VISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE) + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE + else + lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + + update_sight() + +/mob/dead/observer/update_sight() + if (!ghostvision) + see_invisible = SEE_INVISIBLE_LIVING + else + see_invisible = SEE_INVISIBLE_OBSERVER + + updateghostimages() + ..() /mob/dead/observer/proc/updateghostsight() if(!seedarkness) @@ -681,7 +699,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp else see_invisible = SEE_INVISIBLE_OBSERVER if(!ghostvision) - see_invisible = SEE_INVISIBLE_LIVING; + see_invisible = SEE_INVISIBLE_LIVING + updateghostimages() /proc/updateallghostimages() diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 9c87b04b0e5..4d1d91696eb 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -6,7 +6,7 @@ gender = NEUTER dna = null alien_talk_understand = 1 - nightvision = 1 + var/nightvision = 1 var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie var/has_fine_manipulation = 0 var/move_delay_add = 0 // movement delay to add @@ -149,15 +149,17 @@ if(!nightvision) see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM - nightvision = 1 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + nightvision = TRUE usr.hud_used.nightvisionicon.icon_state = "nightvision1" - else if(nightvision == 1) + else if(nightvision) see_in_dark = 4 - see_invisible = 45 - nightvision = 0 + lighting_alpha = initial(lighting_alpha) + nightvision = FALSE usr.hud_used.nightvisionicon.icon_state = "nightvision0" + update_sight() + /mob/living/carbon/alien/assess_threat(var/mob/living/simple_animal/bot/secbot/judgebot, var/lasercolor) if(judgebot.emagged == 2) @@ -264,3 +266,35 @@ Des: Removes all infected images from the alien. return pick("xltrails_1", "xltrails_2") else return pick("xttrails_1", "xttrails_2") + +/mob/living/carbon/alien/update_sight() + if(!client) + return + if(stat == DEAD) + grant_death_vision() + return + + sight = SEE_MOBS + if(nightvision) + see_in_dark = 8 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + else + see_in_dark = initial(see_in_dark) + lighting_alpha = initial(lighting_alpha) + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + + for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) + sight |= E.vision_flags + if(E.see_in_dark) + see_in_dark = max(see_in_dark, E.see_in_dark) + if(E.see_invisible) + see_invisible = min(see_invisible, E.see_invisible) + if(!isnull(E.lighting_alpha)) + lighting_alpha = min(lighting_alpha, E.lighting_alpha) + + if(see_override) + see_invisible = see_override diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index d3ecc9e3e1c..a584f66dc97 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -28,33 +28,3 @@ //BREATH TEMPERATURE handle_breath_temperature(breath) - -/mob/living/carbon/alien/update_sight() - if(!client) - return - if(stat == DEAD) - grant_death_vision() - return - - sight = SEE_MOBS - if(nightvision) - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM - else - see_in_dark = 4 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - - if(client.eye != src) - var/atom/A = client.eye - if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. - return - - for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) - sight |= E.vision_flags - if(E.dark_view) - see_in_dark = max(see_in_dark, E.dark_view) - if(E.see_invisible) - see_invisible = min(see_invisible, E.see_invisible) - - if(see_override) - see_invisible = see_override diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 277bbbd8789..c1941c39a6e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -323,8 +323,8 @@ return var/extra_darkview = 0 - if(E.dark_view) - extra_darkview = max(E.dark_view - 2, 0) + if(E.see_in_dark) + extra_darkview = max(E.see_in_dark - 2, 0) extra_damage = extra_darkview var/light_amount = 10 // assume full brightness @@ -1129,4 +1129,37 @@ so that different stomachs can handle things in different ways VB*/ /mob/living/carbon/proc/shock_internal_organs(intensity) for(var/obj/item/organ/O in internal_organs) - O.shock_organ(intensity) \ No newline at end of file + O.shock_organ(intensity) + +/mob/living/carbon/update_sight() + if(!client) + return + + if(stat == DEAD) + grant_death_vision() + return + + sight = initial(sight) + lighting_alpha = initial(lighting_alpha) + + for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) + sight |= E.vision_flags + if(E.see_in_dark) + see_in_dark = max(see_in_dark, E.see_in_dark) + if(E.see_invisible) + see_invisible = min(see_invisible, E.see_invisible) + if(!isnull(E.lighting_alpha)) + lighting_alpha = min(lighting_alpha, E.lighting_alpha) + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + + if(XRAY in mutations) + sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + see_in_dark = 8 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + + if(see_override) + see_invisible = see_override \ 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 bd5817e8867..b20776419d2 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -545,6 +545,7 @@ /mob/living/carbon/human/update_sight() if(!client) return + if(stat == DEAD) grant_death_vision() return @@ -1427,11 +1428,7 @@ dna.species.on_species_gain(src) - see_in_dark = dna.species.get_resultant_darksight(src) - if(see_in_dark > 2) - see_invisible = SEE_INVISIBLE_LEVEL_ONE - else - see_invisible = SEE_INVISIBLE_LIVING + update_sight() dna.species.handle_dna(src) //Give them whatever special dna business they got. diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 69f898fb677..ba4f2fbbcf4 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -115,7 +115,7 @@ update_tint() if(G.prescription) update_nearsighted_effects() - if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view) + if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) update_sight() update_inv_glasses() update_client_colour() @@ -128,7 +128,7 @@ // Bandanas and paper hats go on the head but are not head clothing if(istype(I,/obj/item/clothing/head)) var/obj/item/clothing/head/hat = I - if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view) + if(hat.vision_flags || hat.darkness_view || !isnull(hat.lighting_alpha)) update_sight() head_update(I) update_inv_head() @@ -267,7 +267,7 @@ update_tint() if(G.prescription) update_nearsighted_effects() - if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view) + if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) update_sight() update_inv_glasses(redraw_mob) update_client_colour() @@ -283,7 +283,7 @@ // paper + bandanas if(istype(W, /obj/item/clothing/head)) var/obj/item/clothing/head/hat = W - if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view) + if(hat.vision_flags || hat.darkness_view || !isnull(hat.lighting_alpha)) update_sight() head_update(W) update_inv_head(redraw_mob) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index d9a501d2251..0b597c17a6f 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -39,8 +39,6 @@ var/siemens_coeff = 1 //base electrocution coefficient - var/invis_sight = SEE_INVISIBLE_LIVING - 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. @@ -630,22 +628,21 @@ It'll return null if the organ doesn't correspond, so include null checks when u return null return has_organ[organ_slot] -/datum/species/proc/get_resultant_darksight(mob/living/carbon/human/H) //Returns default value of 2 if the mob doesn't have eyes, otherwise it grabs the eyes darksight. - var/resultant_darksight = 2 +/datum/species/proc/update_sight(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes) if(eyes) - resultant_darksight = eyes.get_dark_view() - return resultant_darksight - -/datum/species/proc/update_sight(mob/living/carbon/human/H) - H.sight = initial(H.sight) - H.see_in_dark = get_resultant_darksight(H) - H.see_invisible = invis_sight + H.sight |= eyes.vision_flags + H.see_in_dark = eyes.see_in_dark + H.see_invisible = eyes.see_invisible + H.lighting_alpha = eyes.lighting_alpha + else + H.sight = initial(H.sight) + H.see_in_dark = initial(H.see_in_dark) + H.see_invisible = initial(H.see_invisible) + H.lighting_alpha = initial(H.lighting_alpha) if(H.see_in_dark > 2) //Preliminary see_invisible handling as per set_species() in code\modules\mob\living\carbon\human\human.dm. - H.see_invisible = SEE_INVISIBLE_LEVEL_ONE - else - H.see_invisible = SEE_INVISIBLE_LIVING + H.lighting_alpha = min(H.lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE) if(H.client && H.client.eye != H) var/atom/A = H.client.eye @@ -656,39 +653,43 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(H.mind.vampire.get_ability(/datum/vampire_passive/full)) H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS H.see_in_dark = 8 - H.see_invisible = SEE_INVISIBLE_MINIMUM + H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision)) H.sight |= SEE_MOBS + H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE for(var/obj/item/organ/internal/cyberimp/eyes/E in H.internal_organs) H.sight |= E.vision_flags - if(E.dark_view) - H.see_in_dark = E.dark_view + if(E.see_in_dark) + H.see_in_dark = max(H.see_in_dark, E.see_in_dark) if(E.see_invisible) H.see_invisible = min(H.see_invisible, E.see_invisible) + if(E.lighting_alpha) + H.lighting_alpha = min(H.lighting_alpha, E.lighting_alpha) - var/lesser_darkview_bonus = INFINITY // my glasses, I can't see without my glasses if(H.glasses) var/obj/item/clothing/glasses/G = H.glasses H.sight |= G.vision_flags - lesser_darkview_bonus = G.darkness_view + H.see_in_dark = max(G.darkness_view, H.see_in_dark) + if(G.invis_override) H.see_invisible = G.invis_override else H.see_invisible = min(G.invis_view, H.see_invisible) + + if(!isnull(G.lighting_alpha)) + H.lighting_alpha = min(G.lighting_alpha, H.lighting_alpha) // better living through hat trading if(H.head) if(istype(H.head, /obj/item/clothing/head)) var/obj/item/clothing/head/hat = H.head H.sight |= hat.vision_flags + H.see_in_dark = max(hat.darkness_view, H.see_in_dark) - if(hat.darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet. - lesser_darkview_bonus = min(hat.darkness_view,lesser_darkview_bonus) - - if(hat.helmet_goggles_invis_view) - H.see_invisible = min(hat.helmet_goggles_invis_view, H.see_invisible) + if(!isnull(hat.lighting_alpha)) + H.lighting_alpha = min(hat.lighting_alpha, H.lighting_alpha) if(istype(H.back, /obj/item/rig)) ///aghhh so snowflakey var/obj/item/rig/rig = H.back @@ -697,28 +698,33 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses) var/obj/item/clothing/glasses/G = rig.visor.vision.glasses if(istype(G)) - H.see_in_dark = (G.darkness_view ? G.darkness_view : get_resultant_darksight(H)) // Otherwise we keep our darkness view with togglable nightvision. - if(G.vision_flags) // MESONS - H.sight |= G.vision_flags - + H.sight |= G.vision_flags + H.see_in_dark = max(G.darkness_view, H.see_in_dark) H.see_invisible = min(G.invis_view, H.see_invisible) - if(lesser_darkview_bonus != INFINITY) - H.see_in_dark = max(lesser_darkview_bonus, H.see_in_dark) + if(!isnull(G.lighting_alpha)) + H.lighting_alpha = min(G.lighting_alpha, H.lighting_alpha) if(H.vision_type) - H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, get_resultant_darksight(H)) - H.see_invisible = H.vision_type.see_invisible - if(H.vision_type.light_sensitive) - H.weakeyes = 1 H.sight |= H.vision_type.sight_flags + H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark) + + if(!isnull(H.vision_type.lighting_alpha)) + H.lighting_alpha = min(H.vision_type.lighting_alpha, H.lighting_alpha) + + if(H.vision_type.light_sensitive) + H.weakeyes = TRUE if(XRAY in H.mutations) H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + H.see_in_dark = 8 + H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE if(H.see_override) //Override all H.see_invisible = H.see_override + H.sync_lighting_plane_alpha() + /datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source) if(abs(temperature - M.bodytemperature) > 10) //If our water and mob temperature varies by more than 10K, cool or/ heat them appropriately M.bodytemperature = (temperature + M.bodytemperature) * 0.5 //Approximation for gradual heating or cooling diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 48d8137092a..63f9f10dc71 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -343,36 +343,6 @@ Sleeping(2) return sleeping -/mob/living/carbon/update_sight() - if(!client) - return - if(stat == DEAD) - grant_death_vision() - return - - see_invisible = initial(see_invisible) - see_in_dark = initial(see_in_dark) - sight = initial(sight) - - if(XRAY in mutations) - grant_xray_vision() - - if(client.eye != src) - var/atom/A = client.eye - if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. - return - - for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) - sight |= E.vision_flags - if(E.dark_view) - see_in_dark = max(see_in_dark,E.dark_view) - if(E.see_invisible) - see_invisible = min(see_invisible, E.see_invisible) - - if(see_override) - see_invisible = see_override - - /mob/living/carbon/handle_hud_icons() return diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index d28e728c82c..35ab0402b0c 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -197,28 +197,15 @@ if(!remote_view && !client.adminobs) reset_perspective(null) -/mob/living/proc/update_sight() - if(stat == DEAD) - grant_death_vision() - return - // Gives a mob the vision of being dead /mob/living/proc/grant_death_vision() sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE see_in_dark = 8 see_invisible = SEE_INVISIBLE_OBSERVER - -// See through walls, dark, etc. -// basically the same as death vision except you can't -// see ghosts -/mob/living/proc/grant_xray_vision() - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO + sync_lighting_plane_alpha() /mob/living/proc/handle_hud_icons() handle_hud_icons_health() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 52fde3d0d9e..10fc68d7363 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -992,3 +992,37 @@ for(var/atom/A in src) if(A.light_range > 0) A.extinguish_light() + +/mob/living/vv_edit_var(var_name, var_value) + switch(var_name) + if("stat") + if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life + GLOB.dead_mob_list -= src + GLOB.living_mob_list += src + if((stat < DEAD) && (var_value == DEAD))//Kill he + GLOB.living_mob_list -= src + GLOB.dead_mob_list += src + . = ..() + switch(var_name) + if("weakened") + SetWeakened(var_value) + if("stunned") + SetStunned(var_value) + if("paralysis") + SetParalysis(var_value) + if("sleeping") + SetSleeping(var_value) + if("maxHealth") + updatehealth() + if("resize") + update_transform() + if("lighting_alpha") + sync_lighting_plane_alpha() + +/mob/living/update_sight() + if(!client) + return + + if(stat == DEAD) + grant_death_vision() + return diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 6e12748911b..ac89553865c 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -33,7 +33,6 @@ var/mob_size = MOB_SIZE_HUMAN var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature.. var/digestion_ratio = 1 //controls how quickly reagents metabolize; largely governered by species attributes. - var/nightvision = 0 var/bloodcrawl = 0 //0 No blood crawling, 1 blood crawling, 2 blood crawling+mob devour var/holder = null //The holder for blood crawling diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ccf319b0884..4d4bff42ae7 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1290,4 +1290,29 @@ var/list/ai_verbs_default = list( return FALSE /mob/living/silicon/ai/ExtinguishMob() - return \ No newline at end of file + return + + +/mob/living/silicon/ai/update_sight() + if(!client) + return + + if(stat == DEAD) + grant_death_vision() + return + + see_invisible = initial(see_invisible) + see_in_dark = initial(see_in_dark) + lighting_alpha = initial(lighting_alpha) + sight = initial(sight) + + if(aiRestorePowerRoutine) + sight = sight &~ SEE_TURFS + sight = sight &~ SEE_MOBS + sight = sight &~ SEE_OBJS + see_in_dark = 0 + + if(see_override) + see_invisible = see_override + + sync_lighting_plane_alpha() diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index eec1ec5b8b8..06043025f7c 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -152,16 +152,3 @@ /mob/living/silicon/ai/rejuvenate() ..() add_ai_verbs(src) - -/mob/living/silicon/ai/update_sight() - see_invisible = initial(see_invisible) - see_in_dark = initial(see_in_dark) - sight = initial(sight) - if(aiRestorePowerRoutine) - sight = sight&~SEE_TURFS - sight = sight&~SEE_MOBS - sight = sight&~SEE_OBJS - see_in_dark = 0 - - if(see_override) - see_invisible = see_override diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 5f37177f674..bf09191ecf2 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -88,40 +88,6 @@ return 1 -/mob/living/silicon/robot/update_sight() - if(!client) - return - if(stat == DEAD) - grant_death_vision() - return - - see_invisible = initial(see_invisible) - see_in_dark = initial(see_in_dark) - sight = initial(sight) - - if(client.eye != src) - var/atom/A = client.eye - if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. - return - - if(sight_mode & BORGMESON) - sight |= SEE_TURFS - see_invisible = min(see_invisible, SEE_INVISIBLE_MINIMUM) - see_in_dark = 1 - - if(sight_mode & BORGXRAY) - sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) - see_invisible = SEE_INVISIBLE_LIVING - see_in_dark = 8 - - if(sight_mode & BORGTHERM) - sight |= SEE_MOBS - see_invisible = min(see_invisible, SEE_INVISIBLE_LIVING) - see_in_dark = 8 - - if(see_override) - see_invisible = see_override - /mob/living/silicon/robot/handle_hud_icons() update_items() update_cell() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 18bfe6998c3..de66b7b737a 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1385,3 +1385,43 @@ var/list/robot_verbs_default = list( /mob/living/silicon/robot/check_ear_prot() return ear_protection + +/mob/living/silicon/robot/update_sight() + if(!client) + return + + if(stat == DEAD) + grant_death_vision() + return + + see_invisible = initial(see_invisible) + see_in_dark = initial(see_in_dark) + sight = initial(sight) + lighting_alpha = initial(lighting_alpha) + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + + if(sight_mode & BORGMESON) + sight |= SEE_TURFS + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE + see_in_dark = 1 + + if(sight_mode & BORGXRAY) + sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + see_invisible = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + see_invisible = SEE_INVISIBLE_LIVING + see_in_dark = 8 + + if(sight_mode & BORGTHERM) + sight |= SEE_MOBS + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + see_invisible = min(see_invisible, SEE_INVISIBLE_LIVING) + see_in_dark = 8 + + if(see_override) + see_invisible = see_override + + sync_lighting_plane_alpha() \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 6ba407c8a90..d1982ac359d 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -30,7 +30,7 @@ status_flags = CANPUSH minbodytemp = 0 see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE death_sound = 'sound/voice/hiss6.ogg' deathmessage = "lets out a waning guttural screech, green blood bubbling from its maw..." diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 18219179d40..e45000ff34f 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -17,6 +17,7 @@ speak_chance = 5 turns_per_move = 5 see_in_dark = 10 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE butcher_results = list(/obj/item/reagent_containers/food/snacks/spidermeat = 2, /obj/item/reagent_containers/food/snacks/spiderleg = 8) response_help = "pets" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 81b384f56b7..f0160879e22 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -16,7 +16,7 @@ var/throw_message = "bounces off of" var/icon_aggro = null // for swapping to when we get aggressive see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE mob_size = MOB_SIZE_LARGE /mob/living/simple_animal/hostile/asteroid/Aggro() diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index ad90272a4ce..5b9d94341ef 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -40,7 +40,7 @@ search_objects = 1 // So that it can see through walls - see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS move_force = MOVE_FORCE_EXTREMELY_STRONG move_resist = MOVE_FORCE_EXTREMELY_STRONG @@ -189,13 +189,6 @@ L.EyeBlind(4) return -/mob/living/simple_animal/hostile/statue/update_sight() - if(!client) - return - if(stat == DEAD) - grant_death_vision() - return - //Toggle Night Vision /obj/effect/proc_holder/spell/targeted/night_vision name = "Toggle Nightvision" @@ -207,15 +200,23 @@ message = "You toggle your night vision!" range = -1 include_user = 1 - var/non_night_vision = SEE_INVISIBLE_LIVING - var/night_vision = SEE_INVISIBLE_OBSERVER_NOLIGHTING /obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets, mob/user = usr) for(var/mob/living/target in targets) - if(target.see_invisible == non_night_vision) - target.see_invisible = night_vision - else - target.see_invisible = non_night_vision + switch(target.lighting_alpha) + if (LIGHTING_PLANE_ALPHA_VISIBLE) + target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + name = "Toggle Nightvision \[More]" + if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) + target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + name = "Toggle Nightvision \[Full]" + if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE) + target.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE + name = "Toggle Nightvision \[OFF]" + else + target.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + name = "Toggle Nightvision \[ON]" + target.update_sight() /mob/living/simple_animal/hostile/statue/sentience_act() faction -= "neutral" diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 39c03feb928..1503c2bffe6 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -95,8 +95,7 @@ var/global/list/ts_spiderling_list = list() idle_vision_range = 10 aggro_vision_range = 10 see_in_dark = 10 - nightvision = 1 - see_invisible = 5 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE sight = SEE_MOBS // AI aggression settings diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 66fb417733b..adc498873bb 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -564,21 +564,5 @@ /mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion return -/mob/living/simple_animal/update_sight() - if(!client) - return - if(stat == DEAD) - grant_death_vision() - return - - see_invisible = initial(see_invisible) - see_in_dark = initial(see_in_dark) - sight = initial(sight) - - if(client.eye != src) - var/atom/A = client.eye - if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. - return - /mob/living/simple_animal/can_hear() . = TRUE \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index ee04e624f02..9fe0e54f800 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1341,3 +1341,12 @@ var/list/slot_equipment_priority = list( \ /mob/proc/is_literate() return FALSE + +/mob/proc/update_sight() + sync_lighting_plane_alpha() + +/mob/proc/sync_lighting_plane_alpha() + if(hud_used) + var/obj/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"] + if (L) + L.alpha = lighting_alpha \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 3e9ff0b7ba6..e36e7e4a004 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -1,6 +1,6 @@ /mob density = 1 - layer = 4.0 + layer = MOB_LAYER animate_movement = 2 pressure_resistance = 8 dont_save = TRUE //to avoid it messing up in buildmode saving @@ -93,7 +93,7 @@ var/list/grabbed_by = list() var/list/requests = list() - + var/lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE var/list/mapobjs = list() var/in_throw_mode = 0 diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index feff384ed87..4ef9cfc55b0 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -291,6 +291,8 @@ /mob/camera/aiEye/remote/shuttle_docker/update_remote_sight(mob/living/user) user.sight = SEE_TURFS + + ..() return TRUE /datum/action/innate/shuttledocker_rotate diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index da559d38d5f..a8ee1beb2a6 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -8,8 +8,10 @@ w_class = WEIGHT_CLASS_TINY var/vision_flags = 0 - var/dark_view = 0 + var/see_in_dark = 0 var/see_invisible = 0 + var/lighting_alpha + var/eye_colour = "#000000" var/old_eye_colour = "#000000" var/flash_protect = 0 @@ -54,7 +56,7 @@ implant_color = "#AEFF00" origin_tech = "materials=4;engineering=4;biotech=4;magnets=4" vision_flags = SEE_TURFS - see_invisible = SEE_INVISIBLE_MINIMUM + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE aug_message = "Suddenly, you realize how much of a mess the station really is..." /obj/item/organ/internal/cyberimp/eyes/xray @@ -63,8 +65,8 @@ implant_color = "#000000" origin_tech = "materials=4;programming=4;biotech=6;magnets=4" vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS - dark_view = 8 - see_invisible = SEE_INVISIBLE_MINIMUM + see_in_dark = 8 + lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE /obj/item/organ/internal/cyberimp/eyes/thermals name = "Thermals implant" diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 51d73fc9873..fba2df57e8a 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -10,9 +10,13 @@ var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white. var/list/replace_colours = LIST_GREYSCALE_REPLACE var/dependent_disabilities = null //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation. - var/dark_view = 2 //Default dark_view for Humans. var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will. + var/vision_flags = 0 + var/see_in_dark = 2 + var/see_invisible = SEE_INVISIBLE_LIVING + var/lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + /obj/item/organ/internal/eyes/proc/update_colour() dna.write_eyes_attributes(src) @@ -31,11 +35,8 @@ else return colourmatrix -/obj/item/organ/internal/eyes/proc/get_dark_view() //Returns dark_view (if the eyes are organic) for see_invisible handling in species.dm to be autoprocessed by life(). - return dark_view - /obj/item/organ/internal/eyes/proc/shine() - if(is_robotic() || (dark_view > EYE_SHINE_THRESHOLD)) + if(is_robotic() || (see_in_dark > EYE_SHINE_THRESHOLD)) return TRUE /obj/item/organ/internal/eyes/insert(mob/living/carbon/human/M, special = 0) @@ -70,7 +71,7 @@ colourmatrix = null ..() //Make sure the organ's got the robotic status indicators before updating the client colour. if(owner) - owner.update_client_colour(0) //Since mechanical eyes give dark_view of 2 and full colour vision atm, just having this here is fine. + owner.update_client_colour(0) //Since mechanical eyes give see_in_dark of 2 and full colour vision atm, just having this here is fine. /obj/item/organ/internal/eyes/cybernetic name = "cybernetic eyes" diff --git a/code/modules/surgery/organs/subtypes/abductor.dm b/code/modules/surgery/organs/subtypes/abductor.dm index fd57464381a..b499135417e 100644 --- a/code/modules/surgery/organs/subtypes/abductor.dm +++ b/code/modules/surgery/organs/subtypes/abductor.dm @@ -4,4 +4,4 @@ /obj/item/organ/internal/eyes/abductor name = "abductor eyeballs" - dark_view = 3 \ No newline at end of file + see_in_dark = 3 \ No newline at end of file diff --git a/code/modules/surgery/organs/subtypes/drask.dm b/code/modules/surgery/organs/subtypes/drask.dm index e457c4cddaa..49b11d096b6 100644 --- a/code/modules/surgery/organs/subtypes/drask.dm +++ b/code/modules/surgery/organs/subtypes/drask.dm @@ -26,4 +26,4 @@ name = "drask eyeballs" icon = 'icons/obj/species_organs/drask.dmi' desc = "Drask eyes. They look even stranger disembodied" - dark_view = 5 \ No newline at end of file + see_in_dark = 5 \ No newline at end of file diff --git a/code/modules/surgery/organs/subtypes/grey.dm b/code/modules/surgery/organs/subtypes/grey.dm index 3e7598fa06f..6e4a0e3eafd 100644 --- a/code/modules/surgery/organs/subtypes/grey.dm +++ b/code/modules/surgery/organs/subtypes/grey.dm @@ -23,7 +23,7 @@ name = "grey eyeballs" desc = "They still look creepy and emotionless" icon = 'icons/obj/species_organs/grey.dmi' - dark_view = 5 + see_in_dark = 5 /obj/item/organ/internal/heart/grey name = "grey heart" diff --git a/code/modules/surgery/organs/subtypes/shadow.dm b/code/modules/surgery/organs/subtypes/shadow.dm index 26a0bc50577..56bec1a4a7e 100644 --- a/code/modules/surgery/organs/subtypes/shadow.dm +++ b/code/modules/surgery/organs/subtypes/shadow.dm @@ -1,3 +1,3 @@ /obj/item/organ/internal/eyes/shadow name = "dark orbs" - dark_view = 8 \ No newline at end of file + see_in_dark = 8 \ No newline at end of file diff --git a/code/modules/surgery/organs/subtypes/tajaran.dm b/code/modules/surgery/organs/subtypes/tajaran.dm index d6202a377e6..99598a80fb1 100644 --- a/code/modules/surgery/organs/subtypes/tajaran.dm +++ b/code/modules/surgery/organs/subtypes/tajaran.dm @@ -8,12 +8,12 @@ name = "tajaran eyeballs" colourblind_matrix = MATRIX_TAJ_CBLIND //The colour matrix and darksight parameters that the mob will recieve when they get the disability. replace_colours = LIST_TAJ_REPLACE - dark_view = 8 + see_in_dark = 8 /obj/item/organ/internal/eyes/tajaran/farwa //Being the lesser form of Tajara, Farwas have an utterly incurable version of their colourblindness. name = "farwa eyeballs" colourmatrix = MATRIX_TAJ_CBLIND - dark_view = 8 + see_in_dark = 8 replace_colours = LIST_TAJ_REPLACE /obj/item/organ/internal/heart/tajaran diff --git a/code/modules/surgery/organs/subtypes/unathi.dm b/code/modules/surgery/organs/subtypes/unathi.dm index 26ad86d4700..a612bc7f253 100644 --- a/code/modules/surgery/organs/subtypes/unathi.dm +++ b/code/modules/surgery/organs/subtypes/unathi.dm @@ -7,7 +7,7 @@ /obj/item/organ/internal/eyes/unathi name = "unathi eyeballs" icon = 'icons/obj/species_organs/unathi.dmi' - dark_view = 3 + see_in_dark = 3 /obj/item/organ/internal/heart/unathi name = "unathi heart" diff --git a/code/modules/surgery/organs/subtypes/vulpkanin.dm b/code/modules/surgery/organs/subtypes/vulpkanin.dm index 2c583c8f84a..820b152c43f 100644 --- a/code/modules/surgery/organs/subtypes/vulpkanin.dm +++ b/code/modules/surgery/organs/subtypes/vulpkanin.dm @@ -8,12 +8,12 @@ icon = 'icons/obj/species_organs/vulpkanin.dmi' colourblind_matrix = MATRIX_VULP_CBLIND //The colour matrix and darksight parameters that the mob will recieve when they get the disability. replace_colours = LIST_VULP_REPLACE - dark_view = 8 + see_in_dark = 8 /obj/item/organ/internal/eyes/vulpkanin/wolpin //Being the lesser form of Vulpkanin, Wolpins have an utterly incurable version of their colourblindness. name = "wolpin eyeballs" colourmatrix = MATRIX_VULP_CBLIND - dark_view = 8 + see_in_dark = 8 replace_colours = LIST_VULP_REPLACE /obj/item/organ/internal/heart/vulpkanin diff --git a/code/modules/surgery/organs/subtypes/wryn.dm b/code/modules/surgery/organs/subtypes/wryn.dm index ab30c16f61f..8900bb8b37d 100644 --- a/code/modules/surgery/organs/subtypes/wryn.dm +++ b/code/modules/surgery/organs/subtypes/wryn.dm @@ -8,4 +8,4 @@ slot = "hivenode" /obj/item/organ/internal/eyes/wryn - dark_view = 3 \ No newline at end of file + see_in_dark = 3 \ No newline at end of file