Last active
July 19, 2023 17:41
-
-
Save DamianDominoDavis/795f61098d683872136eaedbeb4b7586 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
void main() { | |
int last_ptrack = get_property("_lastPtrack").to_int(); | |
int track_rate = get_property("autoPtrackRate").to_int(); | |
if (track_rate < 1) { | |
track_rate = 25; | |
print("Craptons Log defaulting to 25-turn intervals; set a different number to pref 'autoPtrackRate'",'yellow'); | |
} | |
if (turns_played() > track_rate + last_ptrack) { | |
cli_execute("ptrack add " + turns_played()); | |
set_property("_lastPtrack", turns_played()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment