BOB - autosnap at fort phase
Moderator: Tech Team
Forum rules
Please read the Community Guidelines before posting.
Please read the Community Guidelines before posting.
BOB - autosnap at fort phase
Anyone ever thought of modding BOB, so that the "End Reinforcement" button also takes a snap? I'd love it.
Re: BOB - autosnap at fort phase
yeah, I've hacked the code on mine to make it do this. It's much better as I often used to forget to take a snap.
Re: BOB - autosnap at fort phase
just edit the bob script and search on "Confirmation Popups" and change the code there to this.
It's not quite perfect.
When it takes a snapshot an alert pops up. you need to wait until it's finished loading in the background before clicking ok on the alert or it won't end your turn properly. It doesn't work without the alert for some reason that proved beyond my javascripting abilties to figure out. Maybe someone cleverer than me can work out how to do this properly.
Code: Select all
/* --- Confirmation Popups --- */
if (((command == 'End Assaults' || command == 'End Reinforcement' || (command == 'Reinforce' && gameSettings.fortifications != eFortifications.UNLIMITED)) && myOptions.confirmEnds) || (command == 'Auto-Assault' && myOptions.confirmAutoAttack) || (command == 'Deploy' && myOptions.confirmDeploy)) {
var message = "Are you sure you wish to " + command + "?";
if (command == "Reinforce") {
message = "Only one reinforcement possible, are you sure?";
}
if (confirm(message)) {
if (command == 'Reinforce' || command == 'End Reinforcement' )
{
document.getElementById('snapToChat').click();
alert('Snapshot taken');
}
return newsendRequest(command);
} else {
return false;
}
} else {
return newsendRequest(command);
}It's not quite perfect.
When it takes a snapshot an alert pops up. you need to wait until it's finished loading in the background before clicking ok on the alert or it won't end your turn properly. It doesn't work without the alert for some reason that proved beyond my javascripting abilties to figure out. Maybe someone cleverer than me can work out how to do this properly.
Re: BOB - autosnap at fort phase
Well that's pretty cool. Like you said, it would be nice if someone integrated into BOB proper and got the kinks worked out.