From a2e1089c5c3cb2cdec28467a41f13d9a6fafc9f6 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Wed, 26 Mar 2014 20:27:06 -0700 Subject: [PATCH 01/10] Give cyborgs existing ai mouse shortcuts. Gives cyborgs existing AI control/alt/shift click shortcuts while allowing for them to be used on non-doors/apc normally. (shift still inspects, control still drags, etc) --- code/_onclick/cyborg.dm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 14291469c77..ac7ae86d5e1 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -100,6 +100,41 @@ cycle_modules() return +//Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks +// for non-doors/apcs +/mob/living/silicon/robot/ShiftClickOn(var/atom/A) + A.BorgShiftClick(src) +/mob/living/silicon/robot/CtrlClickOn(var/atom/A) + A.BorgCtrlClick(src) +/mob/living/silicon/robot/AltClickOn(var/atom/A) + A.BorgAltClick(src) + + +/atom/proc/BorgShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden + ShiftClick(user) + +/obj/machinery/door/airlock/BorgShiftClick() // Opens and closes doors! Forwards to AI code. + AIShiftClick() + + +/atom/proc/BorgCtrlClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden + CtrlClick(user) + +/obj/machinery/door/airlock/BorgCtrlClick() // Bolts doors. Forwards to AI code. + AICtrlClick() + +/obj/machinery/power/apc/BorgCtrlClick() // turns off/on APCs. Forwards to AI code. + AICtrlClick() + + +/atom/proc/BorgAltClick(var/mob/living/silicon/robot/user) + AltClick(user) + return + +/obj/machinery/door/airlock/BorgAltClick() // Eletrifies doors. Forwards to AI code. + AIAltClick() + + /* As with AI, these are not used in click code, because the code for robots is specific, not generic. From a26b2252a066e92e78e7705f91b1401ac88afc11 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Thu, 27 Mar 2014 04:19:05 -0700 Subject: [PATCH 02/10] borgified hotkeys for borg players changed: 1-3 = module select/toggle 4 = toggle intent q = unequip active module changed hotkey help to reflect this for borg players. --- .../modules/mob/living/silicon/robot/login.dm | 1 + .../modules/mob/living/silicon/robot/robot.dm | 13 + interface/interface.dm | 49 ++- interface/skin.dmf | 404 ++++++++++++++++++ 4 files changed, 465 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index 3aef61fb3d5..dc539bf2297 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -3,4 +3,5 @@ regenerate_icons() show_laws(0) if(mind) ticker.mode.remove_revolutionary(mind) + winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5") return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4a33a9a6d3e..cb3b02bbe25 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -125,6 +125,7 @@ mmi = null ..() + /mob/living/silicon/robot/proc/pick_module() if(module) return @@ -240,6 +241,18 @@ set name = "Show Alerts" robot_alerts() +//for borg hotkeys, here module refers to borg inv slot, not core module +/mob/living/silicon/robot/verb/cmd_toggle_module(module as num) + set name = "Toggle Module" + set hidden = 1 + toggle_module(module) + +/mob/living/silicon/robot/verb/cmd_unequip_module() + set name = "Unequip Module" + set hidden = 1 + uneq_active() + + /mob/living/silicon/robot/proc/robot_alerts() var/dat = "Current Station Alerts\n" dat += "Close

" diff --git a/interface/interface.dm b/interface/interface.dm index fccaed6eb3f..1085fa46b34 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -81,6 +81,47 @@ Any-Mode: (hotkey doesn't need to be on) \tEND = throw "} + + var/borghotkey_mode = {" +Hotkey-Mode: (hotkey-mode must be on) +\tTAB = toggle hotkey-mode +\ta = left +\ts = down +\td = right +\tw = up +\tq = unequip active module +\tt = say +\tx = cycle active modules +\tz = activate held object (or y) +\tf = cycle-intents-left +\tg = cycle-intents-right +\t1 = activate module 1 +\t2 = activate module 2 +\t3 = activate module 3 +\t4 = toggle intents +"} + + var/borgother = {" +Any-Mode: (hotkey doesn't need to be on) +\tCtrl+a = left +\tCtrl+s = down +\tCtrl+d = right +\tCtrl+w = up +\tCtrl+q = unequip active module +\tCtrl+x = cycle active modules +\tCtrl+z = activate held object (or Ctrl+y) +\tCtrl+f = cycle-intents-left +\tCtrl+g = cycle-intents-right +\tCtrl+1 = activate module 1 +\tCtrl+2 = activate module 2 +\tCtrl+3 = activate module 3 +\tCtrl+4 = toggle intents +\tDEL = pull +\tINS = toggle intents +\tPGUP = cycle active modules +\tPGDN = activate held object +"} + var/admin = {" Admin: \tF5 = Aghost (admin-ghost) @@ -88,8 +129,12 @@ Admin: \tF7 = admin-pm \tF8 = Invisimin "} + if (isrobot(mob)) + src << borghotkey_mode + src << borgother + else + src << hotkey_mode + src << other - src << hotkey_mode - src << other if(holder) src << admin diff --git a/interface/skin.dmf b/interface/skin.dmf index a3979a4615b..38514a16595 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -1,3 +1,237 @@ +macro "borghotkeymode" + elem + name = "TAB" + command = ".winset \"mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5\"" + is-disabled = false + elem + name = "CENTER+REP" + command = ".center" + is-disabled = false + elem + name = "NORTHEAST" + command = ".northeast" + is-disabled = false + elem + name = "SOUTHEAST" + command = ".southeast" + is-disabled = false + elem + name = "SOUTHWEST" + command = ".southwest" + is-disabled = false + elem + name = "NORTHWEST" + command = ".northwest" + is-disabled = false + elem + name = "CTRL+WEST" + command = "westface" + is-disabled = false + elem + name = "WEST+REP" + command = ".west" + is-disabled = false + elem + name = "CTRL+NORTH" + command = "northface" + is-disabled = false + elem + name = "NORTH+REP" + command = ".north" + is-disabled = false + elem + name = "CTRL+EAST" + command = "eastface" + is-disabled = false + elem + name = "EAST+REP" + command = ".east" + is-disabled = false + elem + name = "CTRL+SOUTH" + command = "southface" + is-disabled = false + elem + name = "SOUTH+REP" + command = ".south" + is-disabled = false + elem + name = "INSERT" + command = "a-intent right" + is-disabled = false + elem + name = "DELETE" + command = "delete-key-pressed" + is-disabled = false + elem + name = "1" + command = "toggle-module 1" + is-disabled = false + elem + name = "CTRL+1" + command = "toggle-module 1" + is-disabled = false + elem + name = "2" + command = "toggle-module 2" + is-disabled = false + elem + name = "CTRL+2" + command = "toggle-module 2" + is-disabled = false + elem + name = "3" + command = "toggle-module 3" + is-disabled = false + elem + name = "CTRL+3" + command = "toggle-module 3" + is-disabled = false + elem + name = "4" + command = "a-intent left" + is-disabled = false + elem + name = "CTRL+4" + command = "a-intent left" + is-disabled = false + elem + name = "A+REP" + command = ".west" + is-disabled = false + elem + name = "CTRL+A+REP" + command = ".west" + is-disabled = false + elem + name = "D+REP" + command = ".east" + is-disabled = false + elem + name = "CTRL+D+REP" + command = ".east" + is-disabled = false + elem + name = "E" + command = "quick-equip" + is-disabled = false + elem + name = "CTRL+E" + command = "quick-equip" + is-disabled = false + elem + name = "F" + command = "a-intent left" + is-disabled = false + elem + name = "CTRL+F" + command = "a-intent left" + is-disabled = false + elem + name = "G" + command = "a-intent right" + is-disabled = false + elem + name = "CTRL+G" + command = "a-intent right" + is-disabled = false + elem + name = "Q" + command = "unequip-module" + is-disabled = false + elem + name = "CTRL+Q" + command = "unequip-module" + is-disabled = false + elem + name = "R" + command = ".southwest" + is-disabled = false + elem + name = "CTRL+R" + command = ".southwest" + is-disabled = false + elem "s_key" + name = "S+REP" + command = ".south" + is-disabled = false + elem + name = "CTRL+S+REP" + command = ".south" + is-disabled = false + elem + name = "T" + command = "say" + is-disabled = false + elem "w_key" + name = "W+REP" + command = ".north" + is-disabled = false + elem + name = "CTRL+W+REP" + command = ".north" + is-disabled = false + elem + name = "X" + command = ".northeast" + is-disabled = false + elem + name = "CTRL+X" + command = ".northeast" + is-disabled = false + elem + name = "Y" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "CTRL+Y" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "Z" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "CTRL+Z" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "F1" + command = "adminhelp" + is-disabled = false + elem + name = "CTRL+SHIFT+F1+REP" + command = ".options" + is-disabled = false + elem + name = "F2+REP" + command = ".screenshot auto" + is-disabled = false + elem + name = "SHIFT+F2+REP" + command = ".screenshot" + is-disabled = false + elem + name = "F5" + command = "Aghost" + is-disabled = false + elem + name = "F6" + command = "Player-Panel-New" + is-disabled = false + elem + name = "F7" + command = "Admin-PM" + is-disabled = false + elem + name = "F8" + command = "Invisimin" + is-disabled = false + elem + name = "F12" + command = "F12" + is-disabled = false + macro "macro" elem name = "TAB" @@ -398,6 +632,172 @@ macro "hotkeymode" command = "F12" is-disabled = false +macro "borgmacro" + elem + name = "TAB" + command = ".winset \"mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0\"" + is-disabled = false + elem + name = "CENTER+REP" + command = ".center" + is-disabled = false + elem + name = "NORTHEAST" + command = ".northeast" + is-disabled = false + elem + name = "SOUTHEAST" + command = ".southeast" + is-disabled = false + elem + name = "SOUTHWEST" + command = ".southwest" + is-disabled = false + elem + name = "NORTHWEST" + command = ".northwest" + is-disabled = false + elem + name = "CTRL+WEST" + command = "westface" + is-disabled = false + elem + name = "WEST+REP" + command = ".west" + is-disabled = false + elem + name = "CTRL+NORTH" + command = "northface" + is-disabled = false + elem + name = "NORTH+REP" + command = ".north" + is-disabled = false + elem + name = "CTRL+EAST" + command = "eastface" + is-disabled = false + elem + name = "EAST+REP" + command = ".east" + is-disabled = false + elem + name = "CTRL+SOUTH" + command = "southface" + is-disabled = false + elem + name = "SOUTH+REP" + command = ".south" + is-disabled = false + elem + name = "INSERT" + command = "a-intent right" + is-disabled = false + elem + name = "DELETE" + command = "delete-key-pressed" + is-disabled = false + elem + name = "CTRL+1" + command = "toggle-module 1" + is-disabled = false + elem + name = "CTRL+2" + command = "toggle-module 2" + is-disabled = false + elem + name = "CTRL+3" + command = "toggle-module 3" + is-disabled = false + elem + name = "CTRL+4" + command = "a-intent left" + is-disabled = false + elem + name = "CTRL+A+REP" + command = ".west" + is-disabled = false + elem + name = "CTRL+D+REP" + command = ".east" + is-disabled = false + elem + name = "CTRL+E" + command = "quick-equip" + is-disabled = false + elem + name = "CTRL+F" + command = "a-intent left" + is-disabled = false + elem + name = "CTRL+G" + command = "a-intent right" + is-disabled = false + elem + name = "CTRL+Q" + command = "unequip-module" + is-disabled = false + elem + name = "CTRL+R" + command = ".southwest" + is-disabled = false + elem + name = "CTRL+S+REP" + command = ".south" + is-disabled = false + elem + name = "CTRL+W+REP" + command = ".north" + is-disabled = false + elem + name = "CTRL+X" + command = ".northeast" + is-disabled = false + elem + name = "CTRL+Y" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "CTRL+Z" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "F1" + command = "adminhelp" + is-disabled = false + elem + name = "CTRL+SHIFT+F1+REP" + command = ".options" + is-disabled = false + elem + name = "F2+REP" + command = ".screenshot auto" + is-disabled = false + elem + name = "SHIFT+F2+REP" + command = ".screenshot" + is-disabled = false + elem + name = "F5" + command = "Aghost" + is-disabled = false + elem + name = "F6" + command = "Player-Panel-New" + is-disabled = false + elem + name = "F7" + command = "Admin-PM" + is-disabled = false + elem + name = "F8" + command = "Invisimin" + is-disabled = false + elem + name = "F12" + command = "F12" + is-disabled = false + menu "menu" elem @@ -1322,6 +1722,8 @@ window "mapwindow" on-size = "" icon-size = 0 text-mode = false + letterbox = true + zoom = 0 on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\"" on-hide = ".winset\"mainwindow.mainvsplit.left=\"" style = "" @@ -1794,4 +2196,6 @@ window "infowindow" on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\"" on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\"" on-tab = "" + prefix-color = none + suffix-color = none From 636d4d34aedf550ac4d0d113e759bfd9ab6f6f20 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Thu, 27 Mar 2014 21:12:44 -0700 Subject: [PATCH 03/10] Add access override hotkey control+shift to ai Also adds framework for control+shift click capturing to _onclick, can be used by most atoms --- code/_onclick/ai.dm | 17 +++++++++++++++++ code/_onclick/click.dm | 14 ++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 8e1d42c1926..d7de9bb6fc1 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -36,6 +36,9 @@ return var/list/modifiers = params2list(params) + if(modifiers["shift"] && modifiers["ctrl"]) + CtrlShiftClickOn(A) + return if(modifiers["middle"]) MiddleClickOn(A) return @@ -85,6 +88,9 @@ than anything else in the game, atoms have separate procs for AI shift, ctrl, and alt clicking. */ + +/mob/living/silicon/ai/CtrlShiftClickOn(var/atom/A) + A.AICtrlShiftClick(src) /mob/living/silicon/ai/ShiftClickOn(var/atom/A) A.AIShiftClick(src) /mob/living/silicon/ai/CtrlClickOn(var/atom/A) @@ -96,6 +102,17 @@ The following criminally helpful code is just the previous code cleaned up; I have no idea why it was in atoms.dm instead of respective files. */ +/atom/proc/AICtrlShiftClick() + return + +/obj/machinery/door/airlock/AICtrlShiftClick() // Sets/Unsets Emergency Access Override + if(emagged) + return + if(!emergency) + Topic("aiEnable=11", list("aiEnable"="11"), 1) // 1 meaning no window (consistency!) + else + Topic("aiDisable=11", list("aiDisable"="11"), 1) + return /atom/proc/AIShiftClick() return diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 8dedc4bbcd5..1f8c6c051d5 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -43,6 +43,9 @@ return var/list/modifiers = params2list(params) + if(modifiers["shift"] && modifiers["ctrl"]) + CtrlShiftClickOn(A) + return if(modifiers["middle"]) MiddleClickOn(A) return @@ -259,6 +262,17 @@ /mob/proc/TurfAdjacent(var/turf/T) return T.Adjacent(src) +/* + Control+Shift click + Unused except for AI +*/ +/mob/proc/CtrlShiftClickOn(var/atom/A) + A.CtrlShiftClick(src) + return + +/atom/proc/CtrlShiftClick(var/mob/user) + return + /* Misc helpers From 5c4d5841542c4fa0c77c08a103cad2159b3af975 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Thu, 27 Mar 2014 21:29:15 -0700 Subject: [PATCH 04/10] undid random changes added by DM --- interface/skin.dmf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/interface/skin.dmf b/interface/skin.dmf index 38514a16595..a0312cca125 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -1722,8 +1722,6 @@ window "mapwindow" on-size = "" icon-size = 0 text-mode = false - letterbox = true - zoom = 0 on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\"" on-hide = ".winset\"mainwindow.mainvsplit.left=\"" style = "" @@ -2196,6 +2194,4 @@ window "infowindow" on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\"" on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\"" on-tab = "" - prefix-color = none - suffix-color = none From 69a5e065e8ff5d6be5416a9a0f7e8eca999728e6 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Thu, 27 Mar 2014 23:10:21 -0700 Subject: [PATCH 05/10] AI and cyborgs control/alt click shortcuts for turret controls. Control click toggles turrets on/off state. Alt click toggles turrent lethal state. --- code/_onclick/ai.dm | 8 ++++++++ code/_onclick/cyborg.dm | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index d7de9bb6fc1..fcaa4c66c64 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -141,6 +141,10 @@ /obj/machinery/power/apc/AICtrlClick() // turns off/on APCs. toggle_breaker() +/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets + src.enabled = !src.enabled + src.updateTurrets() + /atom/proc/AIAltClick(var/mob/living/silicon/ai/user) AltClick(user) @@ -157,6 +161,10 @@ Topic("aiDisable=5", list("aiDisable"="5"), 1) return +/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets + src.lethal = !src.lethal + src.updateTurrets() + // // Override TurfAdjacent for AltClicking // diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index ac7ae86d5e1..b3571cfbf88 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -126,6 +126,8 @@ /obj/machinery/power/apc/BorgCtrlClick() // turns off/on APCs. Forwards to AI code. AICtrlClick() +/obj/machinery/turretid/BorgCtrlClick() //turret control on/off. Forwards to AI code. + AICtrlClick() /atom/proc/BorgAltClick(var/mob/living/silicon/robot/user) AltClick(user) @@ -134,6 +136,8 @@ /obj/machinery/door/airlock/BorgAltClick() // Eletrifies doors. Forwards to AI code. AIAltClick() +/obj/machinery/turretid/BorgAltClick() //turret lethal on/off. Forwards to AI code. + AIAltClick() /* As with AI, these are not used in click code, From a72f70de25cc64bafcfc7e97e9e2d3063107ded1 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Thu, 27 Mar 2014 23:36:12 -0700 Subject: [PATCH 06/10] Gives cyborgs control+shift shortcut for access override Gives cyborg access override shortcut control+shift click that was given to ais eariler --- code/_onclick/cyborg.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index b3571cfbf88..049b0d15172 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -19,6 +19,9 @@ return var/list/modifiers = params2list(params) + if(modifiers["shift"] && modifiers["ctrl"]) + CtrlShiftClickOn(A) + return if(modifiers["middle"]) MiddleClickOn(A) return @@ -102,6 +105,8 @@ //Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks // for non-doors/apcs +/mob/living/silicon/robot/CtrlShiftClickOn(var/atom/A) + A.BorgCtrlShiftClick(src) /mob/living/silicon/robot/ShiftClickOn(var/atom/A) A.BorgShiftClick(src) /mob/living/silicon/robot/CtrlClickOn(var/atom/A) @@ -109,6 +114,12 @@ /mob/living/silicon/robot/AltClickOn(var/atom/A) A.BorgAltClick(src) +/atom/proc/BorgCtrlShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden + CtrlShiftClick(user) + +/obj/machinery/door/airlock/BorgCtrlShiftClick() // Sets/Unsets Emergency Access Override Forwards to AI code. + AiCtrlShiftClick() + /atom/proc/BorgShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden ShiftClick(user) From 21a36ea8c5bd33a9a4d988b1c0c24816d63d5ccc Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Thu, 27 Mar 2014 23:51:48 -0700 Subject: [PATCH 07/10] Cleaned up unused borg hotkeys Also imported end over to copy what q does. --- interface/skin.dmf | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/interface/skin.dmf b/interface/skin.dmf index a0312cca125..5fe557c7d15 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -15,13 +15,9 @@ macro "borghotkeymode" name = "SOUTHEAST" command = ".southeast" is-disabled = false - elem - name = "SOUTHWEST" - command = ".southwest" - is-disabled = false elem name = "NORTHWEST" - command = ".northwest" + command = "unequip-module" is-disabled = false elem name = "CTRL+WEST" @@ -111,14 +107,6 @@ macro "borghotkeymode" name = "CTRL+D+REP" command = ".east" is-disabled = false - elem - name = "E" - command = "quick-equip" - is-disabled = false - elem - name = "CTRL+E" - command = "quick-equip" - is-disabled = false elem name = "F" command = "a-intent left" @@ -143,14 +131,6 @@ macro "borghotkeymode" name = "CTRL+Q" command = "unequip-module" is-disabled = false - elem - name = "R" - command = ".southwest" - is-disabled = false - elem - name = "CTRL+R" - command = ".southwest" - is-disabled = false elem "s_key" name = "S+REP" command = ".south" @@ -649,13 +629,9 @@ macro "borgmacro" name = "SOUTHEAST" command = ".southeast" is-disabled = false - elem - name = "SOUTHWEST" - command = ".southwest" - is-disabled = false elem name = "NORTHWEST" - command = ".northwest" + command = "unequip-module" is-disabled = false elem name = "CTRL+WEST" @@ -721,10 +697,6 @@ macro "borgmacro" name = "CTRL+D+REP" command = ".east" is-disabled = false - elem - name = "CTRL+E" - command = "quick-equip" - is-disabled = false elem name = "CTRL+F" command = "a-intent left" @@ -737,10 +709,6 @@ macro "borgmacro" name = "CTRL+Q" command = "unequip-module" is-disabled = false - elem - name = "CTRL+R" - command = ".southwest" - is-disabled = false elem name = "CTRL+S+REP" command = ".south" From 5a6082c29f8fe092c3013b952235dfcbb7f1afb0 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Fri, 28 Mar 2014 00:18:07 -0700 Subject: [PATCH 08/10] fix small typo stopping compiling. --- code/_onclick/cyborg.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 049b0d15172..03540cebca6 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -118,7 +118,7 @@ CtrlShiftClick(user) /obj/machinery/door/airlock/BorgCtrlShiftClick() // Sets/Unsets Emergency Access Override Forwards to AI code. - AiCtrlShiftClick() + AICtrlShiftClick() /atom/proc/BorgShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden From 80c4dabb55cc93fa7aa18584ce7d787eb6a365ee Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Mon, 31 Mar 2014 18:16:50 -0700 Subject: [PATCH 09/10] Cleans up hotkey-help. Made hotkey-help use overriden mob procs to avoid a future mess of if than else nestings if anyone gets the bright idea to add more hotkeys --- interface/interface.dm | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/interface/interface.dm b/interface/interface.dm index 1085fa46b34..4e4aa598e2f 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -35,6 +35,21 @@ set name = "hotkeys-help" set category = "OOC" + var/adminhotkeys = {" +Admin: +\tF5 = Aghost (admin-ghost) +\tF6 = player-panel-new +\tF7 = admin-pm +\tF8 = Invisimin +"} + + mob.hotkey_help() + + if(holder) + src << adminhotkeys + + +/mob/proc/hotkey_help() var/hotkey_mode = {" Hotkey-Mode: (hotkey-mode must be on) \tTAB = toggle hotkey-mode @@ -81,8 +96,11 @@ Any-Mode: (hotkey doesn't need to be on) \tEND = throw "} + src << hotkey_mode + src << other - var/borghotkey_mode = {" +/mob/living/silicon/robot/hotkey_help() + var/hotkey_mode = {" Hotkey-Mode: (hotkey-mode must be on) \tTAB = toggle hotkey-mode \ta = left @@ -101,7 +119,7 @@ Hotkey-Mode: (hotkey-mode must be on) \t4 = toggle intents "} - var/borgother = {" + var/other = {" Any-Mode: (hotkey doesn't need to be on) \tCtrl+a = left \tCtrl+s = down @@ -122,19 +140,5 @@ Any-Mode: (hotkey doesn't need to be on) \tPGDN = activate held object "} - var/admin = {" -Admin: -\tF5 = Aghost (admin-ghost) -\tF6 = player-panel-new -\tF7 = admin-pm -\tF8 = Invisimin -"} - if (isrobot(mob)) - src << borghotkey_mode - src << borgother - else - src << hotkey_mode - src << other - - if(holder) - src << admin + src << hotkey_mode + src << other \ No newline at end of file From 25fe463eb2a0c2fa16f57754e75775b7ee19d2f7 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Mon, 31 Mar 2014 22:04:33 -0700 Subject: [PATCH 10/10] Ensures re-humaned cyborgs get normal macros. --- code/modules/mob/living/silicon/robot/login.dm | 4 ++++ code/modules/mob/login.dm | 2 ++ 2 files changed, 6 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index dc539bf2297..2ee3d634b05 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -1,7 +1,11 @@ + + /mob/living/silicon/robot/Login() ..() regenerate_icons() show_laws(0) if(mind) ticker.mode.remove_revolutionary(mind) + winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5") + return \ No newline at end of file diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 5d7d3c7f81f..4dfaf4be75d 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -47,4 +47,6 @@ if(isobj(loc)) var/obj/Loc=loc Loc.on_log() + //set macro to normal incase it was overriden (like cyborg currently does) + winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")