Last active
January 15, 2024 05:49
-
-
Save JonLoesch/5121b67fe094fe963137b845a072c191 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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) | |
*/ |
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
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!! :)