From 80c4dabb55cc93fa7aa18584ce7d787eb6a365ee Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Mon, 31 Mar 2014 18:16:50 -0700 Subject: [PATCH] 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