Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPVGO: Add support for highlighting nodes and adding small text #1996

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

ficocelliguy
Copy link
Contributor

@ficocelliguy ficocelliguy commented Mar 5, 2025

Adds new API methods to go.analytics to allow for adding colored indicators and/or text to nodes by player scripts.

Can be tested at https://ficocelliguy.github.io/bitburner-src/

image

My testing script that makes it rave mode:

/** @param {NS} ns */
export async function main(ns) {

  const boardSize = ns.go.getBoardState().length;

  while(true) {
    await ns.sleep();
    const x = (Math.random() * boardSize) | 0;
    const y = (Math.random() * boardSize) | 0;
    let color = "#";
    for (let j = 0; j < 6; j++) {
      color += [0,1,2,3,4,5,6,7,8,9,"a","b","c","d","e","f"][Math.random() * 16 | 0];
    }
    ns.go.analysis.highlightPoint(x, y, color, color);
  }

}

@paulcdejean
Copy link

I almost want to say skip the text arg, and just have it support colors tbh. But maybe that's just me being mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants