From a2e1089c5c3cb2cdec28467a41f13d9a6fafc9f6 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Wed, 26 Mar 2014 20:27:06 -0700 Subject: [PATCH] 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.