From 89aa2d0a90e776ff21dcbd92a01f853910aaa2c9 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Mon, 21 May 2012 20:31:53 +0100 Subject: [PATCH] TG: - Fixed some odd behavior with storage items when you drag-dropped them from the floor without ever picking them up. - New hotkeys: Delete is the 'stop dragging' button and insert cycles through intents. - Added some user feedback messages to the drop, throw, stop-dragging and cycle- intents hotkeys. - Added the hotkeys thing to the changelog. Revision: r3631 Author: baloh.matevz --- code/modules/mob/mob_movement.dm | 62 ++++++++++++++++++++++++++++++-- interface/skin.dmf | 16 ++++++--- 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 55c052db4b..d0b5ae9c2f 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -38,14 +38,72 @@ /client/Southwest() - toggle_throw_mode() + if(iscarbon(usr)) + var/mob/living/carbon/C = usr + if(!C.get_active_hand()) + usr << "\red You have nothing in your hand to throw." + return + toggle_throw_mode() + else + usr << "\red This mob type cannot throw items." return /client/Northwest() - drop_item() + if(iscarbon(usr)) + var/mob/living/carbon/C = usr + if(!C.get_active_hand()) + usr << "\red You have nothing to drop in your hand." + return + drop_item() + else + usr << "\red This mob type cannot drop items." return +//This gets called when you press the insert button. +/client/verb/insert_key_pressed() + set hidden = 1 + + if(!src.mob) + return + var/mob/M = src.mob + if(ishuman(M) || isrobot(usr) || ismonkey(M) || istype(M,/mob/living/carbon/alien/humanoid) || islarva(M)) + switch(M.a_intent) + if("help") + if(issilicon(usr)) + usr.a_intent = "hurt" + usr.hud_used.action_intent.icon_state = "harm" + else + usr.a_intent = "disarm" + usr.hud_used.action_intent.icon_state = "disarm" + + if("disarm") + usr.a_intent = "hurt" + usr.hud_used.action_intent.icon_state = "harm" + + if("hurt") + if(issilicon(usr)) + usr.a_intent = "help" + usr.hud_used.action_intent.icon_state = "help" + else + usr.a_intent = "grab" + usr.hud_used.action_intent.icon_state = "grab" + + if("grab") + usr.a_intent = "help" + usr.hud_used.action_intent.icon_state = "help" + usr << "\blue Your intent is now \"[usr.a_intent]\"." + else + usr << "\red This mob type does not use intents." + +//This gets called when you press the delete button. +/client/verb/delete_key_pressed() + set hidden = 1 + + if(!usr.pulling) + usr << "\blue You are not pulling anything." + return + usr.pulling = null /client/verb/swap_hand() set hidden = 1 diff --git a/interface/skin.dmf b/interface/skin.dmf index 934b5e5751..a44aa1987b 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -4,19 +4,19 @@ macro "macro" command = ".center" is-disabled = false elem - name = "NORTHEAST+REP" + name = "NORTHEAST" command = ".northeast" is-disabled = false elem - name = "SOUTHEAST+REP" + name = "SOUTHEAST" command = ".southeast" is-disabled = false elem - name = "SOUTHWEST+REP" + name = "SOUTHWEST" command = ".southwest" is-disabled = false elem - name = "NORTHWEST+REP" + name = "NORTHWEST" command = ".northwest" is-disabled = false elem @@ -51,6 +51,14 @@ macro "macro" 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+A" command = "toggle-throw-mode"