Space Station 13 - Modules - TypesVar Details - Proc Details

harvester

Vars

HARVESTER_STATE_DEFAULTThe harvester is currently not doing anything special.
HARVESTER_STATE_EXTRACTINGThe harvester is currently extracting a brain from harvest_target.
HARVESTER_STATE_STORINGThe harvester is currently storing an extracted brain.
harvest_targetThe current atom selected for harvesting.
harvested_brainsLAZYLIST (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_stateInteger (One of src.HARVESTER_STATE_*). The current activity state of the harvester.

Procs

can_harvest_brainWhether 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_brainHandles storing brain in this harvester's cargo.
extract_brain_from_external_organHandles extracting brain from external.
extract_brain_from_mmiHandles extracting brain from mmi.
extract_brain_from_mobHandles extracting brain from external while still connected to human.
harvest_brainAttempts to 'harvest' the target's brain into this harvester's internal storage.
set_harvester_stateSets 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:

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:

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:

Has no return value.