diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 87e6bdc47c1..7e38d599989 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -432,20 +432,26 @@ /obj/screen/click_catcher icon = 'icons/mob/screen_gen.dmi' - icon_state = "click_catcher" + icon_state = "flash" plane = CLICKCATCHER_PLANE mouse_opacity = 2 screen_loc = "CENTER" /obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 7, view_size_y = 7) - screen_loc = "CENTER-[view_size_x],CENTER-[view_size_y]" - var/list/ret = list() - for(var/X in 0 to (view_size_x * 2)) - for(var/Y in 0 to (view_size_y * 2)) - var/obj/screen/click_catcher/CC = new() - CC.screen_loc = "EAST-[X],NORTH-[Y]" - ret += CC - return ret + var/icon/newicon = icon('icons/mob/screen_gen.dmi', "flash") + if(view_size_x > 16 || view_size_y > 16) + newicon.Scale((16 * 2 + 1) * world.icon_size,(16 * 2 + 1) * world.icon_size) + icon = newicon + var/tx = view_size_x/16 + var/ty = view_size_y/16 + var/matrix/M = new + M.Scale(tx, ty) + transform = M + screen_loc = "CENTER-16,CENTER-16" + else + screen_loc = "CENTER-[view_size_x],CENTER-[view_size_y]" + newicon.Scale((view_size_x * 2 + 1) * world.icon_size,(view_size_y * 2 + 1) * world.icon_size) + icon = newicon /obj/screen/click_catcher/Click(location, control, params) var/list/modifiers = params2list(params) @@ -453,7 +459,7 @@ var/mob/living/carbon/C = usr C.swap_hand() else - var/turf/T = screen_loc2turf(screen_loc, get_turf(usr)) + var/turf/T = params2turf(modifiers["screen-loc"], get_turf(usr)) params += "&catcher=1" if(T) T.Click(location, control, params) diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index 51cf83d0ae8..5dfd9ecd4bc 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -48,8 +48,7 @@ preload_rsc = PRELOAD_RSC - var/global/obj/screen/click_catcher/void - var/list/obj/screen/click_catcher/click_catcher_tiles + var/obj/screen/click_catcher/void // Used by html_interface module. var/hi_last_pos diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 827ea252fc9..18db4166182 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -643,12 +643,6 @@ GLOBAL_LIST(external_rsc_urls) if ("key") return FALSE -/client/proc/clear_click_catcher() - if(!LAZYLEN(click_catcher_tiles)) - return - for(var/I in click_catcher_tiles) - screen -= I - qdel(I) /client/proc/change_view(new_size) if (isnull(new_size)) @@ -663,12 +657,8 @@ GLOBAL_LIST(external_rsc_urls) screen += void /client/proc/apply_clickcatcher() - clear_click_catcher() generate_clickcatcher() - click_catcher_tiles = void.UpdateGreed(view,view) - for(var/obj/screen/OS in click_catcher_tiles) - screen += OS - + void.UpdateGreed(view,view) /client/proc/AnnouncePR(announcement) if(prefs && prefs.chat_toggles & CHAT_PULLR)