photocopier
Vars | |
copying | Is the photocopier performing an action currently? |
---|---|
copyitem | Current obj stored in the copier to be copied |
copymob | Mob that is currently on the photocopier |
folder | Current folder obj stored in the copier to copy into |
maxcopies | Max number of copies that can be made at one time |
saved_documents | Lazy init list, Objs currently saved inside the photocopier for printing later |
total_copies | Total copies printed from copymachines globally |
Procs | |
bundlecopy | A public proc for copying bundles of paper |
cancopy | An internal proc for checking if a photocopier is able to copy an object |
check_mob | Internal proc for checking the Mob on top of the copier Reports FALSE if there is no copymob or if the copymob is in a diff location than the copy machine, otherwise reports TRUE |
copy | Public proc for copying items |
papercopy | Public proc for copying paper objs |
photocopy | Public proc for copying photo objs |
Var Details
copying
Is the photocopier performing an action currently?
copyitem
Current obj stored in the copier to be copied
copymob
Mob that is currently on the photocopier
folder
Current folder obj stored in the copier to copy into
maxcopies
Max number of copies that can be made at one time
saved_documents
Lazy init list, Objs currently saved inside the photocopier for printing later
total_copies
Total copies printed from copymachines globally
Proc Details
bundlecopy
A public proc for copying bundles of paper
It iterates through each object in the bundle and calls papercopy() and photocopy() and stores the produce photo/paper in the bundle Arguments:
- bundle - The paper bundle object being copied
- scanning - If true, the paper bundle is stored inside the photocopier
- use_toner - If true, this operation uses toner, this is not done in copy() because partial bundles would be impossible otherwise
cancopy
An internal proc for checking if a photocopier is able to copy an object
It performs early checks/returns to see if the copier has any toner, if the copier is powered/working, if the copier is currently perfoming an action, or if we've hit the global copy limit. Used to inform the player in-game if they're using the photocopier incorrectly (no toner, no item inside, etc) Arguments:
- scancopy - If TRUE, cancopy does not check for an item on/inside the copier to copy, used for copying stored files
check_mob
Internal proc for checking the Mob on top of the copier Reports FALSE if there is no copymob or if the copymob is in a diff location than the copy machine, otherwise reports TRUE
copy
Public proc for copying items
Determines what item needs to be copied whether it's a mob's ass, paper, bundle, or photo and then calls the respective proc for it. Most toner var changing happens here so that the faxmachine child obj does not need to worry about toner Arguments:
- obj/item/C - The item stored inside the photocopier to be copied (obj/paper, obj/photo, obj/paper_bundle)
- scancopy - Indicates that obj/item/C is a stored file, we need to pass this on to cancopy() so it passes the check
papercopy
Public proc for copying paper objs
Takes a paper object and makes a copy of it. This proc specifically does not change toner which allows more versatile use for child objects returns null if paper failed to be copied and returns the new copied paper obj if succesful Arguments:
- obj/item/paper/copy - The paper obj to be copied
- scanning - If true, the photo is stored inside the photocopier and we do not check for toner
- bundled - If true the photo is stored inside the photocopier, used by bundlecopy() to construct paper bundles
photocopy
Public proc for copying photo objs
Takes a photo object and makes a copy of it. This proc specifically does not change toner which allows more versatile use for child objects returns null if photo failed to be copied and returns the new copied photo object if succesful Arguments:
- obj/item/photo/photocopy - The photo obj to be copied
- scanning - If true, the photo is stored inside the photocopier and we do not check for toner
- bundled - If true the photo is stored inside the photocopier, used by bundlecopy() to construct paper bundles