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

[Underscore] mixin is global... just noticed that which is cool!

1459620071
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="https://github.com/BaldarSilveraxe/roll20mixin" rel="nofollow">https://github.com/BaldarSilveraxe/roll20mixin</a> Been playing around with mixin off and on for a while. Trying to get to some really core,&nbsp;niche, small, repeatable, don't want to think about it or have "that" error again stuff collected. Feedback..... (from anyone not named Aaron.) Suggetions....(from anyone not named Vince.)
1459630951
The Aaron
Pro
API Scripter
So, I can provide suggestions, but not feedback, right? &nbsp;=D
1459639813
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
The Aaron said: So, I can provide suggestions, but not feedback, right? =D I define this question as feedback. But on a serious note.... the fact that mixin is global could be really helpful. Take&nbsp;Misterque's&nbsp; example : _.each(selected, function(obj) { if (obj._type != "graphic") {return;}; var oToken = getObj("graphic", obj._id); var oCharacter = getObj("character", oToken.get("represents")); something_found = oCharacter.get("name"); }); Becomes something like... _.each(selected, function(obj) { var&nbsp;oCharacter =&nbsp;_.represents(obj); if(oCharacter){ //Do something } });