Merge pull request #10237 from mwerezak/throw-mode

Fixes #10230
This commit is contained in:
PsiOmegaDelta
2015-07-19 10:55:56 +02:00
3 changed files with 22 additions and 18 deletions

View File

@@ -80,8 +80,10 @@
return
if(in_throw_mode)
if(isturf(A) || isturf(A.loc))
throw_item(A)
return
throw_mode_off()
if(!istype(A,/obj/item/weapon/gun) && !isturf(A) && !istype(A,/obj/screen))
last_target_click = world.time

View File

@@ -316,22 +316,6 @@
//Throwing stuff
/mob/living/carbon/proc/toggle_throw_mode()
if (src.in_throw_mode)
throw_mode_off()
else
throw_mode_on()
/mob/living/carbon/proc/throw_mode_off()
src.in_throw_mode = 0
if(src.throw_icon) //in case we don't have the HUD and we use the hotkey
src.throw_icon.icon_state = "act_throw_off"
/mob/living/carbon/proc/throw_mode_on()
src.in_throw_mode = 1
if(src.throw_icon)
src.throw_icon.icon_state = "act_throw_on"
/mob/proc/throw_item(atom/target)
return

View File

@@ -1009,3 +1009,21 @@ mob/proc/yank_out_object()
/mob/verb/westfaceperm()
set hidden = 1
set_face_dir(WEST)
//Throwing stuff
/mob/proc/toggle_throw_mode()
if (src.in_throw_mode)
throw_mode_off()
else
throw_mode_on()
/mob/proc/throw_mode_off()
src.in_throw_mode = 0
if(src.throw_icon) //in case we don't have the HUD and we use the hotkey
src.throw_icon.icon_state = "act_throw_off"
/mob/proc/throw_mode_on()
src.in_throw_mode = 1
if(src.throw_icon)
src.throw_icon.icon_state = "act_throw_on"