Merge pull request #302 from VampyrBytes/master

Fixes inventory bug
This commit is contained in:
ZomgPonies
2014-07-18 01:50:43 -04:00
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -224,6 +224,19 @@ Turf and target are seperate in case you want to teleport some distance from a t
return 0
// Returns true if a link is blocked and neither location has something climbable on
// Used for inventory checks
/proc/LinkBlockedUnclimbable(turf/A, turf/B)
if (!LinkBlocked(A, B))
return 0
for (var/obj/structure/S in A.contents)
if(S.climbable)
return 0
for (var/obj/structure/S in B.contents)
if(S.climbable)
return 0
return 1
// Returns true if direction is blocked from loc
// Checks if doors are open
/proc/DirBlocked(turf/loc,var/dir)
@@ -607,7 +607,7 @@ It can still be worn/put on as normal.
if(!source || !target) return //Target or source no longer exist
if(source.loc != s_loc) return //source has moved
if(target.loc != t_loc) return //target has moved
if(LinkBlocked(s_loc,t_loc)) return //Use a proxi!
if (LinkBlockedUnclimbable(t_loc, s_loc)) return
if(item && source.get_active_hand() != item) return //Swapped hands / removed item from the active one
if ((source.restrained() || source.stat)) return //Source restrained or unconscious / dead