diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 71ed5df1553..a1078b7aeb1 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -18,7 +18,7 @@ screen.severity = severity screens[category] = screen - if(client && screen.should_show_to(src)) + if(client && stat != DEAD) client.screen += screen return screen @@ -51,14 +51,9 @@ client.screen -= screens[category] /mob/proc/reload_fullscreen() - if(client) - var/obj/screen/fullscreen/screen + if(client && stat != DEAD) //dead mob do not see any of the fullscreen overlays that he has. for(var/category in screens) - screen = screens[category] - if(screen.should_show_to(src)) - client.screen |= screen - else - client.screen -= screen + client.screen |= screens[category] /obj/screen/fullscreen icon = 'icons/mob/screen_full.dmi' @@ -68,12 +63,6 @@ plane = FULLSCREEN_PLANE mouse_opacity = 0 var/severity = 0 - var/show_when_dead = FALSE - -/obj/screen/fullscreen/proc/should_show_to(mob/mymob) - if(!show_when_dead && mymob.stat == DEAD) - return FALSE - return TRUE /obj/screen/fullscreen/Destroy() ..() @@ -136,31 +125,4 @@ color = "#ff0000" /obj/screen/fullscreen/color_vision/blue - color = "#0000ff" - -/obj/screen/fullscreen/lighting_backdrop - icon = 'icons/mob/screen_gen.dmi' - icon_state = "flash" - transform = matrix(200, 0, 0, 0, 200, 0) - plane = LIGHTING_PLANE - blend_mode = BLEND_OVERLAY - show_when_dead = TRUE - -//Provides darkness to the back of the lighting plane -/obj/screen/fullscreen/lighting_backdrop/lit - invisibility = INVISIBILITY_LIGHTING - layer = BACKGROUND_LAYER+21 - color = "#000" - show_when_dead = TRUE - -//Provides whiteness in case you don't see lights so everything is still visible -/obj/screen/fullscreen/lighting_backdrop/unlit - layer = BACKGROUND_LAYER+20 - show_when_dead = TRUE - -/obj/screen/fullscreen/see_through_darkness - icon_state = "nightvision" - plane = LIGHTING_PLANE - layer = LIGHTING_LAYER - blend_mode = BLEND_ADD - show_when_dead = TRUE + color = "#0000ff" \ No newline at end of file diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index b01c81d8022..ca7886e29d9 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -38,6 +38,11 @@ /datum/hud/ghost/New(mob/owner) ..() + var/mob/dead/observer/G = mymob + if(!G.client.prefs.ghost_hud) + mymob.client.screen = null + return + var/obj/screen/using using = new /obj/screen/ghost/jumptomob() @@ -57,12 +62,12 @@ static_inventory += using -/datum/hud/ghost/show_hud(version = 0, mob/viewmob) - ..() - if(!mymob.client.prefs.ghost_hud) - mymob.client.screen -= static_inventory - else - mymob.client.screen += static_inventory +/datum/hud/ghost/show_hud() + var/mob/dead/observer/G = mymob + mymob.client.screen = list() + if(!G.client.prefs.ghost_hud) + return + mymob.client.screen += static_inventory /mob/dead/observer/create_mob_hud() if(client && !hud_used) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 012cdea0195..b3544105770 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -66,7 +66,6 @@ for(var/mytype in subtypesof(/obj/screen/plane_master)) var/obj/screen/plane_master/instance = new mytype() plane_masters["[instance.plane]"] = instance - instance.backdrop(mymob) /datum/hud/Destroy() if(mymob.hud_used == src) @@ -215,7 +214,7 @@ ..() hidden_inventory_update(viewmob) -/datum/hud/robot/show_hud(version = 0, mob/viewmob) +/datum/hud/robot/show_hud(version = 0) ..() update_robot_modules_display() diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 4d9ffdc20bc..9223a36b13d 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -87,8 +87,6 @@ /datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_midnight.dmi') ..() - owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness) - var/obj/screen/using var/obj/screen/inventory/inv_box diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index bce5641fd01..af7eabd8e9a 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -1,4 +1,11 @@ -/datum/hud/brain + +/datum/hud/brain/show_hud(version = 0) + if(!ismob(mymob)) + return 0 + if(!mymob.client) + return 0 + mymob.client.screen = list() + mymob.client.screen += mymob.client.void /mob/living/brain/create_mob_hud() if(client && !hud_used) diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index 8d975b3940a..eda44bda065 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -4,8 +4,15 @@ appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR blend_mode = BLEND_OVERLAY -//Why do plane masters need a backdrop sometimes? Read http://www.byond.com/forum/?post=2141928 -/obj/screen/plane_master/proc/backdrop(mob/mymob) +/obj/screen/plane_master/New() + if(blend_mode == BLEND_MULTIPLY) + //What is this? Read http://www.byond.com/forum/?post=2141928 + var/image/backdrop = image('icons/mob/screen_gen.dmi', "black") + backdrop.transform = matrix(200, 0, 0, 0, 200, 0) + backdrop.layer = BACKGROUND_LAYER + backdrop.blend_mode = BLEND_OVERLAY + overlays += backdrop + ..() /obj/screen/plane_master/game_world name = "game world plane master" @@ -16,9 +23,6 @@ name = "lighting plane master" plane = LIGHTING_PLANE blend_mode = BLEND_OVERLAY - color = list(0,0,0,-0.333, 0,0,0,-0.333, 0,0,0,-0.333, 0,0,0,0, 0,0,0,1) +// blend_mode = BLEND_MULTIPLY +// color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0.1,0.1,0.1,0) mouse_opacity = 0 - -/obj/screen/plane_master/lighting/backdrop(mob/mymob) - mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit) - mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index b2757d2dd80..3c8221b7f89 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -304,11 +304,15 @@ var/list/teleportlocs = list() icon_state = "party" else icon_state = "blue-red" + invisibility = INVISIBILITY_LIGHTING else + // new lighting behaviour with obj lights icon_state = null + invisibility = INVISIBILITY_MAXIMUM /area/space/updateicon() icon_state = null + invisibility = INVISIBILITY_MAXIMUM /* #define EQUIP 1 diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index ae283e5edb9..f34a4c719c7 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -22,12 +22,4 @@ name = "mobl" var/master = null - var/list/container = list( ) - -//Makes a tile fully lit no matter what -/obj/effect/fullbright - icon = 'icons/effects/alphacolors.dmi' - icon_state = "white" - plane = LIGHTING_PLANE - layer = LIGHTING_LAYER - blend_mode = BLEND_ADD \ No newline at end of file + var/list/container = list( ) \ No newline at end of file diff --git a/code/modules/lighting/lighting_system.dm b/code/modules/lighting/lighting_system.dm index afcaeb395bf..97632e13043 100644 --- a/code/modules/lighting/lighting_system.dm +++ b/code/modules/lighting/lighting_system.dm @@ -27,12 +27,13 @@ */ #define LIGHTING_CIRCULAR 1 //Comment this out to use old square lighting effects. +//#define LIGHTING_LAYER 15 //Drawing layer for lighting, moved to layers.dm #define LIGHTING_CAP 10 //The lumcount level at which alpha is 0 and we're fully lit. #define LIGHTING_CAP_FRAC (255/LIGHTING_CAP) //A precal'd variable we'll use in turf/redraw_lighting() #define LIGHTING_ICON 'icons/effects/alphacolors.dmi' #define LIGHTING_ICON_STATE "white" #define LIGHTING_TIME 2 //Time to do any lighting change. Actual number pulled out of my ass -#define LIGHTING_DARKEST_VISIBLE_ALPHA 5 //Anything darker than this is so dark, we'll just consider the whole tile unlit +#define LIGHTING_DARKEST_VISIBLE_ALPHA 250 //Anything darker than this is so dark, we'll just consider the whole tile unlit #define LIGHTING_LUM_FOR_FULL_BRIGHT 6 //Anything who's lum is lower then this starts off less bright. #define LIGHTING_MIN_RADIUS 4 //Lowest radius a light source can effect. @@ -238,8 +239,9 @@ layer = LIGHTING_LAYER plane = LIGHTING_PLANE mouse_opacity = 0 - blend_mode = BLEND_ADD + blend_mode = BLEND_OVERLAY invisibility = INVISIBILITY_LIGHTING + color = "#000" luminosity = 0 infra_luminosity = 1 anchored = 1 @@ -342,21 +344,23 @@ /turf/proc/redraw_lighting(instantly = 0) if(lighting_object) - var/newalpha = 0 - var/turf_lumcount = lighting_lumcount - if(turf_lumcount > 0) - if(turf_lumcount < LIGHTING_CAP) - newalpha = Clamp(turf_lumcount * LIGHTING_CAP_FRAC, 0, 255) - else //if(turf_lumcount >= LIGHTING_CAP) - newalpha = 255 - if(newalpha <= LIGHTING_DARKEST_VISIBLE_ALPHA) - newalpha = 0 + var/newalpha + if(lighting_lumcount <= 0) + newalpha = 255 + else + if(lighting_lumcount < LIGHTING_CAP) + var/num = Clamp(lighting_lumcount * LIGHTING_CAP_FRAC, 0, 255) + newalpha = 255-num + else //if(lighting_lumcount >= LIGHTING_CAP) + newalpha = 0 + if(newalpha >= LIGHTING_DARKEST_VISIBLE_ALPHA) + newalpha = 255 if(lighting_object.alpha != newalpha) if(instantly) lighting_object.alpha = newalpha else animate(lighting_object, alpha = newalpha, time = LIGHTING_TIME) - if(newalpha <= LIGHTING_DARKEST_VISIBLE_ALPHA) + if(newalpha >= LIGHTING_DARKEST_VISIBLE_ALPHA) luminosity = 0 lighting_object.luminosity = 0 else @@ -378,12 +382,10 @@ . = ..() if(lighting_use_dynamic != DYNAMIC_LIGHTING_ENABLED) luminosity = 1 - overlays += /obj/effect/fullbright /area/proc/SetDynamicLighting() if (lighting_use_dynamic == DYNAMIC_LIGHTING_DISABLED) lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED - overlays.Cut() luminosity = 0 for(var/turf/T in src.contents) T.init_lighting() diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm index c9eab5756b2..e90b4a72972 100644 --- a/code/modules/mob/living/brain/brain.dm +++ b/code/modules/mob/living/brain/brain.dm @@ -8,7 +8,7 @@ var/emp_damage = 0//Handles a type of MMI damage var/datum/dna/stored/stored_dna // dna var for brain. Used to store dna, brain dna is not considered like actual dna, brain.has_dna() returns FALSE. stat = DEAD //we start dead by default - see_invisible = SEE_INVISIBLE_LIVING + see_invisible = SEE_INVISIBLE_MINIMUM /mob/living/brain/New(loc) ..() diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 71f95216ebd..6695c4a1271 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -67,7 +67,7 @@ SetSleeping(0, 0) blind_eyes(1) reset_perspective(null) - reload_fullscreen() + hide_fullscreens() update_action_buttons_icon() update_damage_hud() update_health_hud() diff --git a/config/config.txt b/config/config.txt index d30f392c65d..a8cc323f2ce 100644 --- a/config/config.txt +++ b/config/config.txt @@ -279,7 +279,7 @@ ANNOUNCE_ADMIN_LOGOUT ## This allows you to configure the minimum required client version, as well as a warning version, and message for both. ## These trigger for any version below (non-inclusive) the given version, so 510 triggers on 509 or lower. ## These messages will be followed by one stating the clients current version and the required version for clarity. -#CLIENT_WARN_VERSION 511 -#CLIENT_WARN_MESSAGE Byond is really close to releasing 511 beta as the stable release, please take this time to try it out. You can set the framerate your client runs at, which makes the game feel very different and cool. Shortly after its release we will end up using 511 client features and you will be forced to update. -CLIENT_ERROR_VERSION 510 -CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade. \ No newline at end of file +#CLIENT_WARN_VERSION 510 +#CLIENT_WARN_MESSAGE Byond is really close to releasing 510 beta as the stable release, please take this time to try it out. Reports are that the client preforms better then the version you are using, and also handles network lag better. Shortly after it's release we will end up using 510 client features and you will be forced to update. +#CLIENT_ERROR_VERSION 509 +#CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade. \ No newline at end of file diff --git a/icons/mob/screen_full.dmi b/icons/mob/screen_full.dmi index 595b870a172..e84b0546950 100644 Binary files a/icons/mob/screen_full.dmi and b/icons/mob/screen_full.dmi differ