SS1984 - Modules - Types — Var Details - Proc Details

ranged_mob_switcher

Ranged attacks switcher for hostile mobs (not basic)

On right click on self opens up a radial menu containing specific ranged modes (/datum/ranged_mob_switcher_mode), passed in as a list.

Vars

mode_name_to_typeAssociative list in format: [mode_name] = mode_type
possible_modesList of all modes the mob can switch to, passed in Attach()
radial_menu_listAssociative list in format: [mode_name] = image()
switch_delayTime required to switch modes, passed in Attach()

Procs

apply_modeApplies a given mode to the target
create_radial_listsCreates both of radial required lists.
find_current_mode_nameFinds what mode the mob currently has active (by checking proj_type and amount of shots), and returns the mode's name
get_radial_menu_choiceShows radial menu and returns type of chosen mode
handle_right_click_asyncSince both radial and balloon alerts proc stoplag(), everything is in this proc for async invoking
on_right_click_attackMain signal proc of the element
on_self_examineSignal proc. Shows on self examine that we can change modes

Var Details

mode_name_to_type

Associative list in format: [mode_name] = mode_type

possible_modes

List of all modes the mob can switch to, passed in Attach()

radial_menu_list

Associative list in format: [mode_name] = image()

switch_delay

Time required to switch modes, passed in Attach()

Proc Details

apply_mode

Applies a given mode to the target

create_radial_lists

Creates both of radial required lists.

find_current_mode_name

Finds what mode the mob currently has active (by checking proj_type and amount of shots), and returns the mode's name

get_radial_menu_choice

Shows radial menu and returns type of chosen mode

handle_right_click_async

Since both radial and balloon alerts proc stoplag(), everything is in this proc for async invoking

on_right_click_attack

Main signal proc of the element

Returns SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN if we attacked ourselves. Creates according lists if there aren't any at the moment, and then opens up the radial menu.

on_self_examine

Signal proc. Shows on self examine that we can change modes