Shiptest 13 - Modules - TypesVar Details - Proc Details

paper

Paper also scraps of paper

lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!

Paper is now using markdown (like in github pull notes) for ALL rendering so we do loose a bit of functionality but we gain in easy of use of paper and getting rid of that crashing bug

Vars

camera_holderPaper can be shown via cameras. When that is done, a deep copy of the paper is made and stored as a var on the camera. The paper is located in nullspace, and holds a weak ref to the camera that once contained it so the paper can do some state checking on if it should be shown to a viewer.
contact_poisonReagent to transfer to the user when they pick the paper up without proper protection.
contact_poison_volumeVolume of contact_poison to transfer to the user when they pick the paper up without proper protection.
default_raw_textDefault raw text to fill this paper with on init.
input_field_countThe number of input fields
raw_field_input_dataLazylist of all fields that have had some input added to them.
raw_stamp_dataLazylist of all raw stamp data to be sent to tgui.
raw_text_inputsLazylist of raw, unsanitised, unparsed text inputs that have been made to the paper.
request_stateIf TRUE, staff can read paper everywhere, but usually from requests panel.
show_written_wordsWhether the icon should show little scribbly written words when the paper has some text on it.
stamp_cacheHelper cache that contains a list of all icon_states that are currently stamped on the paper.
stampedPositioning for the stamp in tgui
stampsThe (text for the) stamps on the paper.

Procs

InitializeOverlay info
add_field_inputThis simple helper adds the supplied input field data to the paper.
add_stampThis simple helper adds the supplied stamp to the paper, appending to the end of any existing stamps.
clear_paperRemoves all input and all stamps from the paper, clearing it completely.
copyThis proc copies this sheet of paper to a new sheet. Used by carbon papers and the photocopier machine.
copy_field_textReturns a deep copy list of raw_field_input_data, or null if the list is empty or doesn't exist.
copy_raw_stampsReturns a deep copy list of raw_stamp_data, or null if the list is empty or doesn't exist. Does not copy overlays or stamp_cache, only the tgui rendered stamps.
copy_raw_textReturns a deep copy list of raw_text_inputs, or null if the list is empty or doesn't exist.
get_raw_textGet a single string representing the text on a page
show_through_cameraAttempts to ui_interact the paper to the given user, with some sanity checking to make sure the camera still exists via the weakref and that this paper is still attached to it.

Var Details

camera_holder

Paper can be shown via cameras. When that is done, a deep copy of the paper is made and stored as a var on the camera. The paper is located in nullspace, and holds a weak ref to the camera that once contained it so the paper can do some state checking on if it should be shown to a viewer.

contact_poison

Reagent to transfer to the user when they pick the paper up without proper protection.

contact_poison_volume

Volume of contact_poison to transfer to the user when they pick the paper up without proper protection.

default_raw_text

Default raw text to fill this paper with on init.

input_field_count

The number of input fields

raw_field_input_data

Lazylist of all fields that have had some input added to them.

raw_stamp_data

Lazylist of all raw stamp data to be sent to tgui.

raw_text_inputs

Lazylist of raw, unsanitised, unparsed text inputs that have been made to the paper.

request_state

If TRUE, staff can read paper everywhere, but usually from requests panel.

show_written_words

Whether the icon should show little scribbly written words when the paper has some text on it.

stamp_cache

Helper cache that contains a list of all icon_states that are currently stamped on the paper.

stamped

Positioning for the stamp in tgui

stamps

The (text for the) stamps on the paper.

Proc Details

Initialize

Overlay info

add_field_input

This simple helper adds the supplied input field data to the paper.

It will not overwrite any existing input field data by default and will early return FALSE if this scenario happens unless overwrite is set properly.

Other than that, this is a God proc that does not care about max length or out-of-range IDs and expects sanity checking beforehand if you want to respect it.

add_stamp

This simple helper adds the supplied stamp to the paper, appending to the end of any existing stamps.

This a God proc that does not care about stamp max count and expects sanity checking beforehand if you want to respect it.

It does however respect the overlay limit and will not apply any overlays past the cap.

The caller is expected to handle updating icons and appearance after adding text, to allow for more efficient batch adding loops.

clear_paper

Removes all input and all stamps from the paper, clearing it completely.

copy

This proc copies this sheet of paper to a new sheet. Used by carbon papers and the photocopier machine.

Arguments

copy_field_text

Returns a deep copy list of raw_field_input_data, or null if the list is empty or doesn't exist.

copy_raw_stamps

Returns a deep copy list of raw_stamp_data, or null if the list is empty or doesn't exist. Does not copy overlays or stamp_cache, only the tgui rendered stamps.

copy_raw_text

Returns a deep copy list of raw_text_inputs, or null if the list is empty or doesn't exist.

get_raw_text

Get a single string representing the text on a page

show_through_camera

Attempts to ui_interact the paper to the given user, with some sanity checking to make sure the camera still exists via the weakref and that this paper is still attached to it.