Skip to content

Commit

Permalink
feat: QoL improvement: copy AI tracking ability to nanomap (ss220-spa…
Browse files Browse the repository at this point in the history
  • Loading branch information
lebedev authored Mar 25, 2023
1 parent 23510bd commit 3dcf710
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tgui/packages/tgui/interfaces/CrewMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const ComCrewMonitorDataView = (_properties, context) => {
};

const CrewMonitorMapView = (_properties, context) => {
const { data } = useBackend(context);
const { act, data } = useBackend(context);
const [zoom, setZoom] = useLocalState(context, 'zoom', 1);
const getIcon = cm => {
return cm.is_command && data.isBS ? "square" : "circle";
Expand Down Expand Up @@ -233,6 +233,13 @@ const CrewMonitorMapView = (_properties, context) => {
size={getSize(cm)}
tooltip={cm.name + " (" + cm.assignment + ")"}
color={getExtendedStatColor(cm, data.critThreshold)}
onClick={() => {
if (data.isAI) {
act('track', {
track: cm.ref,
});
}
}}
/>
))}
</NanoMap>
Expand Down
Loading

0 comments on commit 3dcf710

Please sign in to comment.