From 8f9e08150ecb5743a2e138022c199178908bde91 Mon Sep 17 00:00:00 2001 From: DJSnapshot Date: Sat, 2 Nov 2013 12:26:34 -0700 Subject: [PATCH] mecha fixes --- code/_onclick/click.dm | 2 ++ code/_onclick/hud/screen_objects.dm | 8 +++++++- code/game/objects/items/weapons/storage/storage.dm | 3 +++ code/modules/mob/mob.dm | 4 +++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 5687c386fdb..fd0b658aa0b 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -65,6 +65,8 @@ return if(istype(loc,/obj/mecha)) + if(!locate(/turf) in list(A,A.loc)) // Prevents inventory from being drilled + return var/obj/mecha/M = loc return M.click_action(A,src) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 69b7eb3a510..4ca8f9f5d75 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -50,7 +50,7 @@ return 1 if(usr.next_move >= world.time) return - usr.next_move = world.time + 10 + usr.next_move = world.time + 6 if(usr.stat || usr.restrained() || usr.stunned || usr.lying) return 1 @@ -89,6 +89,8 @@ return 1 if(usr.stat || usr.paralysis || usr.stunned || usr.weakened) return 1 + if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + return 1 if(master) var/obj/item/I = usr.get_active_hand() if(I) @@ -210,6 +212,8 @@ usr.hud_used.hidden_inventory_update() if("equip") + if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + return 1 if(ishuman(usr)) var/mob/living/carbon/human/H = usr H.quick_equip() @@ -424,6 +428,8 @@ return 1 if(usr.stat || usr.paralysis || usr.stunned || usr.weakened) return 1 + if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + return 1 switch(name) if("r_hand") if(iscarbon(usr)) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 097be6669f9..c49a79f07c6 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -27,6 +27,9 @@ if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist var/mob/M = usr + if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + return + if(over_object == M && Adjacent(M)) // this must come before the screen objects only block orient2hud(M) // dunno why it wasn't before if(M.s_active) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7bf1a6e418c..5eae0e7325b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -241,6 +241,8 @@ var/list/slot_equipment_priority = list( \ set category = "Object" set src = usr + if(istype(loc,/obj/mecha)) return + if(hand) var/obj/item/W = l_hand if (W) @@ -983,4 +985,4 @@ mob/verb/yank_out_object() host << "You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent." else usr << "You are not dead or you have given up your right to be respawned!" - return \ No newline at end of file + return