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

ar

Vars

glasses_typeBecause initial() will not work on subtypes from within the parent we need to store a reference to the type of the glasses calling the procs
modeThe current operating mode
modesSets a list of modes to cycle through
modes_msgDefines messages that will be shown to the user upon switching modes (e.g. turning it on)
modeswitch_soundDefines sound to be played upon mode switching
off_stateIconstate for when the status is off (TODO: off_state --> modes_states list for expandability)
permanent_clothing_traitsLazylist of traits that will not be removed if we switch modes.

Procs

InitializeReuse logic from engine_goggles.dm
freeze_animationCreate new icon and worn_icon, with only the first frame of every state and setting that as icon. this practically freezes the animation :)

Var Details

glasses_type

Because initial() will not work on subtypes from within the parent we need to store a reference to the type of the glasses calling the procs

mode

The current operating mode

modes

Sets a list of modes to cycle through

modes_msg

Defines messages that will be shown to the user upon switching modes (e.g. turning it on)

modeswitch_sound

Defines sound to be played upon mode switching

off_state

Iconstate for when the status is off (TODO: off_state --> modes_states list for expandability)

permanent_clothing_traits

Lazylist of traits that will not be removed if we switch modes.

Proc Details

Initialize

Reuse logic from engine_goggles.dm

freeze_animation

Create new icon and worn_icon, with only the first frame of every state and setting that as icon. this practically freezes the animation :)