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. |
color_mode | Used with photos. Determines if the copied photo will be in greyscale or color. |
copies_left | Variable for the UI telling us how many copies are in the queue. |
created_paper | Type path to the paper that's created when we're initalized |
max_paper_capacity | The max paper capacity this photocopier can store |
num_copies | How many copies will be printed with one click of the "copy" button. |
object_copy | Variable that holds a reference to any object supported for photocopying inside the photocopier |
paper_stack | The paper loaded into the machine |
starting_paper | The amount of paper this photocoper starts with. |
time_to_print | How long it takes to print something in seconds |
toner_cartridge | A reference to the toner cartridge that's inserted into the copier. Null if there is no cartridge. |
toner_efficiency | How efficent our toner is when printing |
valid_paper_types | List of paper types that can be inserted as blank paper |
whitelist_scannable_objects | Typecache of objects that can be inserted and scanned into the photocopier for copying |
Procs | |
check_ass | Checks the living mob ass exists and its location is the same as the photocopier. |
check_busy | Determines if the printer is currently busy, informs the user if it is. |
copier_blocked | Checks if the copier is deleted, or has something dense at its location. Called in mouse_drop_receive() |
copier_empty | Checks if there is an item inserted into the copier or a mob sitting on top of it. |
delete_paper | Removes an amount of paper from the printer's storage. This lets us pretend we actually consumed paper when we were actually printing something that wasn't paper. |
do_copies | Will invoke do_copy_loop asynchronously. Passes the supplied arguments on to it. |
do_copy_loop | Will invoke the passed in copy_cb callback in 4 second intervals, and charge the user 5 credits for each copy made. |
get_empty_paper | Returns an empty paper, used for blanks and paper copies.
Prioritizes paper_stack , creates new paper in case paper_stack is empty. |
get_paper_count | Gets the total amount of paper this printer has stored |
get_toner_color | Returns the color used for the printing operation. If the color is below TONER_LOW_PERCENTAGE, it returns a gray color. |
give_pixel_offset | Gives items a random x and y pixel offset, between -10 and 10 for each. |
has_room_for_paper | Check if there is enough room to insert paper |
insert_empty_paper | Proc that handles insertion of empty paper, useful for copying later. |
make_ass_copy | Handles the copying of an ass photo. |
make_blank_print | Handles the copying of blanks. No mutating state, so this should not fail. |
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_paperwork_copy | Handles the copying of documents. |
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 . |
setup_components | Simply adds the necessary components for this to function. |
use_toner | Removes a certain amount of toner that is affected by the efficiency of stock parts |
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.
color_mode 
Used with photos. Determines if the copied photo will be in greyscale or color.
copies_left 
Variable for the UI telling us how many copies are in the queue.
created_paper 
Type path to the paper that's created when we're initalized
max_paper_capacity 
The max paper capacity this photocopier can store
num_copies 
How many copies will be printed with one click of the "copy" button.
object_copy 
Variable that holds a reference to any object supported for photocopying inside the photocopier
paper_stack 
The paper loaded into the machine
starting_paper 
The amount of paper this photocoper starts with.
time_to_print 
How long it takes to print something in seconds
toner_cartridge 
A reference to the toner cartridge that's inserted into the copier. Null if there is no cartridge.
toner_efficiency 
How efficent our toner is when printing
valid_paper_types 
List of paper types that can be inserted as blank paper
whitelist_scannable_objects 
Typecache of objects that can be inserted and scanned into the photocopier for copying
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.
check_busy
Determines if the printer is currently busy, informs the user if it is.
copier_blocked
Checks if the copier is deleted, or has something dense at its location. Called in mouse_drop_receive()
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.
delete_paper
Removes an amount of paper from the printer's storage. This lets us pretend we actually consumed paper when we were actually printing something that wasn't paper.
do_copies
Will invoke do_copy_loop
asynchronously. Passes the supplied arguments on to it.
do_copy_loop
Will invoke the passed in copy_cb
callback in 4 second intervals, and charge the user 5 credits for each copy made.
Arguments:
- user - the mob who clicked copy.
- copy_cb - a callback for which proc to call. Should only be one of the
make_x_copy()
procs, such asmake_paper_copy()
. - paper_use - the amount of paper used in this operation
- toner_use - the amount of toner used in this operation
- copies_amount - the amount of copies we should make
get_empty_paper
Returns an empty paper, used for blanks and paper copies.
Prioritizes paper_stack
, creates new paper in case paper_stack
is empty.
get_paper_count
Gets the total amount of paper this printer has stored
Returns the amount of paper stored in the photocopier if passed with no args If paper_type is supplied will only return the amount of that paper type
Arguments:
- paper_type - The paper type to check to see quantity stored
get_toner_color
Returns the color used for the printing operation. If the color is below TONER_LOW_PERCENTAGE, it returns a gray color.
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_room_for_paper
Check if there is enough room to insert paper
insert_empty_paper
Proc that handles insertion of empty paper, useful for copying later.
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
Handles the copying of blanks. No mutating state, so this should not fail.
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_paperwork_copy
Handles the copying of documents.
Checks first if paperwork_copy
exists. Since this proc is called from a timer, it's possible that it was removed.
Copies the stamp from a given piece of paperwork if it is already stamped, allowing for you to sell photocopied paperwork at the risk of losing budget money.
make_photo_copy
Handles the copying of photos, which can be printed in either color or greyscale.
Checks first if picture
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
.
setup_components
Simply adds the necessary components for this to function.
use_toner
Removes a certain amount of toner that is affected by the efficiency of stock parts