Files
kiwistation/code/modules/surgery/organs/helpers.dm
T
spookydonut 29fe3a0b76 a couple more genetics perks: martyrdom and HARS, locks chem spike behind crafting only (#49062)
* getting somewhere

* cleanup one

* cleanup two

* supermatter immunity > HADS

* more fluff

* proper return, compile

* lint

* lint 2 electric boogaloo

* cobby happy

* HADS

* some more changes

* i don't know why this file went rogue

* final fixes, small name change, difficulty up (polish!)

* skog help

* EUREKAAAAAAAAAAAAAAAAAAA

* chelp

* reverts some regenerate limbs changes as they are no longer needed, fully integrates attach limb power

* minor fuck before the big fuck

* the big fuck ALMOST DONE, FINISHING TOUCHES NEEDED

* the big fuck finale

* teenie fuck ;)

* line endings

Co-authored-by: spookydonut <github@spooksoftware.com>
2020-03-05 20:49:24 +08:00

48 lines
1.3 KiB
Plaintext

/**
* Get the organ object from the mob matching the passed in typepath
*
* Arguments:
* * typepath The typepath of the organ to get
*/
/mob/proc/getorgan(typepath)
return
/**
* Get organ objects by zone
*
* This will return a list of all the organs that are relevant to the zone that is passedin
*
* Arguments:
* * zone [a BODY_ZONE_X define](https://github.com/tgstation/tgstation/blob/master/code/__DEFINES/combat.dm#L187-L200)
*/
/mob/proc/getorganszone(zone)
return
/**
* Returns a list of all organs in specified slot
*
* Arguments:
* * slot Slot to get the organs from
*/
/mob/proc/getorganslot(slot)
return
/mob/living/carbon/getorgan(typepath)
return (locate(typepath) in internal_organs)
/mob/living/carbon/getorganszone(zone, subzones = 0)
var/list/returnorg = list()
if(subzones)
// Include subzones - groin for chest, eyes and mouth for head
if(zone == BODY_ZONE_HEAD)
returnorg = getorganszone(BODY_ZONE_PRECISE_EYES) + getorganszone(BODY_ZONE_PRECISE_MOUTH)
if(zone == BODY_ZONE_CHEST)
returnorg = getorganszone(BODY_ZONE_PRECISE_GROIN)
for(var/X in internal_organs)
var/obj/item/organ/O = X
if(zone == O.zone)
returnorg += O
return returnorg
/mob/living/carbon/getorganslot(slot)
return internal_organs_slot[slot]