Fixes magnetic gripper never afterattack-ing

This fixes magnetic grippers not being able to mount frames. Also, this
includes an exception for magnetic grippers in the wall code, to prevent
superfluous wall pushes.
This commit is contained in:
Krausus
2015-05-04 03:49:02 -04:00
parent d7734eae57
commit 25a8d35ab0
2 changed files with 7 additions and 1 deletions
@@ -86,7 +86,10 @@
wrapped.loc = user
//Pass the attack on to the target. This might delete/relocate wrapped.
target.attackby(wrapped,user, params)
if(!target.attackby(wrapped, user, params) && target && wrapped)
// If the attackby didn't resolve or delete the target or wrapped, afterattack
// (Certain things, such as mountable frames, rely on afterattack)
wrapped.afterattack(target, user, 1, params)
//If wrapped did neither get deleted nor put into target, put it back into the gripper.
if(wrapped && user && (wrapped.loc == user))