diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index f71a40a011..360c9e1bbf 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -7,7 +7,6 @@ #define MELEE 1 #define RANGED 2 - /obj/mecha name = "Mecha" desc = "Exosuit" @@ -1051,6 +1050,17 @@ return +/obj/mecha/MouseDrop_T(mob/O, mob/user as mob) + //Humans can pilot mechs. + if(!ishuman(O)) + return + + //Can't put other people into mechs (can comment this out if you want that to be possible) + if(O != user) + return + + move_inside() + /obj/mecha/verb/move_inside() set category = "Object" set name = "Enter Exosuit" @@ -1060,17 +1070,17 @@ return if (usr.buckled) - usr << "You can't climb into the exosuit while buckled!" + to_chat(usr,"You can't climb into the exosuit while buckled!") return src.log_message("[usr] tries to move in.") if(iscarbon(usr)) var/mob/living/carbon/C = usr if(C.handcuffed) - usr << "Kinda hard to climb in while handcuffed don't you think?" + to_chat(usr,"Kinda hard to climb in while handcuffed don't you think?") return if (src.occupant) - usr << "The [src.name] is already occupied!" + to_chat(usr,"The [src.name] is already occupied!") src.log_append_to_last("Permission denied.") return /* @@ -1085,12 +1095,12 @@ else if(src.operation_allowed(usr)) passed = 1 if(!passed) - usr << "Access denied" + to_chat(usr,"Access denied") src.log_append_to_last("Permission denied.") return for(var/mob/living/simple_animal/slime/M in range(1,usr)) if(M.victim == usr) - usr << "You're too busy getting your life sucked out of you." + to_chat(usr,"You're too busy getting your life sucked out of you.") return // usr << "You start climbing into [src.name]" @@ -1100,9 +1110,9 @@ if(!src.occupant) moved_inside(usr) else if(src.occupant!=usr) - usr << "[src.occupant] was faster. Try better next time, loser." + to_chat(usr,"[src.occupant] was faster. Try better next time, loser.") else - usr << "You stop entering the exosuit." + to_chat(usr,"You stop entering the exosuit.") return /obj/mecha/proc/moved_inside(var/mob/living/carbon/human/H as mob) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index b5395456ed..269e7b6fc8 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -127,12 +127,16 @@ else src.toggle(user) +/obj/structure/closet/secure_closet/AltClick() + ..() + verb_togglelock() + /obj/structure/closet/secure_closet/verb/verb_togglelock() set src in oview(1) // One square distance set category = "Object" set name = "Toggle Lock" - if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain + if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) // Don't use it if you're not able to! Checks for stuns, ghost and restrain return if(ishuman(usr) || isrobot(usr))