Merge pull request #4992 from Loganbacca/closetfix

Closet wrapping fixes
This commit is contained in:
Chinsky
2014-05-16 05:42:31 +04:00
3 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -727,14 +727,14 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
return 0
var/delayfraction = round(delay/numticks)
var/turf/T = get_turf(user)
var/original_loc = user.loc
var/holding = user.get_active_hand()
for(var/i = 0, i<numticks, i++)
sleep(delayfraction)
if(!user || user.stat || user.weakened || user.stunned || !(user.loc == T))
if(!user || user.stat || user.weakened || user.stunned || (user.loc != original_loc))
return 0
if(needhand && !(user.get_active_hand() == holding)) //Sometimes you don't want the user to have to keep their active hand
return 0
+2
View File
@@ -590,6 +590,7 @@
sleep(10)
SC.broken = 1
SC.locked = 0
SC.update_icon()
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [SC]!</B>", 1)
@@ -599,6 +600,7 @@
SC.open()
else
C.welded = 0
C.update_icon()
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [C]!</B>", 1)
@@ -99,6 +99,8 @@
return
if(target in user)
return
if(user in target) //no wrapping closets that you are inside - it's not physically possible
return
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [src.name] on \ref[target]</font>")