diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index b8caa45399..56af5949f7 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -80,8 +80,10 @@ return if(in_throw_mode) - throw_item(A) - return + 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 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1384ef94fe..b1dee3b207 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 49e02b6e79..6c601c419e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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" \ No newline at end of file