diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 6d497cff462..70e5be37934 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -22,6 +22,9 @@ if(modifiers["shift"] && modifiers["alt"]) AltShiftClickOn(A) return + if(modifiers["middle"] && modifiers["ctrl"]) + CtrlMiddleClickOn(A) + return if(modifiers["middle"]) MiddleClickOn(A) return @@ -98,11 +101,19 @@ return return -//Middle click cycles through selected modules. -/mob/living/silicon/robot/MiddleClickOn(var/atom/A) +//Ctrl+Middle click cycles through modules +/mob/living/silicon/robot/proc/CtrlMiddleClickOn(var/atom/A) cycle_modules() return +//Middle click points +/mob/living/silicon/robot/MiddleClickOn(var/atom/A) + if(istype(src, /mob/living/silicon/robot/drone)) + // Drones cannot point. + return + A.point() + return + //Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks // for non-doors/apcs /mob/living/silicon/robot/CtrlShiftClickOn(var/atom/A) diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index 0b481630513..eadef1b98c1 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -37,6 +37,8 @@ else if(module_state_3 == O) module_state_3 = null inv3.icon_state = "inv3" + if(hud_used) + hud_used.update_robot_modules_display() return 1 /mob/living/silicon/robot/proc/activate_module(var/obj/item/O) @@ -77,6 +79,17 @@ uneq_module(module_state_2) uneq_module(module_state_3) +/mob/living/silicon/robot/proc/uneq_numbered(var/module) + if(module < 1 || module > 3) return + + switch(module) + if(1) + uneq_module(module_state_1) + if(2) + uneq_module(module_state_2) + if(3) + uneq_module(module_state_3) + /mob/living/silicon/robot/proc/activated(obj/item/O) if(module_state_1 == O) return 1 diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index a50d948dc3b..cc40497b37c 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -43,6 +43,14 @@ if(iscarbon(usr)) var/mob/living/carbon/C = usr C.toggle_throw_mode() + else if(isrobot(usr)) + var/mob/living/silicon/robot/R = usr + var/module = R.get_selected_module() + if(!module) + usr << "\red You have no module selected." + return + R.cycle_modules() + R.uneq_numbered(module) else usr << "\red This mob type cannot throw items." return @@ -55,6 +63,12 @@ usr << "\red You have nothing to drop in your hand." return drop_item() + else if(isrobot(usr)) + var/mob/living/silicon/robot/R = usr + if(!R.get_selected_module()) + usr << "\red You have no module selected." + return + R.deselect_module(R.get_selected_module()) else usr << "\red This mob type cannot drop items." return diff --git a/interface/interface.dm b/interface/interface.dm index cc370f2d626..f1148629515 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -68,9 +68,9 @@ Hotkey-Mode: (hotkey-mode must be on) \ts = down \td = right \tw = up -\tq = drop +\tq = drop item / deselect cyborg module \te = equip -\tr = throw +\tr = toggle throw / unequip cyborg module \tt = say \tx = swap-hand \tz = activate held object (or y) @@ -88,9 +88,9 @@ Any-Mode: (hotkey doesn't need to be on) \tCtrl+s = down \tCtrl+d = right \tCtrl+w = up -\tCtrl+q = drop +\tCtrl+q = drop item / deselect cyborg module \tCtrl+e = equip -\tCtrl+r = throw +\tCtrl+r = toggle throw / unequip cyborg module \tCtrl+x = swap-hand \tCtrl+z = activate held object (or Ctrl+y) \tCtrl+f = cycle-intents-left @@ -101,10 +101,10 @@ Any-Mode: (hotkey doesn't need to be on) \tCtrl+4 = harm-intent \tDEL = pull \tINS = cycle-intents-right -\tHOME = drop +\tHOME = drop item / deselect cyborg module \tPGUP = swap-hand \tPGDN = activate held object -\tEND = throw +\tEND = toggle throw / unequip cyborg module "} var/admin = {"