harvester 
Vars | |
| HARVESTER_STATE_DEFAULT | The harvester is currently not doing anything special. |
|---|---|
| HARVESTER_STATE_EXTRACTING | The harvester is currently extracting a brain from harvest_target. |
| HARVESTER_STATE_STORING | The harvester is currently storing an extracted brain. |
| harvest_target | The current atom selected for harvesting. |
| harvested_brains | LAZYLIST (Instances of /obj/item/organ/internal/brain and /obj/item/organ/internal/posibrain). The brains
this harvester has collected. These should also be within contents. |
| harvester_state | Integer (One of src.HARVESTER_STATE_*). The current activity state of the harvester. |
Procs | |
| can_harvest_brain | Whether or not the target is valid for harvesting a brain from. Legion have fancy sensors that can detect the presence of a brain from a distance or something like that. |
| collect_brain | Handles storing brain in this harvester's cargo. |
| extract_brain_from_external_organ | Handles extracting brain from external. |
| extract_brain_from_mmi | Handles extracting brain from mmi. |
| extract_brain_from_mob | Handles extracting brain from external while still connected to human. |
| harvest_brain | Attempts to 'harvest' the target's brain into this harvester's internal storage. |
| set_harvester_state | Sets the harvester's harvesting state. Primarily used to synchronize the harvester's AI busy state. |
Var Details
HARVESTER_STATE_DEFAULT 
The harvester is currently not doing anything special.
HARVESTER_STATE_EXTRACTING 
The harvester is currently extracting a brain from harvest_target.
HARVESTER_STATE_STORING 
The harvester is currently storing an extracted brain.
harvest_target 
The current atom selected for harvesting.
harvested_brains 
LAZYLIST (Instances of /obj/item/organ/internal/brain and /obj/item/organ/internal/posibrain). The brains
this harvester has collected. These should also be within contents.
harvester_state 
Integer (One of src.HARVESTER_STATE_*). The current activity state of the harvester.
Proc Details
can_harvest_brain
Whether or not the target is valid for harvesting a brain from. Legion have fancy sensors that can detect the presence of a brain from a distance or something like that.
Does not include adjacency checks as this is also intended for selecting a target to move to.
Parameters:
target- The atom to validate.skip_incapacitation_checks(Boolean, defaultFALSE) - If set, andtargetis a mob, skips checks that ensure the target is incapacitated and "safe" to extract from.
Returns boolean. If TRUE, target is a valid target for harvest_brain().
collect_brain
Handles storing brain in this harvester's cargo.
Returns boolean.
extract_brain_from_external_organ
Handles extracting brain from external.
Returns boolean.
extract_brain_from_mmi
Handles extracting brain from mmi.
Returns boolean.
extract_brain_from_mob
Handles extracting brain from external while still connected to human.
If the target organ can be amputated, tears it off before extracting for extra brutality.
Returns boolean.
harvest_brain
Attempts to 'harvest' the target's brain into this harvester's internal storage.
Does not perform can_harvest_brain() checks as it's assumed this was already checked before calling this proc.
Parameters:
target- The atom being harvested. Currently valid types include:/obj/item/organ/internal/brain- Collects the brain/obj/item/organ/internal/posibrain- Collects the brain/obj/item/organ/external- Will attempt to extract a brain if present/mob/living/carbon/human- Will attempt to extract a brain if present
Returns boolean. Whether or not a brain was successfully harvested.
set_harvester_state
Sets the harvester's harvesting state. Primarily used to synchronize the harvester's AI busy state.
Includes validation to ensure new_state is a valid state, otherwise crashes without updating.
Parameters:
new_state(Integer - One ofHARVESTER_STATE_*, defaultHARVESTER_STATE_DEFAULT) - The new state to set.
Has no return value.