diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index fc50a24f84e6..0b465c52a829 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -699,7 +699,6 @@ SUBSYSTEM_DEF(minimaps) store_current_svg_coords(user, params["image"]) current_svg = get_current_tacmap_data(user, FALSE) - if(isxeno(user)) var/mob/living/carbon/xenomorph/xeno = user xeno_maptext("The Queen has updated your hive mind map", "You sense something unusual...", xeno.hivenumber) diff --git a/tgui/packages/tgui/interfaces/DrawnMap.js b/tgui/packages/tgui/interfaces/DrawnMap.js index 72c6b9791bd6..5143b847c3bb 100644 --- a/tgui/packages/tgui/interfaces/DrawnMap.js +++ b/tgui/packages/tgui/interfaces/DrawnMap.js @@ -6,9 +6,26 @@ export class DrawnMap extends Component { this.containerRef = createRef(); this.flatImgSrc = this.props.flatImage; this.backupImgSrc = this.props.backupImage; + this.state = { + mapLoad: true, + }; + this.img = null; this.svg = this.props.svgData; } + componentWillMount() { + this.img = new Image(); + this.img.src = this.flatImgSrc; + this.img.onload = () => { + this.setState({ mapLoad: true }); + }; + + this.img.onerror = () => { + this.img.src = this.backupImgSrc; + this.setState({ mapLoad: false }); + }; + } + parseSvgData(svgDataArray) { if (!svgDataArray) return null; let lines = []; @@ -35,8 +52,7 @@ export class DrawnMap extends Component { height: '100%', }}> {this.backupImgSrc - {parsedSvgData && ( + {parsedSvgData && this.state.mapLoad && (