j3kstrum / runelite-bingo

Plugin for the RuneLite client that adds Bingo functionality.
0 stars 0 forks source link

Add saving and loading of state #19

Open j3kstrum opened 3 years ago

j3kstrum commented 3 years ago

Games, the board, etc. should all be able to be serialized to disk. They should also be loaded from their serialized state on startup.

j3kstrum commented 3 years ago

The GroundMarkerPlugin seems to do this well. They load points dynamically (and fail when they can't find them) and they save dynamic points as well.

https://github.com/runelite/runelite/blob/4e0211b4905c0327938e96f0ac78cab228aa8b70/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerPlugin.java#L123

This could probably be repurposed; we wouldn't need the lazy loading, either, because the entire minigame display container needs to be loaded before it can be displayed.