diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index c7ac27cff18..0f46785c497 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -97,26 +97,3 @@ #define ui_ai_bioscan "SOUTH:6,WEST+4" #define ui_ai_multicam "SOUTH:6,WEST+17" #define ui_ai_add_multicam "SOUTH:6,WEST+18" - -// Какого хрена атомы лежат в дефайнах?! -// TODO: Уберите предовские атомы в другой И ПОДХОДЯЩИЙ файл, плиз. -/* - | | | - | | | - v v v -*/ -/atom/movable/screen/fullscreen/machine/pred - alpha = 140 - -/atom/movable/screen/fullscreen/machine/pred/meson - icon_state = "pred_meson" - icon = 'icons/mob/screen/full.dmi' - -/atom/movable/screen/fullscreen/machine/pred/night - icon_state = "robothalf" - -/datum/hud/var/atom/movable/screen/pred_power_icon - -/datum/hud/Destroy() - pred_power_icon = null - return ..() diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 595ab330f1b..eea42b10851 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -1,11 +1,7 @@ -#define SHOULD_SHOW_TO(mymob, myscreen) (!(mymob.stat == DEAD && !myscreen.show_when_dead)) - - /mob/proc/overlay_fullscreen_timer(duration, animated, category, type, severity) overlay_fullscreen(category, type, severity) addtimer(CALLBACK(src, PROC_REF(clear_fullscreen), category, animated), duration) - ///Applies a fullscreen overlay /mob/proc/overlay_fullscreen(category, type, severity) var/atom/movable/screen/fullscreen/screen = fullscreens[category] @@ -23,7 +19,7 @@ screen.icon_state = "[initial(screen.icon_state)][severity]" screen.severity = severity - if(client && SHOULD_SHOW_TO(src, screen)) + if(client && screen.should_show_to(src)) screen.update_for_view(client.view) client.screen += screen return screen @@ -48,29 +44,27 @@ fullscreens -= category qdel(screen) - /mob/proc/clear_fullscreens() for(var/category in fullscreens) clear_fullscreen(category) - /mob/proc/hide_fullscreens() - if(client) - for(var/category in fullscreens) - client.screen -= fullscreens[category] - + if(!client) + return + for(var/category in fullscreens) + client.screen -= fullscreens[category] /mob/proc/reload_fullscreens() - if(client) - var/atom/movable/screen/fullscreen/screen - for(var/category in fullscreens) - screen = fullscreens[category] - if(SHOULD_SHOW_TO(src, screen)) - screen.update_for_view(client.view) - client.screen |= screen - else - client.screen -= screen - + if(!client) + return + var/atom/movable/screen/fullscreen/screen + for(var/category in fullscreens) + screen = fullscreens[category] + if(screen.should_show_to(src)) + screen.update_for_view(client.view) + client.screen |= screen + else + client.screen -= screen /atom/movable/screen/fullscreen icon = 'icons/mob/screen/full/misc.dmi' @@ -85,18 +79,23 @@ ///Holder for deletion timer var/removal_timer - /atom/movable/screen/fullscreen/Destroy() deltimer(removal_timer) removal_timer = null return ..() - /atom/movable/screen/fullscreen/proc/update_for_view(client_view) - if (screen_loc == "CENTER-7,CENTER-7" && fs_view != client_view) + if(fs_view == client_view) + return + if(screen_loc != "CENTER-7,CENTER-7") var/list/actualview = getviewsize(client_view) fs_view = client_view - transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0) + transform = matrix(actualview[1] / FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2] / FULLSCREEN_OVERLAY_RESOLUTION_Y, 0) + +/atom/movable/screen/fullscreen/proc/should_show_to(mob/mob) + if(!show_when_dead && mob.stat == DEAD) + return FALSE + return TRUE /atom/movable/screen/fullscreen/black icon_state = "black" //just a black square, you can change this if you get better ideas @@ -182,6 +181,16 @@ /atom/movable/screen/fullscreen/machine/robotlow icon_state = "robotlow" +/atom/movable/screen/fullscreen/machine/pred + alpha = 140 + +/atom/movable/screen/fullscreen/machine/pred/meson + icon_state = "pred_meson" + icon = 'icons/mob/screen/full.dmi' + +/atom/movable/screen/fullscreen/machine/pred/night + icon_state = "robothalf" + /atom/movable/screen/fullscreen/ivanov_display icon_state = "ivanov" alpha = 180 @@ -216,5 +225,3 @@ layer = LIGHTING_PRIMARY_LAYER blend_mode = BLEND_ADD show_when_dead = TRUE - -#undef SHOULD_SHOW_TO diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index a3629152f9a..bc0f7061512 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -62,6 +62,7 @@ var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object + var/atom/movable/screen/pred_power_icon /datum/hud/New(mob/owner) mymob = owner @@ -133,8 +134,9 @@ mymob = null - return ..() + pred_power_icon = null + return ..() /mob/proc/create_mob_hud() if(!client || hud_used) @@ -146,7 +148,6 @@ update_sight() SEND_SIGNAL(src, COMSIG_MOB_HUD_CREATED) - /datum/hud/proc/plane_masters_update() // Plane masters are always shown to OUR mob, never to observers for(var/thing in plane_masters) @@ -231,10 +232,8 @@ show_hud(hud_version, M) else if(viewmob.hud_used) viewmob.hud_used.plane_masters_update() - return TRUE - /datum/hud/human/show_hud(version = 0, mob/viewmob) . = ..() if(!.) @@ -244,7 +243,6 @@ return FALSE hidden_inventory_update(screenmob) - /datum/hud/proc/hidden_inventory_update(mob/viewer) return @@ -287,13 +285,11 @@ return openToolTip(usr, src, params, title = name, content = desc) - /atom/movable/screen/action_button/MouseExited() if (!usr.client?.prefs?.tooltips) return closeToolTip(usr) - //Triggered when F12 is pressed (Unless someone changed something in the DMF) /mob/verb/button_pressed_F12() set name = "F12" diff --git a/code/datums/view.dm b/code/datums/view.dm index 136305f0d5d..60019bc4139 100644 --- a/code/datums/view.dm +++ b/code/datums/view.dm @@ -18,7 +18,7 @@ chief = owner apply() -///sets the default view size froma string +///sets the default view size froma string /datum/view_data/proc/set_default(string) default = string apply() diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 65e3c21e49e..a188beb687f 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -872,9 +872,11 @@ CRASH("change_view called with a number argument. Use the string format instead.") if(prefs && !prefs.widescreenpref && new_size == CONFIG_GET(string/default_view)) new_size = CONFIG_GET(string/default_view_square) + view = new_size apply_clickcatcher() mob.reload_fullscreens() + if(prefs.auto_fit_viewport) INVOKE_NEXT_TICK(src, VERB_REF(fit_viewport), 1 SECONDS) //Delayed to avoid wingets from Login calls. diff --git a/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm b/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm index 8f294663353..49894ad7bb5 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/boiler/abilities_boiler.dm @@ -46,7 +46,7 @@ GLOBAL_LIST_INIT(boiler_glob_image_list, list( if(!do_after(X, 1 SECONDS, IGNORE_HELD_ITEM, null, BUSY_ICON_GENERIC) || X.is_zoomed) return X.zoom_in(11) - ..() + return ..() // *************************************** // *********** Gas type toggle diff --git a/code/modules/mob/living/carbon/xenomorph/life.dm b/code/modules/mob/living/carbon/xenomorph/life.dm index 5a588e9a78c..c095d9b3ddc 100644 --- a/code/modules/mob/living/carbon/xenomorph/life.dm +++ b/code/modules/mob/living/carbon/xenomorph/life.dm @@ -34,9 +34,7 @@ handle_living_sunder_updates() handle_living_health_updates() handle_living_plasma_updates() -//RUTGMC EDIT ADDITION BEGIN - Preds handle_interference() -//RUTGMC EDIT ADDITION END update_action_button_icons() update_icons(FALSE) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 9fc6be21c4d..d669faf858f 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -347,7 +347,7 @@ GLOBAL_LIST_INIT(strain_list, init_glob_strain_list()) ///Stored biomass var/biomass = 0 - var/is_zoomed = 0 + var/is_zoomed = FALSE var/zoom_turf = null var/can_walk_zoomed = FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm index d634e75dba3..075d4614579 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm @@ -395,11 +395,10 @@ update_sight() - /mob/living/carbon/xenomorph/proc/zoom_in(tileoffset = 5, viewsize = 12) if(stat || resting) if(is_zoomed) - is_zoomed = 0 + is_zoomed = FALSE zoom_out() return return @@ -408,8 +407,8 @@ if(!client) return zoom_turf = get_turf(src) - is_zoomed = 1 - client.view_size.set_view_radius_to(viewsize * 0.5 - 2) //convert diameter to radius + is_zoomed = TRUE + client.view_size.set_view_radius_to((viewsize * 0.5) - 2) //convert diameter to radius var/viewoffset = 32 * tileoffset switch(dir) if(NORTH) @@ -426,7 +425,7 @@ client.pixel_y = 0 /mob/living/carbon/xenomorph/proc/zoom_out() - is_zoomed = 0 + is_zoomed = FALSE zoom_turf = null if(!client) return diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index c927c8bcaf8..f9e5db4879a 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -32,12 +32,10 @@ if(!client) return -//RUTGMC EDIT ADDITION BEGIN - Preds if(length(client_color_matrices)) update_client_color_matrices(time = 0) //This mob has client color matrices set, apply them instantly on login. else update_client_color_matrices(time = 1.5 SECONDS) //Otherwise, fade any matrices from a previous mob. -//RUTGMC EDIT ADDITION END canon_client = client clear_important_client_contents(client)