mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Allows silicons to print saved pictures on photocopiers again. (#22461)
* Allows silicons to print saved images again * Changes addressed * Update tgui/packages/tgui/interfaces/Photocopier.js Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: Adrer <adrermail@gmail.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
@@ -376,6 +376,7 @@
|
||||
data["folder"] = (folder ? folder.name : null)
|
||||
data["mob"] = (copymob ? copymob.name : null)
|
||||
data["files"] = list()
|
||||
data["issilicon"] = issilicon(user)
|
||||
if(LAZYLEN(saved_documents))
|
||||
for(var/obj/item/O in saved_documents)
|
||||
var/list/document_data = list(
|
||||
@@ -409,6 +410,8 @@
|
||||
. = TRUE
|
||||
if("scandocument")
|
||||
scan_document()
|
||||
if("ai_pic")
|
||||
ai_pic()
|
||||
if("filecopy")
|
||||
file_copy(params["uid"])
|
||||
if("deletefile")
|
||||
@@ -416,7 +419,7 @@
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/photocopier/proc/aipic()
|
||||
/obj/machinery/photocopier/proc/ai_pic()
|
||||
if(!issilicon(usr))
|
||||
return
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -77,6 +77,7 @@ export const Photocopier = (props, context) => {
|
||||
|
||||
const Actions = (props, context) => {
|
||||
const { act, data } = useBackend(context);
|
||||
const { issilicon } = data;
|
||||
return (
|
||||
<Fragment>
|
||||
<Button
|
||||
@@ -95,6 +96,17 @@ const Actions = (props, context) => {
|
||||
content="Scan"
|
||||
onClick={() => act('scandocument')}
|
||||
/>
|
||||
{!!issilicon && (
|
||||
<Button
|
||||
fluid
|
||||
icon="image"
|
||||
color="green"
|
||||
float="center"
|
||||
textAlign="center"
|
||||
content="Print from database"
|
||||
onClick={() => act('ai_pic')}
|
||||
/>
|
||||
)}
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user