mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +01:00
adds some helper procs
This commit is contained in:
@@ -44,3 +44,79 @@
|
||||
for(var/obj/item/organ/external/O in bodyparts)
|
||||
if(limb_name == O.limb_name)
|
||||
return O
|
||||
|
||||
|
||||
/mob/proc/has_left_hand()
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/has_left_hand()
|
||||
if(has_organ("l_hand"))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/proc/has_right_hand()
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/has_right_hand()
|
||||
if(has_organ("r_hand"))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
//Limb numbers
|
||||
/mob/proc/get_num_arms()
|
||||
return 2
|
||||
|
||||
/mob/living/carbon/human/get_num_arms()
|
||||
. = 0
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/organ/external/affecting = X
|
||||
if(affecting.body_part == ARM_RIGHT)
|
||||
.++
|
||||
if(affecting.body_part == ARM_LEFT)
|
||||
.++
|
||||
|
||||
//sometimes we want to ignore that we don't have the required amount of arms.
|
||||
/mob/proc/get_arm_ignore()
|
||||
return 0
|
||||
|
||||
|
||||
/mob/proc/get_num_legs()
|
||||
return 2
|
||||
|
||||
/mob/living/carbon/human/get_num_legs()
|
||||
. = 0
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/organ/external/affecting = X
|
||||
if(affecting.body_part == LEG_RIGHT)
|
||||
.++
|
||||
if(affecting.body_part == LEG_LEFT)
|
||||
.++
|
||||
|
||||
//sometimes we want to ignore that we don't have the required amount of legs.
|
||||
/mob/proc/get_leg_ignore()
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/carbon/human/get_leg_ignore()
|
||||
|
||||
if(flying == 1)
|
||||
return TRUE
|
||||
|
||||
var/obj/item/weapon/tank/jetpack/J
|
||||
if(istype(back,/obj/item/weapon/tank/jetpack))
|
||||
J = back
|
||||
if(J.on == 1)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/get_missing_limbs()
|
||||
return list()
|
||||
|
||||
/mob/living/carbon/human/get_missing_limbs()
|
||||
var/list/full = list("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg")
|
||||
for(var/zone in full)
|
||||
if(has_organ(zone))
|
||||
full -= zone
|
||||
return full
|
||||
Reference in New Issue
Block a user