Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[TAS] "is" debugMode available?

1504709373
chris b.
Pro
Sheet Author
API Scripter
We are using The Aaron Sheet for various things :) Is there a way for me to check if debugMode is on? Like i want to not only call TAS.debug(), but I want to wrap a block of code in an if so it doesn't even compute unless debugMode() was called earlier I can't figure out how to check, since the variables look like they are not public. something like TAS.isDebugMode or something. Putting it here in case it helps someone else.
1504709601
The Aaron
Pro
API Scripter
I can definitely add that.  In the interim, I'd suggest just setting a variable in your sheet worker section that you can check.
1504709745
The Aaron
Pro
API Scripter
If you add this right after debugMode: debugMode,:         isDebugMode: function(){return config.debugMode}, you can call TAS.isDebugMode()
1504710394

Edited 1504710519
chris b.
Pro
Sheet Author
API Scripter
ah cool. Mine grabs the latest TAS file from the internet every time I run npm build :) I will have to change that I guess ;) edit: or .. like you suggest, i just add a flag in my local constants file. that would also work. duh. Since the npm build xxxx contains a switch to set debug or not anyway i can auto set both.
1504710485
The Aaron
Pro
API Scripter
Ah, in THAT case, I should probably just push that up... just a sec...
1504710975
The Aaron
Pro
API Scripter
Pushed.  Let me know if there are any troubles.  I've not touched that file in a while so there exists the possibility that I broke something in it at some point.... =D
1504712133

Edited 1504712140
chris b.
Pro
Sheet Author
API Scripter
ok :) ill check