Skip to content

Conversation

@haykam821
Copy link
Contributor

Empty statistic bundles can be used to safely handle a game configuration that does not specify a bundle namespace without null-checking each time the statistics bundle is accessed. This can be accomplished through the added bundleOrEmpty method.

@haykam821 haykam821 added the feature New feature or request label Jan 6, 2022
@haykam821 haykam821 requested a review from Gegy January 6, 2022 22:53
@Gegy
Copy link
Member

Gegy commented Jan 8, 2022

It seems odd to handle a lookup on null like this inside Plasmid code- does it not make more sense for the user to null-check? A null bundle namespace doesn't really "mean" anything to Plasmid.

@ashhhleyyy
Copy link
Member

The idea behind this (discussed on Discord here) is to make it easier on the user-side code by avoiding having null-checks everywhere that the statistics are used, and move it to a single common place in plasmid code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants