Page 1 of 1

Gonna try lending a hand

Posted: Thu Jan 03, 2019 5:30 pm
by Darinth
So... it's been a long time since I've been at all active here. I've checked by from time to time, happy to see that there's still activity... and yet still sad to see development at such a crawling pace. Best thing I can do to fix that is to help. I can't promise I'll do a lot, but at a minimum I can try to fix the big annoying bug I first pointed out almost a decade ago (mousing over a token with a bad variable in it a calculated property freezes maptool), and the hopefully move on to the other big thing I've wanted almost since I first learned about maptool, Javascript.

I've spent the past several hours pouring over Maptool's codebase and I've figured out all sorts of things, but in the end I can't figure out where the minisheet is actually called from (which I'm pretty sure is the source of stat sheet displayed on mouseover). I'm pretty sure that before the minisheet is called to be rendered with it's token information, that MapTool calls a parser of some kind that calls MapToolVariableResolver.getVariable to translate all of the token properties... but for the love of all things unholy I cannot figure out where that conversion happens before those values are passed into minisheet.

Also, MapToolVariableResolver.getVariable looks like it'd be relatively easy to modify to not prompt under certain circumstances. Adding a "PromptIfNull" variable modifier and having whatever chain of functions make sure it gets set when calling MapToolVariableResolver.getVariable and then that function will only actually prompt if the variable doesn't exist and that modifier is set should make it so the statsheet no longer locks up maptool when you typo while typing a property.

Note: I haven't setup eclipse or a real dev environment yet, so I'm trying to trace all of this around by hand effectively.

Re: Gonna try lending a hand

Posted: Fri Jan 04, 2019 3:57 am
by Jagged
Welcome, or welcome back :)

If you want to grab an issue to work on its a good idea to log it on GitHub or reply there if it already exists.

Re: Gonna try lending a hand

Posted: Fri Jan 04, 2019 8:12 am
by Darinth
That's fair. I know the issue is logged on Jamz github. Not sure right at the moment if I'm gonna be forking off of his repo or the main one.

Re: Gonna try lending a hand

Posted: Sat Jan 05, 2019 7:03 am
by Jagged
I would recommend forking off the main dev branch.

Its fairly easy for Jamz to pull stuff off the main branch into his fork, but if you branch off his fork you are kind of doubling the work required to get you changes released to a wider audience.

Re: Gonna try lending a hand

Posted: Sun Jan 06, 2019 10:52 pm
by Darinth
Forked the main repo, figured out the issue with the stat sheet locking up maptool and submitted a pull request! Woohoo contributing! :)

Re: Gonna try lending a hand

Posted: Mon Jan 07, 2019 7:23 am
by Jagged
Great job :mrgreen: