wurstscript / WurstStdlib2

WurstScript Standard Library Version 2
Apache License 2.0
55 stars 53 forks source link

Add Monitors for syncing & reading files #334

Closed rhazarian closed 3 years ago

rhazarian commented 4 years ago

In case your files are big and it may take some second to complete, you can probably want to display a nice progress bar with an 'x' button to cancel the load - and you would be able to achieve it with these monitors.

rhazarian commented 4 years ago

What do you mean by 'cancellable load for game-wide'? You load the data stored in the file with the provided name on the specified player's PC. It's different for all players. Or do you mean like loading the data from the same file name executing a callback for all players with availability to cancel it for all simultaneously? This is a bit tricky I think. Not sure if it's highly required + it's more difficult to implement and may be done in a separate PR if needed since it would require different logic with some additional queues and so.

I'll implement the current version of the package in my map in Reforged to test it better and update on this after it.

Cokemonkey11 commented 4 years ago

What do you mean by 'cancellable load for game-wide'? You load the data stored in the file with the provided name on the specified player's PC. It's different for all players. Or do you mean like loading the data from the same file name executing a callback for all players with availability to cancel it for all simultaneously? This is a bit tricky I think. Not sure if it's highly required + it's more difficult to implement and may be done in a separate PR if needed since it would require different logic with some additional queues and so.

Good enough for me

I'll implement the current version of the package in my map in Reforged to test it better and update on this after it.

Ok

Frotty commented 4 years ago

Good stuff, would like to merge, only thing I don't like are the // other thread comments in the hot doc. The code examples should be somewhat copy-paste-able and people who don't know what threads mean in wc3 might be confused. I think you could easily improve this by wrapping it inside a player leave or spell event listener or similar.

rhazarian commented 4 years ago

Sure, just found some sly issues with intensive testing with players, gonna update lil’ bit later.

Frotty commented 4 years ago

Is the update still coming? Also has Merge Conflicts now.

rhazarian commented 4 years ago

Yea, I guess it's done, just needs more testing to be sure. I'll also resolve conflicts, np

Frotty commented 4 years ago

Yea, I guess it's done, just needs more testing to be sure. I'll also resolve conflicts, np

Is this gonna happen ? :D

Frotty commented 4 years ago

@rhazarian any status on this?

Cokemonkey11 commented 3 years ago

@Frotty I recommend closing this

Frotty commented 3 years ago

@Cokemonkey11 the feature seems very useful

@rhazarian Do you have any update on this??

rhazarian commented 3 years ago

Hey!

I'm sorry, but I'm not sure if this gonna happen. I was taking a huge break from map-making after the fail of Reforged and unsuccessful attempts to rid my map of newly introduced bugs and all, somewhere in mid 2020, and I have also stopped monitoring this and other modding places.

However, I came back recently, but started to work on a somewhat new project from scratch, using TypeScript with TSTL to convert it to Lua. Personally, I find it much more promising, as many features that Wurst offers are supported there natively, and as it runs much more fast and smooth. I'm also working on a tool for it to support compile-time execution and object generation, map headers editing and stuff. Therefore I don't think I'm going to continue working on this.

Sadly, I wasn't able to finish it before taking the break, because while it does work overall, I suspect that it could cause desyncs in some specific circumstances, and I didn't have enough time to determine them and fix all the problems.

Frotty commented 3 years ago

Thanks for the headsup