From 4edc10c0a1fda8c33cea46b03bb1c4027f2634d1 Mon Sep 17 00:00:00 2001 From: "elly1989@rocketmail.com" Date: Wed, 26 Sep 2012 16:27:47 +0000 Subject: [PATCH] Fixed an issue where ticker.mode could be set to null, triggering a restart, where it'd be set to null again...and so on. Added a activate held item hotkey Added intent hotkeys to 1 2 3 and 4 keys. hotkeys-help for details. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4759 316c924e-a436-60f5-8080-3fe189b3f50e --- code/controllers/configuration.dm | 2 +- code/modules/client/client defines.dm | 3 +- html/changelog.html | 8 + interface/interface.dm | 89 ++++---- interface/skin.dmf | 284 ++++++++++++++++---------- 5 files changed, 233 insertions(+), 153 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 7c226e72c6..a2a5a28ba3 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -504,7 +504,7 @@ if (M.config_tag && M.config_tag == mode_name) return M del(M) - return null + return new /datum/game_mode/extended() /datum/configuration/proc/get_runnable_modes() var/list/datum/game_mode/runnable_modes = new diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 700dee2106..0d6770bed0 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -7,8 +7,7 @@ var/seeprayers = 0 var/muted = 0 - - var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming. + var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming. var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent. var/warned = 0 diff --git a/html/changelog.html b/html/changelog.html index 9d4d86d947..ff9c873ebe 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -48,6 +48,14 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

26 September 2012

+

Carnwennan updated:

+ +
+

25 September 2012

Donkie updated:

