July 29, 20223 yr I've been writing a script recently and would like to modularize my code into different classes to do a collection of things. Is there an annotation to add to submodules to allow access to the main methods (myPlayer(), getBank(), etc.)? Right now, I'm just making methods small in my main script, but it is driving me crazy not to have it logically separated.
July 29, 20223 yr I use task based framework It's really simple so once you get it working you can easily extend it to make task runners and orchestrators for complex scripts
July 29, 20223 yr 53 minutes ago, vlatte said: I've been writing a script recently and would like to modularize my code into different classes to do a collection of things. Is there an annotation to add to submodules to allow access to the main methods (myPlayer(), getBank(), etc.)? Right now, I'm just making methods small in my main script, but it is driving me crazy not to have it logically separated. You can pass on the Methodprovider or Script class Since the main class extends those you can pass them on by using "this" Example: new PriceChecker(this).start(); Edited July 29, 20223 yr by Khaleesi
July 30, 20223 yr 14 hours ago, vlatte said: Lovely! That's exactly what I was looking for. Glad I could help 😉
Create an account or sign in to comment