refactor: update color logic in MiningArea to prioritize custom area color

This commit is contained in:
MayaTheShy
2026-02-20 04:22:20 -05:00
parent 05519dc17e
commit c424662c18

View File

@@ -858,8 +858,9 @@ function MiningArea({ area, turtle, isSelected, onClick }) {
const centerY = (area.startY + area.endY) / 2;
const centerZ = (area.startZ + area.endZ) / 2;
// Color based on turtle or status
// Color based on area's custom color, status fallback
const getColor = () => {
if (area.color) return area.color;
if (area.status === 'completed') return '#10b981'; // green
if (area.status === 'mining') return '#f59e0b'; // orange
if (turtle) return turtle.color || '#3b82f6'; // turtle color or blue