jeroenvanwissen / twitch-stream-farm

Twitch Stream Farm
0 stars 0 forks source link

Joining / Leaving the farm #9

Open jeroenvanwissen opened 1 month ago

jeroenvanwissen commented 1 month ago

Right now you use the !spawn command to join the farm, and you have to reuse that command every day when the farm was restarted.

Also, there will be players that join the farm and rarely come back. So their inventory gets filled with harvests and never sold.

Should we change the logic into listening to onJoin/onPart events of the chat and have players automatically join and leave the farm when they join / leave the twitch chat.

Basically "forcing" players to stay on stream if they want to idle farm....

Thoughts?

jeroenvanwissen commented 1 month ago

With the current work that is being done on refactoring the codebase and moving almost all game logic to the backend. I've already included some basic logic to spawn players on their last known location when the twitch onJoin event is triggered. Also, when the onPart event is triggered .. the player get's destroyed from the visual map and set to inactive playing state. Until the player rejoins again..