Surgery Initiator
Allows an item to start (or prematurely stop) a surgical operation.
Vars | |
can_cancel | If true, can be used with a cautery in the off-hand to cancel a surgery. |
---|---|
can_cancel_before_first | If true, the initial step will be cancellable by just using the tool again. Should be FALSE for any tool that actually has a first surgery step. |
can_start_on_stander | If true, can start surgery on someone while they're standing up. Seeing as how we really don't support this (yet), it's much nicer to selectively enable this if we want it. |
forced_surgery | If present, this surgery TYPE will be attempted when the item is used. Useful for things like limb reattachments that don't need a scalpel. |
valid_starting_types | Bitfield for the types of surgeries that this can start. Note that in cases where organs are missing, this will be ignored. Also, note that for anything sharp, SURGERY_INITIATOR_ORGANIC should be set as well. |
Procs | |
Initialize | Create a new surgery initiating component. |
attempt_cancel_surgery | Does the surgery de-initiation. |
can_start_surgery | We haven't even started yet. Any surgery can be cancelled at this point. |
do_initiate_surgery_moment | Meat and potatoes of starting surgery. |
initiate_surgery_moment | Does the surgery initiation. |
on_parent_sharpness_change | Keep tabs on the attached item's sharpness. This component gets added in atoms when they're made sharp as well. |
show_starting_message | Handle to allow for easily overriding the message shown |
Var Details
can_cancel
If true, can be used with a cautery in the off-hand to cancel a surgery.
can_cancel_before_first
If true, the initial step will be cancellable by just using the tool again. Should be FALSE for any tool that actually has a first surgery step.
can_start_on_stander
If true, can start surgery on someone while they're standing up. Seeing as how we really don't support this (yet), it's much nicer to selectively enable this if we want it.
forced_surgery
If present, this surgery TYPE will be attempted when the item is used. Useful for things like limb reattachments that don't need a scalpel.
valid_starting_types
Bitfield for the types of surgeries that this can start. Note that in cases where organs are missing, this will be ignored. Also, note that for anything sharp, SURGERY_INITIATOR_ORGANIC should be set as well.
Proc Details
Initialize
Create a new surgery initiating component.
Arguments:
- forced_surgery - (optional) the surgery that will be started when the parent is used on a mob.
attempt_cancel_surgery
Does the surgery de-initiation.
can_start_surgery
We haven't even started yet. Any surgery can be cancelled at this point.
do_initiate_surgery_moment
Meat and potatoes of starting surgery.
initiate_surgery_moment
Does the surgery initiation.
on_parent_sharpness_change
Keep tabs on the attached item's sharpness. This component gets added in atoms when they're made sharp as well.
show_starting_message
Handle to allow for easily overriding the message shown