Made mousetraps an assembly.

The path has changed from /obj/item/weapon/mousetrap to /obj/item/device/assembly/mousetrap
Deleted mousetraps.dm, and removed the original define from weapon.dm

Added a new /obj/item proc, on_found(). It's called when pockets are emptied, and whenever someone looks in a storage item. Currently used only by mousetraps and facehuggers~

Updated the map with path changes.
Updated the changelog.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4969 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-10-27 16:39:52 +00:00
parent bc933cc10b
commit ce8d8be416
15 changed files with 179 additions and 154 deletions
@@ -84,6 +84,10 @@ var/const/MAX_ACTIVE_TIME = 400
HasProximity(target)
return
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
Attach(finder)
return 1
/obj/item/clothing/mask/facehugger/dropped()
..()
GoActive()
@@ -362,6 +362,9 @@
if("legcuff")
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
if("uniform")
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
if(target.w_uniform && !target.w_uniform.canremove)
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
else
@@ -369,19 +372,8 @@
if("s_store")
message = "\red <B>[source] is trying to take off \a [target.s_store] from [target]'s suit!</B>"
if("pockets")
for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store))
if(MT.armed)
for(var/mob/O in viewers(target, null))
if(O == source)
O.show_message("\red <B>You reach into the [target]'s pockets, but there was a live mousetrap in there!</B>", 1)
else
O.show_message("\red <B>[source] reaches into [target]'s pockets and sets off a hidden mousetrap!</B>", 1)
target.u_equip(MT)
if (target.client)
target.client.screen -= MT
MT.loc = source.loc
MT.triggered(source, source.hand ? "l_hand" : "r_hand")
MT.layer = OBJ_LAYER
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
if("CPR")