Compare commits

..

4 Commits

Author SHA1 Message Date
914acb0a09 Updated with more recognised ornaments
Signed-off-by: vykend <mail@martinvylet.cz>
2025-03-09 21:55:14 +01:00
Martin Vylet
5fab2afa16 bump version 2024-02-13 09:10:11 +01:00
Martin Vylet
f4a6c08dd5 Merge branch 'main' of https://git.martinvylet.cz/vykend/ResTools-BB-Watch-Reloaded 2024-02-13 09:08:15 +01:00
Martin Vylet
2ff302571d Edited waves and timing for upcoming Cryptic Memories 2024-02-13 09:06:21 +01:00

View File

@@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name IITC plugin: ResTools BB Watch Reloaded // @name IITC plugin: ResTools BB Watch Reloaded
// @namespace https://git.martinvylet.cz/vykend/ResTools-BB-Watch-Reloaded // @namespace https://git.martinvylet.cz/vykend/ResTools-BB-Watch-Reloaded
// @version 0.8 // @version 0.9.1
// @description Scan window for BBs on ornamented portals, then check results // @description Scan window for BBs on ornamented portals, then check results
// @author vikend // @author vikend
// @icon // @icon
@@ -27,20 +27,19 @@ function wrapper(plugin_info)
window.plugin.restoolsBBWatchReloaded.LAYERS = {}; window.plugin.restoolsBBWatchReloaded.LAYERS = {};
window.plugin.restoolsBBWatchReloaded.LAYERGROUP = null; window.plugin.restoolsBBWatchReloaded.LAYERGROUP = null;
window.plugin.restoolsBBWatchReloaded.BB_STORAGE = 'plugin-restools-bbwatch-reloaded'; window.plugin.restoolsBBWatchReloaded.BB_STORAGE = 'plugin-restools-bbwatch-reloaded';
window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS = [[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]]]; window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS = [[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]]];
window.plugin.restoolsBBWatchReloaded.timezone = 0; window.plugin.restoolsBBWatchReloaded.timezone = 0;
//struct of WAVE_PORTALS: [ wave: [ ornamented[], results[] ] ] //struct of WAVE_PORTALS: [ wave: [ ornamented[], results[] ] ]
//edit this with start times according to YOUR local times (ie. as seen in COMM) //edit this with start times according to YOUR local times (ie. as seen in COMM)
window.plugin.restoolsBBWatchReloaded.TIMETABLE = { window.plugin.restoolsBBWatchReloaded.TIMETABLE = {
wave1: "14:00", wave1: "14:00",
wave2: "14:25", wave2: "14:30",
wave3: "14:50", wave3: "15:00",
wave4: "15:15", wave4: "15:30",
wave5: "15:40", wave5: "16:00",
wave6: "16:05", wave6: "16:30",
wave7: "16:30", wave7: "17:00", //needed for calculations, put there end of wave 6
wave8: "16:55" //needed for calculations, put there end of wave 7
}; };
@@ -86,7 +85,7 @@ function wrapper(plugin_info)
const offsetMilliseconds = timezoneOffsetHours * 60 * 60 * 1000; // Convert offset to milliseconds const offsetMilliseconds = timezoneOffsetHours * 60 * 60 * 1000; // Convert offset to milliseconds
const currentTimeWithOffset = new Date(currentTime.getTime() + offsetMilliseconds); const currentTimeWithOffset = new Date(currentTime.getTime() + offsetMilliseconds);
const currentTimeString = currentTimeWithOffset.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false }); const currentTimeString = currentTimeWithOffset.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
const currentTimePlus5Minutes = (new Date(currentTimeWithOffset.getTime() + 5 * 60000)).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false }); const currentTimePlus5Minutes = (new Date(currentTimeWithOffset.getTime() + 10 * 60000)).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
let currentWave = 0; let currentWave = 0;
let battleOver = false; let battleOver = false;
@@ -121,12 +120,12 @@ function wrapper(plugin_info)
{ {
let ornaments = portal.options.data.ornaments; let ornaments = portal.options.data.ornaments;
if (ornaments.indexOf("ap1") != -1 || ornaments.indexOf("ap1_v") != -1 || ornaments.indexOf("peBN_RES_WINNER-60") != -1 || ornaments.indexOf("peBN_ENL_WINNER-60") != -1) if (ornaments.indexOf("ap1") != -1 || ornaments.indexOf("ap2") != -1 || ornaments.indexOf("ap3") != -1 || ornaments.indexOf("ap1_v") != -1 || ornaments.indexOf("ap2_v") != -1 || ornaments.indexOf("ap3_v") != -1 || ornaments.indexOf("peBN_RES_WINNER-60") != -1 || ornaments.indexOf("peBN_ENL_WINNER-60") != -1)
{ {
let portalUpload = { let portalUpload = {
Guid: portal.options.guid, Guid: portal.options.guid,
IsOrnamented: (ornaments.indexOf("ap1") != -1 || ornaments.indexOf("ap1_v") != -1), IsOrnamented: (ornaments.indexOf("ap1") != -1 || ornaments.indexOf("ap1_v") != -1 || ornaments.indexOf("ap2") != -1 || ornaments.indexOf("ap2_v") != -1 || ornaments.indexOf("ap3") != -1 || ornaments.indexOf("ap3_v") != -1),
IsVolatile: (ornaments.indexOf("ap1_v") != -1), IsVolatile: (ornaments.indexOf("ap1_v") != -1 ||ornaments.indexOf("ap2_v") != -1||ornaments.indexOf("ap3_v") != -1),
IsWinnerRes: (ornaments.indexOf("peBN_RES_WINNER-60") != -1), IsWinnerRes: (ornaments.indexOf("peBN_RES_WINNER-60") != -1),
IsWinnerEnl: (ornaments.indexOf("peBN_ENL_WINNER-60") != -1), IsWinnerEnl: (ornaments.indexOf("peBN_ENL_WINNER-60") != -1),
IsBeaconActive: (ornaments.indexOf("peBB_BATTLE_RARE") != -1), IsBeaconActive: (ornaments.indexOf("peBB_BATTLE_RARE") != -1),