refactor: update color logic in MiningArea to prioritize custom area color
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user