Goonstation 13 - Modules - TypesVar Details - Proc Details

Movable Preview

Essentially, it creates a movable on a 1x1 map and gives you access to the it for modification.

This parent type is for use for mainly objects. For humans, see /datum/movable_preview/character

Use winset() to position the control within the window.

See the default code for an example - places it at 0,0 and makes it 128x128 pixels.

Vars

custom_setupSet to true if you want to handle the creation of the preview_thing
flat_iconDo not access directly, use get_icon instead
max_preview_idGlobal ID for this preview datum
preview_idThe map ID for use with winset() or <ByondUi.id>
preview_thingThe atom/movable to show in the preview - useful to access directly to mess with it

Procs

NewPass the viewer client, the name of the window, the control to bind it to, and the size you want
add_backgroundAdds a background to the preview - default is floor tiles, two tiles high.
custom_setupSee: /datum/movable_preview/var/custom_setup

Var Details

custom_setup

Set to true if you want to handle the creation of the preview_thing

flat_icon

Do not access directly, use get_icon instead

max_preview_id

Global ID for this preview datum

preview_id

The map ID for use with winset() or <ByondUi.id>

preview_thing

The atom/movable to show in the preview - useful to access directly to mess with it

For the /character subtype, this is always a human.

Proc Details

New

Pass the viewer client, the name of the window, the control to bind it to, and the size you want

add_background

Adds a background to the preview - default is floor tiles, two tiles high.

You can specify a color to render a flat color as a background instead. Additionally, if height_mult is specified also, it'll multiply the height of that color.

custom_setup

See: /datum/movable_preview/var/custom_setup