photocopier
Vars | |
ass | A reference to a mob on top of the photocopier trying to copy their ass. Null if there is no mob. |
---|---|
busy | Indicates whether the printer is currently busy copying or not. |
category | Variable needed to determine the selected category of forms on Photocopier.js |
color_mode | Used with photos. Determines if the copied photo will be in greyscale or color. |
document_copy | A reference to an /obj/item/documents inside the copier, if one is inserted. Otherwise null. |
num_copies | How many copies will be printed with one click of the "copy" button. |
paper_copy | A reference to an /obj/item/paper inside the copier, if one is inserted. Otherwise null. |
photo_copy | A reference to an /obj/item/photo inside the copier, if one is inserted. Otherwise null. |
toner_cartridge | A reference to the toner cartridge that's inserted into the copier. Null if there is no cartridge. |
Procs | |
check_ass | Checks the living mob ass exists and its location is the same as the photocopier. |
copier_blocked | Checks if the copier is deleted, or has something dense at its location. Called in MouseDroppedOn() |
copier_empty | Checks if there is an item inserted into the copier or a mob sitting on top of it. |
do_copy_loop | Will invoke the passed in copy_cb callback in 1 second intervals, and charge the user 5 credits for each copy made. |
do_insertion | Inserts the item into the copier. Called in attackby() after a human mob clicked on the copier with a paper, photo, or document. |
give_pixel_offset | Gives items a random x and y pixel offset, between -10 and 10 for each. |
has_enough_toner | Determines if the photocopier has enough toner to create num_copies amount of copies of the currently inserted item. |
make_ass_copy | Handles the copying of an ass photo. |
make_blank_print | The procedure is called when printing a blank to write off toner consumption. |
make_document_copy | Handles the copying of documents. |
make_paper_copy | Handles the copying of paper. Transfers all the text, stamps and so on from the old paper, to the copy. |
make_photo_copy | Handles the copying of photos, which can be printed in either color or greyscale. |
remove_photocopy | Called when someone hits the "remove item" button on the copier UI. |
reset_busy | Sets busy to FALSE . Created as a proc so it can be used in callbacks. |
Var Details
ass
A reference to a mob on top of the photocopier trying to copy their ass. Null if there is no mob.
busy
Indicates whether the printer is currently busy copying or not.
category
Variable needed to determine the selected category of forms on Photocopier.js
color_mode
Used with photos. Determines if the copied photo will be in greyscale or color.
document_copy
A reference to an /obj/item/documents
inside the copier, if one is inserted. Otherwise null.
num_copies
How many copies will be printed with one click of the "copy" button.
paper_copy
A reference to an /obj/item/paper
inside the copier, if one is inserted. Otherwise null.
photo_copy
A reference to an /obj/item/photo
inside the copier, if one is inserted. Otherwise null.
toner_cartridge
A reference to the toner cartridge that's inserted into the copier. Null if there is no cartridge.
Proc Details
check_ass
Checks the living mob ass
exists and its location is the same as the photocopier.
Returns FALSE if ass
doesn't exist or is not at the copier's location. Returns TRUE otherwise.
copier_blocked
Checks if the copier is deleted, or has something dense at its location. Called in MouseDroppedOn()
copier_empty
Checks if there is an item inserted into the copier or a mob sitting on top of it.
Return FALSE
is the copier has something inside of it. Returns TRUE
if it doesn't.
do_copy_loop
Will invoke the passed in copy_cb
callback in 1 second intervals, and charge the user 5 credits for each copy made.
Arguments:
- copy_cb - a callback for which proc to call. Should only be one of the
make_x_copy()
procs, such asmake_paper_copy()
. - user - the mob who clicked copy.
do_insertion
Inserts the item into the copier. Called in attackby()
after a human mob clicked on the copier with a paper, photo, or document.
Arugments:
- object - the object that got inserted.
- user - the mob that inserted the object.
give_pixel_offset
Gives items a random x and y pixel offset, between -10 and 10 for each.
This is done that when someone prints multiple papers, we dont have them all appear to be stacked in the same exact location.
Arguments:
- copied_item - The paper, document, or photo that was just spawned on top of the printer.
has_enough_toner
Determines if the photocopier has enough toner to create num_copies
amount of copies of the currently inserted item.
make_ass_copy
Handles the copying of an ass photo.
Calls check_ass()
first to make sure that ass
exists, among other conditions. Since this proc is called from a timer, it's possible that it was removed.
Additionally checks that the mob has their clothes off.
make_blank_print
The procedure is called when printing a blank to write off toner consumption.
make_document_copy
Handles the copying of documents.
Checks first if document_copy
exists. Since this proc is called from a timer, it's possible that it was removed.
make_paper_copy
Handles the copying of paper. Transfers all the text, stamps and so on from the old paper, to the copy.
Checks first if paper_copy
exists. Since this proc is called from a timer, it's possible that it was removed.
make_photo_copy
Handles the copying of photos, which can be printed in either color or greyscale.
Checks first if photo_copy
exists. Since this proc is called from a timer, it's possible that it was removed.
remove_photocopy
Called when someone hits the "remove item" button on the copier UI.
If the user is a silicon, it drops the object at the location of the copier. If the user is not a silicon, it tries to put the object in their hands first.
Sets busy
to FALSE
because if the inserted item is removed, the copier should halt copying.
Arguments:
- object - the item we're trying to remove.
- user - the user removing the item.
reset_busy
Sets busy to FALSE
. Created as a proc so it can be used in callbacks.