diff --git a/interface/interface.dm b/interface/interface.dm index 0d66556e46..1d5333778d 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -30,56 +30,47 @@ src << browse(file(RULES_FILE), "window=rules;size=480x320") #undef RULES_FILE -/client/verb/a_intent_left() - set name = "a-intent-left" +var/list/intents = list("help","disarm","grab","hurt") +/proc/intent_numeric(argument) + if(istext(argument)) + switch(argument) + if("help") return 0 + if("disarm") return 1 + if("grab") return 2 + else return 3 + else + switch(argument) + if(0) return "help" + if(1) return "disarm" + if(2) return "grab" + else return "hurt" + + +/client/verb/a_intent_change(input as text) + set name = "a-intent" set hidden = 1 if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr)) - switch(usr.a_intent) - if("help") - usr.a_intent = "hurt" - usr.hud_used.action_intent.icon_state = "intent_hurt" - if("disarm") - usr.a_intent = "help" - usr.hud_used.action_intent.icon_state = "intent_help" - if("grab") - usr.a_intent = "disarm" - usr.hud_used.action_intent.icon_state = "intent_disarm" - if("hurt") - usr.a_intent = "grab" - usr.hud_used.action_intent.icon_state = "intent_grab" + switch(input) + if("help","disarm","grab","hurt") + usr.a_intent = input + if("right") + usr.a_intent = intent_numeric((intent_numeric(usr.a_intent)+1) % 4) + if("left") + usr.a_intent = intent_numeric((intent_numeric(usr.a_intent)+3) % 4) + usr.hud_used.action_intent.icon_state = "intent_[usr.a_intent]" + else if(issilicon(usr)) - if(usr.a_intent == "help") - usr.a_intent = "hurt" + switch(input) + if("help") + usr.a_intent = "help" + if("hurt") + usr.a_intent = "hurt" + if("right","left") + usr.a_intent = intent_numeric(intent_numeric(usr.a_intent) - 3) + if(usr.a_intent == "hurt") usr.hud_used.action_intent.icon_state = "harm" else - usr.a_intent = "help" - usr.hud_used.action_intent.icon_state = "help" - -/client/verb/a_intent_right() - set name = "a-intent-right" - set hidden = 1 - - if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr)) - switch(usr.a_intent) - if("help") - usr.a_intent = "disarm" - usr.hud_used.action_intent.icon_state = "intent_disarm" - if("disarm") - usr.a_intent = "grab" - usr.hud_used.action_intent.icon_state = "intent_grab" - if("grab") - usr.a_intent = "hurt" - usr.hud_used.action_intent.icon_state = "intent_hurt" - if("hurt") - usr.a_intent = "help" - usr.hud_used.action_intent.icon_state = "intent_help" - else if(issilicon(usr)) - if(usr.a_intent == "help") - usr.a_intent = "hurt" - usr.hud_used.action_intent.icon_state = "harm" - else - usr.a_intent = "help" usr.hud_used.action_intent.icon_state = "help" @@ -99,8 +90,13 @@ Hotkey-Mode: (hotkey-mode must be on) \tr = throw \tt = say \tx = swap-hand +\tz = activate held object (or y) \tf = cycle-intents-left \tg = cycle-intents-right +\t1 = help-intent +\t2 = disarm-intent +\t3 = grab-intent +\t4 = harm-intent "} var/other = {" @@ -113,8 +109,13 @@ Any-Mode: (hotkey doesn't need to be on) \tCtrl+e = equip \tCtrl+r = throw \tCtrl+x = swap-hand +\tCtrl+z = activate held object (or Ctrl+y) \tCtrl+f = cycle-intents-left \tCtrl+g = cycle-intents-right +\tCtrl+1 = help-intent +\tCtrl+2 = disarm-intent +\tCtrl+3 = grab-intent +\tCtrl+4 = harm-intent "} var/admin = {" diff --git a/interface/skin.dmf b/interface/skin.dmf index 27b24a4cd5..efed0da1e5 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -47,10 +47,50 @@ macro "macro" 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 = "insert-key-pressed" + is-disabled = false + elem + name = "DELETE" + command = "delete-key-pressed" + is-disabled = false + elem + name = "CTRL+1" + command = "a-intent help" + is-disabled = false + elem + name = "CTRL+2" + command = "a-intent disarm" + is-disabled = false + elem + name = "CTRL+3" + command = "a-intent grab" + is-disabled = false + elem + name = "CTRL+4" + command = "a-intent hurt" + is-disabled = false elem name = "CTRL+A+REP" command = ".west" is-disabled = false + elem + name = "CTRL+Z" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "CTRL+Y" + command = "Activate-Held-Object" + is-disabled = false elem name = "CTRL+D+REP" command = ".east" @@ -61,11 +101,11 @@ macro "macro" is-disabled = false elem name = "CTRL+F" - command = "a-intent-left" + command = "a-intent left" is-disabled = false elem name = "CTRL+G" - command = "a-intent-right" + command = "a-intent right" is-disabled = false elem name = "CTRL+Q" @@ -87,22 +127,6 @@ macro "macro" name = "CTRL+X" command = ".northeast" 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 = "insert-key-pressed" - is-disabled = false - elem - name = "DELETE" - command = "delete-key-pressed" - is-disabled = false elem name = "F1" command = "adminhelp" @@ -189,90 +213,6 @@ macro "hotkeymode" name = "EAST+REP" command = ".east" is-disabled = false - elem "a_key" - name = "A+REP" - command = ".west" - is-disabled = false - elem - name = "CTRL+A+REP" - command = ".west" - is-disabled = false - elem "d_key" - name = "D+REP" - command = ".east" - is-disabled = false - elem - name = "CTRL+D+REP" - command = ".east" - is-disabled = false - elem "e_key" - name = "E" - command = "quick-equip" - is-disabled = false - elem - name = "CTRL+E" - command = "quick-equip" - is-disabled = false - elem "f_key" - name = "F" - command = "a-intent-left" - is-disabled = false - elem - name = "CTRL+F" - command = "a-intent-left" - is-disabled = false - elem "g_key" - name = "G" - command = "a-intent-right" - is-disabled = false - elem - name = "CTRL+G" - command = "a-intent-right" - is-disabled = false - elem "q_key" - name = "Q" - command = ".northwest" - is-disabled = false - elem - name = "CTRL+Q" - command = ".northwest" - is-disabled = false - elem "r_key" - 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 "t_key" - 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 "x_key" - name = "X" - command = ".northeast" - is-disabled = false - elem - name = "CTRL+X" - command = ".northeast" - is-disabled = false elem name = "CTRL+SOUTH" command = "southface" @@ -289,6 +229,138 @@ macro "hotkeymode" name = "DELETE" command = "delete-key-pressed" is-disabled = false + elem + name = "1" + command = "a-intent help" + is-disabled = false + elem + name = "CTRL+1" + command = "a-intent help" + is-disabled = false + elem + name = "2" + command = "a-intent disarm" + is-disabled = false + elem + name = "CTRL+2" + command = "a-intent disarm" + is-disabled = false + elem + name = "3" + command = "a-intent grab" + is-disabled = false + elem + name = "CTRL+3" + command = "a-intent grab" + is-disabled = false + elem + name = "4" + command = "a-intent hurt" + is-disabled = false + elem + name = "CTRL+4" + command = "a-intent hurt" + is-disabled = false + elem + name = "A+REP" + command = ".west" + is-disabled = false + elem + name = "CTRL+A+REP" + command = ".west" + 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 = "Y" + command = "Activate-Held-Object" + is-disabled = false + elem + name = "CTRL+Y" + command = "Activate-Held-Object" + 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 = ".northwest" + is-disabled = false + elem + name = "CTRL+Q" + command = ".northwest" + 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 = "F1" command = "adminhelp" @@ -326,6 +398,7 @@ macro "hotkeymode" command = "F12" is-disabled = false + menu "menu" elem name = "&File" @@ -1112,7 +1185,6 @@ window "mainwindow" size = 517x20 anchor1 = 0,100 anchor2 = 100,100 - focus = true font-family = "" font-size = 0 font-style = "" @@ -1206,10 +1278,10 @@ window "mapwindow" size = 640x480 anchor1 = 0,0 anchor2 = 100,100 - font-family = "" - font-size = 0 + font-family = "Arial Rounded MT Bold,Arial Black,Arial,sans-serif" + font-size = 7 font-style = "" - text-color = #FFFFFF + text-color = none background-color = none is-visible = true is-disabled = false