Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
doom committed Sep 26, 2023
1 parent fb1511a commit a8487fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ SUBSYSTEM_DEF(minimaps)

ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
current_map = get_current_map(user)
if(!current_map)
distribute_current_map_png(user)

user.client.register_map_obj(map_holder.map)
ui = new(user, src, "TacticalMap")
Expand Down Expand Up @@ -603,7 +606,7 @@ SUBSYSTEM_DEF(minimaps)
if ("menuSelect")
if(params["selection"] == "new canvas")
distribute_current_map_png(user)
current_map = get_current_map(user)

. = TRUE

if ("updateCanvas")
Expand Down
22 changes: 11 additions & 11 deletions tgui/packages/tgui/interfaces/TacticalMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const TacticalMap = (props, context) => {
};

return (
<Window width={650} height={850} theme={data.isXeno ? "xeno" : "crtblue"}>
<Window width={650} height={850} theme={data.isXeno ? 'xeno' : 'crtblue'}>
<Window.Content>
<Section
fontSize="20px"
Expand All @@ -115,7 +115,7 @@ export const TacticalMap = (props, context) => {
return (
<Tabs.Tab
key={i}
color={data.isXeno ? "purple" : "blue"}
color={data.isXeno ? 'purple' : 'blue'}
selected={i === pageIndex}
icon={page.icon}
onClick={() => handleTacmapOnClick(i, page.title)}>
Expand All @@ -137,15 +137,15 @@ const ViewMapPanel = (props, context) => {
const { data } = useBackend<TacMapProps>(context);
return (
<Section fill>
{data.canViewHome === 1 &&
<ByondUi
params={{
id: data.mapRef,
type: 'map',
}}
class="TacticalMap"
/>
}
{data.canViewHome === 1 && (
<ByondUi
params={{
id: data.mapRef,
type: 'map',
}}
class="TacticalMap"
/>
)}
</Section>
);
};
Expand Down

0 comments on commit a8487fa

Please sign in to comment.