diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 31b91c7cd1e..bb05efc975a 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -43,4 +43,4 @@ #define BE_GANG 4096 #define BE_SHADOWLING 8192 #define BE_ABDUCTOR 16384 -#define BE_REVENANT 32768 +#define BE_REVENANT 32768 diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index c0181912414..f83878efb29 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1324,6 +1324,18 @@ var/list/WALLITEMS = list( else return "white" + +/proc/screen_loc2turf(scr_loc, turf/origin) + var/tX = text2list(scr_loc, ",") + var/tY = text2list(tX[2], ":") + var/tZ = origin.z + tY = tY[1] + tX = text2list(tX[1], ":") + tX = tX[1] + tX = max(1, min(world.maxx, origin.x + (text2num(tX) - (world.view + 1)))) + tY = max(1, min(world.maxy, origin.y + (text2num(tY) - (world.view + 1)))) + return locate(tX, tY, tZ) + /proc/IsValidSrc(var/A) if(istype(A, /datum)) var/datum/B = A @@ -1331,3 +1343,4 @@ var/list/WALLITEMS = list( if(istype(A, /client)) return 1 return 0 + diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 5fafc67c934..193fa246a83 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -309,3 +309,20 @@ else if(dx > 0) dir = EAST else dir = WEST + +/obj/screen/click_catcher + icon = 'icons/mob/screen_full.dmi' + icon_state = "passage0" + layer = 0 + mouse_opacity = 2 + screen_loc = "CENTER-7,CENTER-7" + +/obj/screen/click_catcher/Click(location, control, params) + var/list/modifiers = params2list(params) + if(modifiers["middle"] && istype(usr, /mob/living/carbon)) + var/mob/living/carbon/C = usr + C.swap_hand() + else + var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr)) + T.Click(location, control, params) + return 1 \ No newline at end of file diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index 8c52e9221d5..74a5392417d 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -134,6 +134,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 + mymob.blind.mouse_opacity = 0 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' @@ -146,8 +147,8 @@ mymob.zone_sel.icon = 'icons/mob/screen_alien.dmi' mymob.zone_sel.update_icon() - mymob.client.screen = null + mymob.client.screen = list() mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.healths, nightvisionicon, alien_plasma_display, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach ) mymob.client.screen += adding + other - + mymob.client.screen += mymob.client.void \ No newline at end of file diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index ab395f371e1..ab50702cd69 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -38,6 +38,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 + mymob.blind.mouse_opacity = 0 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' @@ -50,7 +51,8 @@ mymob.zone_sel.icon = 'icons/mob/screen_alien.dmi' mymob.zone_sel.update_icon() - mymob.client.screen = null + mymob.client.screen = list() mymob.client.screen += list( mymob.zone_sel, mymob.healths, nightvisionicon, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach ) - mymob.client.screen += adding + other \ No newline at end of file + mymob.client.screen += adding + other + mymob.client.screen += mymob.client.void \ No newline at end of file diff --git a/code/_onclick/hud/drones.dm b/code/_onclick/hud/drones.dm index 63600d94053..0b00b430506 100644 --- a/code/_onclick/hud/drones.dm +++ b/code/_onclick/hud/drones.dm @@ -77,5 +77,6 @@ mymob.zone_sel.icon = ui_style mymob.zone_sel.update_icon() - mymob.client.screen = null + mymob.client.screen = list() + mymob.client.screen += mymob.client.void mymob.client.screen += adding diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 64e8cdc77e9..d9a9ba93dec 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -305,10 +305,11 @@ mymob.zone_sel.icon = ui_style mymob.zone_sel.update_icon() - mymob.client.screen = null + mymob.client.screen = list() mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.internals, mymob.healths, mymob.healthdoll, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, lingchemdisplay, lingstingdisplay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach ) mymob.client.screen += adding + hotkeybuttons + mymob.client.screen += mymob.client.void inventory_shown = 0; diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index ad2d394d7b3..32b4e98832e 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -120,6 +120,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 + mymob.blind.mouse_opacity = 0 mymob.damageoverlay = new /obj/screen() mymob.damageoverlay.icon = 'icons/mob/screen_full.dmi' @@ -141,7 +142,7 @@ mymob.zone_sel.icon = ui_style mymob.zone_sel.update_icon() - mymob.client.screen = null + mymob.client.screen = list() using = new /obj/screen/resist() using.icon = ui_style @@ -150,3 +151,4 @@ mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.internals, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, lingchemdisplay, lingstingdisplay) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach ) mymob.client.screen += adding + other + mymob.client.screen += mymob.client.void \ No newline at end of file diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index c74f1ee7849..cc9937f5e71 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -12,9 +12,11 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 + mymob.blind.mouse_opacity = 0 - mymob.client.screen = null + mymob.client.screen = list() mymob.client.screen += list(mymob.blind) + mymob.client.screen += mymob.client.void /datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen_midnight.dmi') @@ -30,6 +32,6 @@ blobhealthdisplay.screen_loc = ui_internal blobhealthdisplay.layer = 20 - mymob.client.screen = null + mymob.client.screen = list() mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay) - + mymob.client.screen += mymob.client.void \ No newline at end of file diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 878efe59e65..0ff982967fb 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -136,6 +136,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 + mymob.blind.mouse_opacity = 0 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' @@ -148,10 +149,11 @@ mymob.zone_sel.icon = 'icons/mob/screen_cyborg.dmi' mymob.zone_sel.update_icon() - mymob.client.screen = null + mymob.client.screen = list() mymob.client.screen += list(mymob.zone_sel, mymob.hands, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach ) mymob.client.screen += adding + other + mymob.client.screen += mymob.client.void return diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index e15c104de11..bc045a9923d 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -274,17 +274,6 @@ overlays.Cut() overlays += image('icons/mob/screen_gen.dmi', "[selecting]") - -/obj/screen/Click(location, control, params) - if(!usr) return 1 - - if(name == "Reset Machine") //I don't know what this is, CTRL+F has the only entry right here in this file, so I'm going to leave it in case it is something important - usr.unset_machine() - else - return 0 - - return 1 - /obj/screen/inventory/Click() // At this point in client Click() code we have passed the 1/10 sec check and little else // We don't even know if it's a middle click diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 06d2c036020..14a2b5bdaf9 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -40,5 +40,8 @@ preload_rsc = PRELOAD_RSC + var/global/obj/screen/click_catcher/void + // Used by html_interface module. - var/hi_last_pos \ No newline at end of file + var/hi_last_pos + diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 366f113a114..1d4fe387de0 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -169,6 +169,11 @@ var/next_external_rsc = 0 send_resources() + if(!void) + void = new() + + screen += void + if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. src << "You have unread updates in the changelog." if(config.aggressive_changelog) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 7b9348d0108..3bb4f016578 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -65,7 +65,8 @@ /mob/living/simple_animal/Login() if(src && src.client) - src.client.screen = null + src.client.screen = list() + client.screen += client.void ..() /mob/living/simple_animal/updatehealth() diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 64aedb0f45c..c6b61942361 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -29,7 +29,7 @@ world.update_status() client.images = null //remove the images such as AIs being unable to see runes - client.screen = null //remove hud items just in case + client.screen = list() //remove hud items just in case if(hud_used) del(hud_used) //remove the hud objects hud_used = new /datum/hud(src) @@ -54,6 +54,8 @@ if(ckey in deadmins) verbs += /client/proc/readmin + client.screen += client.void + // Calling update_interface() in /mob/Login() causes the Cyborg to immediately be ghosted; because of winget(). // Calling it in the overriden Login, such as /mob/living/Login() doesn't cause this. /mob/proc/update_interface() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 1ff60cfeffb..7e1b151a408 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -492,6 +492,7 @@ var/list/slot_equipment_priority = list( \ log_game("[usr.key] AM failed due to disconnect.") return client.screen.Cut() + client.screen += client.void if(!client) log_game("[usr.key] AM failed due to disconnect.") return