diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 20927cee63..af06f192bc 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -35,12 +35,13 @@ do_climb(usr) -/obj/structure/MouseDrop(atom/over_object) +/obj/structure/MouseDrop_T(mob/target, mob/user) - var/mob/living/H = over_object - if(!istype(H)) return ..() + var/mob/living/H = user + if(!istype(H) || target != user) // No making other people climb onto tables. + return - do_climb(H) + do_climb(target) /obj/structure/proc/do_climb(var/mob/living/user) @@ -50,8 +51,15 @@ var/turf/T = src.loc if(!T || !istype(T)) return - var/obj/machinery/door/poddoor/shutters/S = locate() in T.contents - if(S && S.density) return + for(var/obj/O in T.contents) + if(istype(O,/obj/structure)) + var/obj/structure/S = O + if(S.climbable) + continue + + if(O && O.density) + usr << "\red There's \a [O] in the way." + return usr.visible_message("[user] starts climbing onto \the [src]!") @@ -61,10 +69,18 @@ if (!can_touch(user) || !climbable) return - S = locate() in T.contents - if(S && S.density) return + for(var/obj/O in T.contents) + if(istype(O,/obj/structure)) + var/obj/structure/S = O + if(S.climbable) + continue + + if(O && O.density) + usr << "\red There's \a [O] in the way." + return usr.loc = get_turf(src) + if (get_turf(user) == get_turf(src)) usr.visible_message("[user] climbs onto \the [src]!") diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 1278902171..2bda55b93f 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -346,8 +346,9 @@ return 1 /obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob) + if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O)) - return + return ..() if(isrobot(user)) return user.drop_item()