TG: * Added pickup verb to all items

* Added "Toggle Open" verb to all closets and crates
* Added "Toggle Lock" verb to all lockable closets

* Modified the cloning computer's UI slightly, makes more sense, added a little
delay when scanning to improve user feedback when trying to clone several
braindead bodies.
Revision: r3712
Author: 	 daniel.cf.hultgren
This commit is contained in:
Erthilo
2012-06-03 18:41:51 +01:00
parent 361f5bde15
commit 808f76eaf3
6 changed files with 160 additions and 120 deletions
+27
View File
@@ -232,3 +232,30 @@
if(!src.toggle())
usr << "\blue It won't budge!"
/obj/structure/closet/verb/verb_toggleopen()
set src in view(1)
set category = "Object"
set name = "Toggle Open"
if(!(usr))
return
if(!istype(src.loc, /turf) || usr.stat || usr.restrained() )
usr << "\red You can't interact with this!"
return
if(src.anchored)
usr << "\red You can't interact with this!"
return
if(istype(usr, /mob/living/silicon/robot))
src.attack_hand(usr)
return
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))
usr << "\red You can't interact with this!"
return
if(istype(usr, /mob/living/carbon/human))
src.attack_hand(usr)
if(istype(usr, /mob/living/carbon/alien))
src.attack_alien(usr)
if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr)
return
@@ -24,6 +24,19 @@
src.req_access += pick(get_all_accesses())
..()
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
if(src.allowed(user))
src.locked = !src.locked
for(var/mob/O in viewers(user, 3))
if((O.client && !( O.blinded )))
O << "\blue The locker has been [src.locked ? null : "un"]locked by [user]."
if(src.locked)
src.icon_state = src.icon_locked
else
src.icon_state = src.icon_closed
else
user << "\red Access Denied"
/obj/structure/closet/secure_closet/attackby(obj/item/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
@@ -83,8 +96,7 @@
else
user << "You need to stay still!"
else
user << "\red Access Denied"
return
togglelock(user)
/obj/structure/closet/secure_closet/relaymove(mob/user as mob)
if(user.stat)
@@ -114,4 +126,16 @@
return src.attackby(null, user)
/obj/structure/closet/secure_closet/attack_paw(mob/user as mob)
return src.attack_hand(user)
return src.attack_hand(user)
/obj/structure/closet/secure_closet/verb/verb_togglelock()
set src in oview(1) // Can only use it from 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
return
if(!opened) // If we let him lock it while it's open, it will close without the items inside going with it
togglelock(usr)
-35
View File
@@ -70,41 +70,6 @@
src.loc = T
obj/item/verb/pick_up()
set name = "Pick Up"
set category = "Object"
set src in view(1)
if(!(usr))
return
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
usr << "\red You can't pick things up!"
return
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
usr << "\red You can't pick things up!"
return
if(src.anchored) //Object isn't anchored
usr << "\red You can't pick that up!"
return
if(!usr.hand && usr.r_hand) //Right hand is not full
usr << "\red Your right hand is full."
return
if(usr.hand && usr.l_hand) //Left hand is not full
usr << "\red Your left hand is full."
return
if(!istype(src.loc, /turf)) //Object is on a turf
usr << "\red You can't pick that up!"
return
//All checks are done, time to pick it up!
if(istype(usr, /mob/living/carbon/human))
src.attack_hand(usr)
if(istype(usr, /mob/living/carbon/alien))
src.attack_alien(usr)
if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr)
return
/obj/item/examine()
set src in view()