From bf6b9587abe79a32362c99564541b8f8e329df4c Mon Sep 17 00:00:00 2001 From: Razharas Date: Wed, 3 Jun 2015 02:17:24 +0300 Subject: [PATCH 1/9] Autoclick on holding button and swap hands fix Added preference setting that makes you able to just hold down mouse button and if you have something in your hands it will autoclick on everything you are pointing at, no need to clickspam anymore, take care of your fingers and mouses Made it so you can swap hands with middle mouse button even if clicking on the empty void of nothingness, thus fixing some old issue i cant care to find Thats it --- code/__DEFINES/preferences.dm | 1 + code/modules/client/client procs.dm | 28 +++++++++++++++++++ code/modules/client/preferences.dm | 8 ++++++ code/modules/client/preferences_savefile.dm | 2 ++ .../mob/living/carbon/carbon_defines.dm | 1 + 5 files changed, 40 insertions(+) diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index bc0dd8fc2b4..be7ab26b7d3 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -43,3 +43,4 @@ #define BE_SHADOWLING 8192 #define BE_ABDUCTOR 16384 #define BE_REVENANT 32768 +#define AUTOCLICK_DELAY 1 \ No newline at end of file diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 2fc40207bab..3770501ae60 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -20,6 +20,34 @@ - If so, is there any protection against somebody spam-clicking a link? If you have any questions about this stuff feel free to ask. ~Carn */ + +/client/MouseDown(object,location,control,params) + if(mob && prefs && prefs.autoclick_delay && object && istype(mob, /mob/living/carbon)) + var/mob/living/carbon/C = mob + if(!C.get_active_hand()) + return ..() + C.is_mouse_down = object + spawn() + while(C.is_mouse_down == object) + C.ClickOn(C.is_mouse_down, params) + sleep(1) + return + +/client/MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params) + if(over_object) + MouseDown(over_object, over_location, over_control, params) + +/client/MouseUp(object,location,control,params) + if(mob) + if(!object) + var/list/modifiers = params2list(params) + if(modifiers["middle"]) + mob.MiddleClickOn() + return + if(istype(mob, /mob/living/carbon)) + var/mob/living/carbon/C = mob + C.is_mouse_down = null + /client/Topic(href, href_list, hsrc) if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null return diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 20f36cdc3e5..c3c6db827d9 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -63,6 +63,7 @@ datum/preferences var/datum/species/pref_species = new /datum/species/human() //Mutant race var/mutant_color = "FFF" //Mutant race skin color var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity") + var/autoclick_delay = 0 //Mob preview var/icon/preview_icon_front = null @@ -253,6 +254,7 @@ datum/preferences if (1) // Game Preferences dat += "
" dat += "

General Settings

