From 07d60ca02963b69487ede48f828f322c2d9b64d8 Mon Sep 17 00:00:00 2001 From: DOOM Date: Fri, 30 Jun 2023 02:49:14 -0400 Subject: [PATCH] progress --- code/controllers/subsystem/minimap.dm | 5 +++-- tgui/packages/tgui/interfaces/CanvasLayer.js | 4 +++- tgui/packages/tgui/interfaces/TacticalMap.tsx | 8 +------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index 4ebb65766a04..68531a943173 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -518,9 +518,10 @@ SUBSYSTEM_DEF(minimaps) if ("selectAnnouncement") toolbar_selection = "export" - to_chat(usr, SPAN_WARNING("params1 -> [params["image"]]")) - // params["image"] <- "should" be of type png returned from tgui + + //hardcoded testing, PROGRESS! + marine_announcement("", "Marine Major") . = TRUE } diff --git a/tgui/packages/tgui/interfaces/CanvasLayer.js b/tgui/packages/tgui/interfaces/CanvasLayer.js index 1c01f519f7b0..444ff80848a7 100644 --- a/tgui/packages/tgui/interfaces/CanvasLayer.js +++ b/tgui/packages/tgui/interfaces/CanvasLayer.js @@ -171,7 +171,9 @@ export class CanvasLayer extends Component { } if (selection === 'export') { - this.props.onImageExport(this.canvasRef.current.toDataURL()); + + this.props.onImageExport(String(this.canvasRef.current.toDataURL("image/jpeg", 0.2))); + return; } diff --git a/tgui/packages/tgui/interfaces/TacticalMap.tsx b/tgui/packages/tgui/interfaces/TacticalMap.tsx index 6f102128ab17..332842b3ee53 100644 --- a/tgui/packages/tgui/interfaces/TacticalMap.tsx +++ b/tgui/packages/tgui/interfaces/TacticalMap.tsx @@ -15,16 +15,10 @@ export const TacticalMap = (props, context) => { const { data, act } = useBackend(context); // maybe this is the right way of doing this, maybe not, idk. - const handleTacMapExport = (image: string) => { - if (image === null || image === undefined){ - data.exportedTacMapImage = "not found"; - } - else { + const handleTacMapExport = (image: any) => { data.exportedTacMapImage = image; - } }; - return (