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 cad52b60f45..74a5392417d 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -134,7 +134,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 - mymob.blind.mouse_opacity = 1 + mymob.blind.mouse_opacity = 0 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' @@ -147,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 831da83665b..ab50702cd69 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -38,7 +38,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 - mymob.blind.mouse_opacity = 1 + mymob.blind.mouse_opacity = 0 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' @@ -51,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 0ceadec778b..d9a9ba93dec 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -282,7 +282,7 @@ mymob.blind.icon_state = "blackimageoverlay" mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" - mymob.blind.mouse_opacity = 1 + mymob.blind.mouse_opacity = 0 mymob.blind.layer = 0 mymob.damageoverlay = new /obj/screen() @@ -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 baf048ebdfd..32b4e98832e 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -120,7 +120,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 - mymob.blind.mouse_opacity = 1 + mymob.blind.mouse_opacity = 0 mymob.damageoverlay = new /obj/screen() mymob.damageoverlay.icon = 'icons/mob/screen_full.dmi' @@ -142,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 @@ -151,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 340b8a5bfc2..cc9937f5e71 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -12,10 +12,11 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 - mymob.blind.mouse_opacity = 1 + 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') @@ -31,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 8597089b677..0ff982967fb 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -136,7 +136,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 - mymob.blind.mouse_opacity = 1 + mymob.blind.mouse_opacity = 0 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' @@ -149,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 96b1f7e54a6..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) - 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 - /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 7467f12ad97..e56e2e092fd 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -39,3 +39,4 @@ var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id preload_rsc = PRELOAD_RSC + var/global/obj/screen/click_catcher/void \ No newline at end of file diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 26464ab9526..4d831f5ff89 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -188,6 +188,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 4c2abe52a30..5af4b0ffa0d 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() @@ -494,11 +495,11 @@ /mob/living/simple_animal/update_transform() var/matrix/ntransform = matrix(transform) //aka transform.Copy() var/changed = 0 - + if(resize != RESIZE_DEFAULT_SIZE) changed++ ntransform.Scale(resize) resize = RESIZE_DEFAULT_SIZE - + if(changed) - animate(src, transform = ntransform, time = 2, easing = EASE_IN|EASE_OUT) + animate(src, transform = ntransform, time = 2, easing = EASE_IN|EASE_OUT) 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 c5d468e9ae9..e116423eff3 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