mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
A couple of runtime fixes:
Runtime fix for Poly searching for items (runtime error: Cannot read null.w_class) Runtime fix for safe lock-picking (runtime error: Cannot read null.len) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5030 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -529,7 +529,7 @@
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(C.l_hand.w_class <= 2 || C.r_hand.w_class <= 2)
|
||||
if((C.l_hand && C.l_hand.w_class <= 2) || (C.r_hand && C.r_hand.w_class <= 2))
|
||||
return C
|
||||
return null
|
||||
|
||||
@@ -558,7 +558,7 @@
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(C.l_hand.w_class <= 2 || C.r_hand.w_class <= 2)
|
||||
if(C.l_hand && C.l_hand.w_class <= 2 || C.r_hand && C.r_hand.w_class <= 2)
|
||||
return C
|
||||
return null
|
||||
|
||||
@@ -609,10 +609,10 @@
|
||||
var/obj/item/stolen_item = null
|
||||
|
||||
for(var/mob/living/carbon/C in view(1,src))
|
||||
if(C.l_hand.w_class <= 2)
|
||||
if(C.l_hand && C.l_hand.w_class <= 2)
|
||||
stolen_item = C.l_hand
|
||||
|
||||
if(C.r_hand.w_class <= 2)
|
||||
if(C.r_hand && C.r_hand.w_class <= 2)
|
||||
stolen_item = C.r_hand
|
||||
|
||||
if(stolen_item)
|
||||
|
||||
Reference in New Issue
Block a user