/tg/ Station 13 - Modules - TypesVar Details - Proc Details

touch

Vars

attached_handRef to the hand we currently have deployed.
draw_messageThe message displayed to the person upon creating the touch hand
drop_messageThe message displayed upon willingly dropping / deleting / cancelling the touch hand before using it
hand_pathTypepath of what hand we create on initial cast.

Procs

cast_on_hand_hitThe actual process of casting the spell on the victim from the caster.
cast_on_secondary_hand_hitFor any special casting effects done if the user right-clicks on touch spell instead of left-clicking
create_handCreates a new hand_path hand and equips it to the caster.
do_hand_hitCalls cast_on_hand_hit() from the caster onto the victim.
do_secondary_hand_hitCalls do_secondary_hand_hit() from the caster onto the victim.
on_hand_deletedSignal proc for COMSIG_PARENT_QDELETING from our attached hand.
on_hand_droppedSignal proc for COMSIG_ITEM_DROPPED from our attached hand.
on_hand_hitSignal proc for COMSIG_ITEM_AFTERATTACK from our attached hand.
on_secondary_hand_hitSignal proc for COMSIG_ITEM_AFTERATTACK_SECONDARY from our attached hand.
remove_handUnregisters any signals and deletes the hand currently summoned by the spell.

Var Details

attached_hand

Ref to the hand we currently have deployed.

draw_message

The message displayed to the person upon creating the touch hand

drop_message

The message displayed upon willingly dropping / deleting / cancelling the touch hand before using it

hand_path

Typepath of what hand we create on initial cast.

Proc Details

cast_on_hand_hit

The actual process of casting the spell on the victim from the caster.

Override / extend this to implement casting effects. Return TRUE on a successful cast to use up the hand (delete it) Return FALSE to do nothing and let them keep the hand in hand

cast_on_secondary_hand_hit

For any special casting effects done if the user right-clicks on touch spell instead of left-clicking

Return SECONDARY_ATTACK_CALL_NORMAL to call the normal cast_on_hand_hit Return SECONDARY_ATTACK_CONTINUE_CHAIN to prevent the normal cast_on_hand_hit from calling, but still use up the hand Return SECONDARY_ATTACK_CANCEL_CHAIN to prevent the spell from being used

create_hand

Creates a new hand_path hand and equips it to the caster.

If the equipping action fails, reverts the cooldown and returns FALSE. Otherwise, registers signals and returns TRUE.

do_hand_hit

Calls cast_on_hand_hit() from the caster onto the victim.

do_secondary_hand_hit

Calls do_secondary_hand_hit() from the caster onto the victim.

on_hand_deleted

Signal proc for COMSIG_PARENT_QDELETING from our attached hand.

If our hand is deleted for a reason unrelated to our spell, unlink it (clear refs) and revert the cooldown

on_hand_dropped

Signal proc for COMSIG_ITEM_DROPPED from our attached hand.

If our caster drops the hand, remove the hand / revert the cast Basically gives them an easy hotkey to lose their hand without needing to click the button

on_hand_hit

Signal proc for COMSIG_ITEM_AFTERATTACK from our attached hand.

When our hand hits an atom, we can cast do_hand_hit() on them.

on_secondary_hand_hit

Signal proc for COMSIG_ITEM_AFTERATTACK_SECONDARY from our attached hand.

Same as on_hand_hit, but for if right-click was used on hit.

remove_hand

Unregisters any signals and deletes the hand currently summoned by the spell.

If reset_cooldown_after is TRUE, we will additionally refund the cooldown of the spell. If reset_cooldown_after is FALSE, we will instead just start the spell's cooldown