Skip to content

Instantly share code, notes, and snippets.

@JonLoesch
Last active January 15, 2024 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonLoesch/5121b67fe094fe963137b845a072c191 to your computer and use it in GitHub Desktop.
Save JonLoesch/5121b67fe094fe963137b845a072c191 to your computer and use it in GitHub Desktop.
/**
* This is a short code snippet made for the website https://awbw.amarriner.com/
*
* It prints the info related to any damaged pipe seam, which is public information in fog of war maps,
* but is annoying to check manually for maps with large numbers of pipe seams
*
* It is written in javascript, and is run through the developer console.
* Open the developer console (F12 hotkey on most browsers I know of) and run this code:
*/
for (const x in buildingsInfo) for (const y in buildingsInfo[x]) {
const bdg = buildingsInfo[x][y];
if (/pipe seam/i.test(bdg.terrain_name) && bdg.buildings_capture !== 99 && bdg.buildings_capture !== 0) {
console.log(x, y, bdg.buildings_capture);
}
}
/**
* If there are no damaged pipe seams this will not output anything.
* If there are pipe seams with any health besides 99 (or 0) this will show them in the log. (X, Y, pipe health)
*/
@JonLoesch
Copy link
Author

I'm making this for a particular match I'm playing, but making it public because it may be useful to other people in other matches. Sharing is Caring!! :)

@ClumpyButters
Copy link

I just gave it a test and it works well on my chrome browser (macbook). Definitely a time (and sanity) saver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment