diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index 0b78c6622f7..c90a8c19dbb 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -35,6 +35,9 @@
return
var/list/modifiers = params2list(params)
+ if(modifiers["shift"] && modifiers["ctrl"])
+ CtrlShiftClickOn(A)
+ return
if(modifiers["middle"])
MiddleClickOn(A)
return
@@ -83,6 +86,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)
@@ -94,6 +100,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
@@ -122,6 +139,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)
@@ -138,6 +159,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/click.dm b/code/_onclick/click.dm
index 389129dbe2a..163c7c3aa5f 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
@@ -242,6 +245,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
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index aefd8747cdc..69d5a23bb2b 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
@@ -87,6 +90,53 @@
cycle_modules()
return
+//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)
+ A.BorgCtrlClick(src)
+/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)
+
+/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()
+
+/obj/machinery/turretid/BorgCtrlClick() //turret control on/off. 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()
+
+/obj/machinery/turretid/BorgAltClick() //turret lethal on/off. Forwards to AI code.
+ AIAltClick()
+
/*
As with AI, these are not used in click code,
because the code for robots is specific, not generic.
diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm
index 3aef61fb3d5..2ee3d634b05 100644
--- a/code/modules/mob/living/silicon/robot/login.dm
+++ b/code/modules/mob/living/silicon/robot/login.dm
@@ -1,6 +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/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/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")
diff --git a/interface/interface.dm b/interface/interface.dm
index fccaed6eb3f..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,15 +96,49 @@ Any-Mode: (hotkey doesn't need to be on)
\tEND = throw
"}
- var/admin = {"
-Admin:
-\tF5 = Aghost (admin-ghost)
-\tF6 = player-panel-new
-\tF7 = admin-pm
-\tF8 = Invisimin
+ src << hotkey_mode
+ src << other
+
+/mob/living/silicon/robot/hotkey_help()
+ var/hotkey_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/other = {"
+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
"}
src << hotkey_mode
- src << other
- if(holder)
- src << admin
+ src << other
\ No newline at end of file
diff --git a/interface/skin.dmf b/interface/skin.dmf
index a3979a4615b..5fe557c7d15 100644
--- a/interface/skin.dmf
+++ b/interface/skin.dmf
@@ -1,3 +1,217 @@
+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 = "NORTHWEST"
+ command = "unequip-module"
+ 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 = "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 "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 +612,160 @@ 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 = "NORTHWEST"
+ command = "unequip-module"
+ 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+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+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