" + dat += "Autoclick on mouse button hold: [autoclick_delay ? "Yes" : "No"]
" dat += "UI Style: [UI_style]
" dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" @@ -827,6 +829,12 @@ datum/preferences if("hear_adminhelps") toggles ^= SOUND_ADMINHELP + if("autoclick") + if(autoclick_delay) + autoclick_delay = 0 + else + autoclick_delay = AUTOCLICK_DELAY + if("ui") switch(UI_style) if("Midnight") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index f2da84ddd52..925640ab996 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -104,6 +104,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["chat_toggles"] >> chat_toggles S["toggles"] >> toggles S["ghost_form"] >> ghost_form + S["autoclick_delay"] >> autoclick_delay //try to fix any outdated data if necessary if(needs_update >= 0) @@ -137,6 +138,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["toggles"] << toggles S["chat_toggles"] << chat_toggles S["ghost_form"] << ghost_form + S["autoclick_delay"] << autoclick_delay return 1 diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 41a04d1273f..98227c43016 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -25,3 +25,4 @@ has_limbs = 1 var/remote_view = 0 + var/is_mouse_down = null \ No newline at end of file From fea00718a0c889669e07d576cadcccd7fded90c2 Mon Sep 17 00:00:00 2001 From: Razharas Date: Thu, 4 Jun 2015 07:47:20 +0300 Subject: [PATCH 2/9] Made swap hands use screen object Made swap hands use screen object Also now blindness is restricting your ability to click You can shoot at darkness now, it calculates the turf you want to shoot Added toggleable verb into the prefs tab for autoclick Made proc that calculates turf from screen loc and origin turf --- code/__HELPERS/unsorted.dm | 11 +++++++++++ code/_onclick/hud/alien.dm | 1 + code/_onclick/hud/alien_larva.dm | 1 + code/_onclick/hud/human.dm | 2 +- code/_onclick/hud/monkey.dm | 1 + code/_onclick/hud/other_mobs.dm | 1 + code/_onclick/hud/robot.dm | 1 + code/_onclick/hud/screen_objects.dm | 12 ++++++------ code/modules/client/client procs.dm | 16 +++++----------- code/modules/client/preferences.dm | 5 +---- code/modules/client/preferences_toggles.dm | 9 +++++++++ 11 files changed, 38 insertions(+), 22 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index adb3b60c80b..468389350b0 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1304,3 +1304,14 @@ var/list/WALLITEMS = list( "lime","darkgreen","cyan","navy","teal","purple","indigo") 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(256, origin.x + (text2num(tX) - (world.view + 1)))) + tY = max(1, min(256, origin.y + (text2num(tY) - (world.view + 1)))) + return locate(tX, tY, tZ) diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index 8c52e9221d5..cad52b60f45 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 = 1 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index ab395f371e1..831da83665b 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 = 1 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 64e8cdc77e9..0ceadec778b 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 = 0 + mymob.blind.mouse_opacity = 1 mymob.blind.layer = 0 mymob.damageoverlay = new /obj/screen() diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index ad2d394d7b3..baf048ebdfd 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 = 1 mymob.damageoverlay = new /obj/screen() mymob.damageoverlay.icon = 'icons/mob/screen_full.dmi' diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index c74f1ee7849..340b8a5bfc2 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -12,6 +12,7 @@ mymob.blind.name = " " mymob.blind.screen_loc = "CENTER-7,CENTER-7" mymob.blind.layer = 0 + mymob.blind.mouse_opacity = 1 mymob.client.screen = null mymob.client.screen += list(mymob.blind) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 878efe59e65..8597089b677 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 = 1 mymob.flash = new /obj/screen() mymob.flash.icon = 'icons/mob/screen_gen.dmi' diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index e15c104de11..96b1f7e54a6 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -276,13 +276,13 @@ /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() + var/list/modifiers = params2list(params) + if(modifiers["middle"] && istype(usr, /mob/living/carbon)) + var/mob/living/carbon/C = usr + C.swap_hand() else - return 0 - + var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr)) + T.Click(location, control, params) return 1 /obj/screen/inventory/Click() diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 3770501ae60..26464ab9526 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -22,16 +22,15 @@ */ /client/MouseDown(object,location,control,params) - if(mob && prefs && prefs.autoclick_delay && object && istype(mob, /mob/living/carbon)) + if(mob && prefs && prefs.autoclick_delay && object && !istype(object, /obj/screen) && istype(mob, /mob/living/carbon)) var/mob/living/carbon/C = mob - if(!C.get_active_hand()) - return ..() C.is_mouse_down = object spawn() - while(C.is_mouse_down == object) + while(C && C.is_mouse_down == object) + if(!C.get_active_hand()) + return ..() C.ClickOn(C.is_mouse_down, params) - sleep(1) - return + sleep(world.tick_lag) /client/MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params) if(over_object) @@ -39,11 +38,6 @@ /client/MouseUp(object,location,control,params) if(mob) - if(!object) - var/list/modifiers = params2list(params) - if(modifiers["middle"]) - mob.MiddleClickOn() - return if(istype(mob, /mob/living/carbon)) var/mob/living/carbon/C = mob C.is_mouse_down = null diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c3c6db827d9..dc4f25f634a 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -830,10 +830,7 @@ datum/preferences toggles ^= SOUND_ADMINHELP if("autoclick") - if(autoclick_delay) - autoclick_delay = 0 - else - autoclick_delay = AUTOCLICK_DELAY + autoclick_delay = !autoclick_delay if("ui") switch(UI_style) diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index db9fbce26e5..d9d9e5385b9 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -1,4 +1,13 @@ //toggles +/client/verb/toggle_autoclick() + set name = "Toggle Autoclick" + set category = "Preferences" + set desc = ".Enable or disable autoclick" + prefs.autoclick_delay = !prefs.autoclick_delay + src << "You have [prefs.autoclick_delay ? "enabled" : "disabled"] autoclick." + prefs.save_preferences() + feedback_add_details("admin_verb","TAC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + /client/verb/toggle_ghost_ears() set name = "Show/Hide GhostEars" set category = "Preferences" From 55e9760ff0d49784225e48652f54c63ad065ca16 Mon Sep 17 00:00:00 2001 From: Razharas Date: Thu, 4 Jun 2015 08:50:02 +0300 Subject: [PATCH 3/9] Forgot to remove this Forgot to remove this --- code/__DEFINES/preferences.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index be7ab26b7d3..080cd1f72fa 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -42,5 +42,4 @@ #define BE_GANG 4096 #define BE_SHADOWLING 8192 #define BE_ABDUCTOR 16384 -#define BE_REVENANT 32768 -#define AUTOCLICK_DELAY 1 \ No newline at end of file +#define BE_REVENANT 32768 \ No newline at end of file From 20c586b9e1611a056258577a262a9cebcfab3134 Mon Sep 17 00:00:00 2001 From: Razharas Date: Thu, 4 Jun 2015 22:56:09 +0300 Subject: [PATCH 4/9] World max x instead of 256 World max x instead of 256 --- code/__HELPERS/unsorted.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 468389350b0..4e82f172059 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1312,6 +1312,6 @@ var/list/WALLITEMS = list( tY = tY[1] tX = text2list(tX[1], ":") tX = tX[1] - tX = max(1, min(256, origin.x + (text2num(tX) - (world.view + 1)))) - tY = max(1, min(256, origin.y + (text2num(tY) - (world.view + 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) From cdc32a50c388e063b49ceae592403b1f0ef2ef5f Mon Sep 17 00:00:00 2001 From: Razharas Date: Sat, 6 Jun 2015 07:10:46 +0300 Subject: [PATCH 5/9] Made special object instead of using blindscreen Made special object instead of using blindscreen --- code/_onclick/click.dm | 17 +++++++++++++++++ code/_onclick/hud/alien.dm | 6 +++--- code/_onclick/hud/alien_larva.dm | 7 ++++--- code/_onclick/hud/drones.dm | 3 ++- code/_onclick/hud/human.dm | 5 +++-- code/_onclick/hud/monkey.dm | 5 +++-- code/_onclick/hud/other_mobs.dm | 9 +++++---- code/_onclick/hud/robot.dm | 5 +++-- code/_onclick/hud/screen_objects.dm | 11 ----------- code/modules/client/client defines.dm | 1 + code/modules/client/client procs.dm | 5 +++++ .../mob/living/simple_animal/simple_animal.dm | 9 +++++---- code/modules/mob/login.dm | 4 +++- code/modules/mob/mob.dm | 1 + 14 files changed, 55 insertions(+), 33 deletions(-) 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 From e5c261b311678ecd32f8dfeb3f67f6fbf54feccd Mon Sep 17 00:00:00 2001 From: Razharas Date: Wed, 10 Jun 2015 07:42:43 +0300 Subject: [PATCH 6/9] Fixing accidental DME Fixing accidental DME --- tgstation.dme | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/tgstation.dme b/tgstation.dme index 7228643b5bd..42c59cb7caa 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6,52 +6,6 @@ // BEGIN_FILE_DIR #define FILE_DIR . -#define FILE_DIR "html" -#define FILE_DIR "icons" -#define FILE_DIR "icons/ass" -#define FILE_DIR "icons/effects" -#define FILE_DIR "icons/mecha" -#define FILE_DIR "icons/misc" -#define FILE_DIR "icons/mob" -#define FILE_DIR "icons/mob/inhands" -#define FILE_DIR "icons/obj" -#define FILE_DIR "icons/obj/assemblies" -#define FILE_DIR "icons/obj/atmospherics" -#define FILE_DIR "icons/obj/clothing" -#define FILE_DIR "icons/obj/doors" -#define FILE_DIR "icons/obj/flora" -#define FILE_DIR "icons/obj/food" -#define FILE_DIR "icons/obj/guns" -#define FILE_DIR "icons/obj/hydroponics" -#define FILE_DIR "icons/obj/machines" -#define FILE_DIR "icons/obj/pipes" -#define FILE_DIR "icons/obj/power_cond" -#define FILE_DIR "icons/pda_icons" -#define FILE_DIR "icons/spideros_icons" -#define FILE_DIR "icons/stamp_icons" -#define FILE_DIR "icons/Testing" -#define FILE_DIR "icons/turf" -#define FILE_DIR "icons/vending_icons" -#define FILE_DIR "nano" -#define FILE_DIR "nano/images" -#define FILE_DIR "sound" -#define FILE_DIR "sound/AI" -#define FILE_DIR "sound/ambience" -#define FILE_DIR "sound/effects" -#define FILE_DIR "sound/guitar" -#define FILE_DIR "sound/hallucinations" -#define FILE_DIR "sound/items" -#define FILE_DIR "sound/machines" -#define FILE_DIR "sound/magic" -#define FILE_DIR "sound/mecha" -#define FILE_DIR "sound/misc" -#define FILE_DIR "sound/piano" -#define FILE_DIR "sound/spookoween" -#define FILE_DIR "sound/violin" -#define FILE_DIR "sound/voice" -#define FILE_DIR "sound/voice/complionator" -#define FILE_DIR "sound/vox_fem" -#define FILE_DIR "sound/weapons" // END_FILE_DIR // BEGIN_PREFERENCES From f3f398feb94d2a844612c6ca1c3fcd34033bc2ad Mon Sep 17 00:00:00 2001 From: Razharas Date: Mon, 29 Jun 2015 23:17:16 +0300 Subject: [PATCH 7/9] Removes the autoclick, keeps the dark click --- code/modules/mob/living/carbon/carbon_defines.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 2704a2ccdd7..50a9c2c47fe 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -29,5 +29,4 @@ var/obj/item/weapon/reagent_containers/food/snacks/meat/slab/type_of_meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/ var/remote_view = 0 - var/is_mouse_down = null var/gib_type = /obj/effect/decal/cleanable/blood/gibs From 3705c6182ab83ab380e63280c4d3e031fc0ee78a Mon Sep 17 00:00:00 2001 From: Razharas Date: Mon, 29 Jun 2015 23:27:20 +0300 Subject: [PATCH 8/9] Removes autoclick for real this time --- code/modules/client/client procs.dm | 22 --------------------- code/modules/client/preferences.dm | 5 ----- code/modules/client/preferences_savefile.dm | 2 -- code/modules/client/preferences_toggles.dm | 9 --------- 4 files changed, 38 deletions(-) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index bb9b6ff4806..79b1dd0f0a4 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -20,28 +20,6 @@ - If so, is there any protection against somebody spam-clicking a link? If you have any questions about this stuff feel free to ask. ~Carn */ - -/client/MouseDown(object,location,control,params) - if(mob && prefs && prefs.autoclick_delay && object && !istype(object, /obj/screen) && istype(mob, /mob/living/carbon)) - var/mob/living/carbon/C = mob - C.is_mouse_down = object - spawn() - while(C && C.is_mouse_down == object) - if(!C.get_active_hand()) - return ..() - C.ClickOn(C.is_mouse_down, params) - sleep(world.tick_lag) - -/client/MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params) - if(over_object) - MouseDown(over_object, over_location, over_control, params) - -/client/MouseUp(object,location,control,params) - if(mob) - if(istype(mob, /mob/living/carbon)) - var/mob/living/carbon/C = mob - C.is_mouse_down = null - /client/Topic(href, href_list, hsrc) if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null return diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d2111bca49a..1b737182ae9 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -64,7 +64,6 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set var/list/features = list("mcolor" = "FFF", "tail" = "Smooth", "snout" = "Round", "horns" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None") var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity") - var/autoclick_delay = 0 //Mob preview var/icon/preview_icon_front = null @@ -309,7 +308,6 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set if (1) // Game Preferences dat += "
" dat += "

