I can’t find a lot of info on weak maps so I asked the developer assistant about how to remove player’s entry from a weak map when they leave a game. It told me this:
“Automatic Elimination: Because it is a weak_map(player, logic), the engine treats the player key as a “weak reference.” As soon as a player leaves the match, they are no longer a valid object in the game’s playspace. At that moment, Verse automatically eliminates that player’s entry from your map.”
Is this accurate? I just want to make sure because it seems too easy to be true lol
This is what my weak map looks like:
var IsMoneyBagFull : weak_map(player, logic) = map{}