Yogstation 13 - Modules - TypesVar Details - Proc Details

/datum/beam

Vars

beam_colorThe color of the beam we're drawing.
beam_typethe objects placed in the elements list
elementslist of beam objects. These have their visuals set by the visuals var which is created on starting
emissiveIf we use an emissive appearance
iconicon used by the beam.
icon_stateicon state of the main segments of the beam
max_distanceThe beam will qdel if it's longer than this many tiles.
originwhere the beam goes from
override_origin_pixel_xIf set will be used instead of origin's pixel_x in offset calculations
override_origin_pixel_yIf set will be used instead of origin's pixel_y in offset calculations
override_target_pixel_xIf set will be used instead of targets's pixel_x in offset calculations
override_target_pixel_yIf set will be used instead of targets's pixel_y in offset calculations
targetwhere the beam goes to
visualsThis is used as the visual_contents of beams, so you can apply one effect to this and the whole beam will look like that. never gets deleted on redrawing.

Procs

DrawCreates the beam effects and places them in a line from the origin to the target. Sets their rotation to make the beams face the target, too.
StartProc called by the atom Beam() proc. Sets up signals, and draws the beam for the first time.
redrawingTriggered by signals set up when the beam is set up. If it's still sane to create a beam, it removes the old beam, creates a new one. Otherwise it kills the beam.

Var Details

beam_color

The color of the beam we're drawing.

beam_type

the objects placed in the elements list

elements

list of beam objects. These have their visuals set by the visuals var which is created on starting

emissive

If we use an emissive appearance

icon

icon used by the beam.

icon_state

icon state of the main segments of the beam

max_distance

The beam will qdel if it's longer than this many tiles.

origin

where the beam goes from

override_origin_pixel_x

If set will be used instead of origin's pixel_x in offset calculations

override_origin_pixel_y

If set will be used instead of origin's pixel_y in offset calculations

override_target_pixel_x

If set will be used instead of targets's pixel_x in offset calculations

override_target_pixel_y

If set will be used instead of targets's pixel_y in offset calculations

target

where the beam goes to

visuals

This is used as the visual_contents of beams, so you can apply one effect to this and the whole beam will look like that. never gets deleted on redrawing.

Proc Details

Draw

Creates the beam effects and places them in a line from the origin to the target. Sets their rotation to make the beams face the target, too.

Start

Proc called by the atom Beam() proc. Sets up signals, and draws the beam for the first time.

redrawing

Triggered by signals set up when the beam is set up. If it's still sane to create a beam, it removes the old beam, creates a new one. Otherwise it kills the beam.

Arguments: mover: either the origin of the beam or the target of the beam that moved. oldloc: from where mover moved. direction: in what direction mover moved from.