General Settings

" - dat += "Autoclick on mouse button hold: [autoclick_delay ? "Yes" : "No"]
" dat += "UI Style: [UI_style]
" dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" @@ -919,9 +917,6 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set if("hear_adminhelps") toggles ^= SOUND_ADMINHELP - if("autoclick") - autoclick_delay = !autoclick_delay - if("ui") switch(UI_style) if("Midnight") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index d8ef4645dd5..a239561ede0 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -104,7 +104,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["chat_toggles"] >> chat_toggles S["toggles"] >> toggles S["ghost_form"] >> ghost_form - S["autoclick_delay"] >> autoclick_delay //try to fix any outdated data if necessary if(needs_update >= 0) @@ -138,7 +137,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["toggles"] << toggles S["chat_toggles"] << chat_toggles S["ghost_form"] << ghost_form - S["autoclick_delay"] << autoclick_delay return 1 diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 472e0912568..99218130f57 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -1,13 +1,4 @@ //toggles -/client/verb/toggle_autoclick() - set name = "Toggle Autoclick" - set category = "Preferences" - set desc = ".Enable or disable autoclick" - prefs.autoclick_delay = !prefs.autoclick_delay - src << "You have [prefs.autoclick_delay ? "enabled" : "disabled"] autoclick." - prefs.save_preferences() - feedback_add_details("admin_verb","TAC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /client/verb/toggle_ghost_ears() set name = "Show/Hide GhostEars" set category = "Preferences" From e0a6d35f1616a4b26bffaff75fec1ea53275f2e8 Mon Sep 17 00:00:00 2001 From: Razharas Date: Mon, 29 Jun 2015 23:29:50 +0300 Subject: [PATCH 9/9] Fixes some weird travis change --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 052a53f7ccc..b6cce2273b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ language: c env: global: - - BYOND_MAJOR="506" - - BYOND_MINOR="1247" + - BYOND_MAJOR="507" + - BYOND_MINOR="1286" matrix: - DM_MAPFILE="tgstation2" - DM_MAPFILE="metastation"