Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client): load current data #13

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Conversation

mockdot
Copy link
Contributor

@mockdot mockdot commented Sep 22, 2023

Description

  • Load initial values from metadata rather than the variables.

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My code fits the style guidelines.
  • My PR fits the contribution guidelines.

Copy link
Contributor

@Manason Manason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would double check that core has a default for these values. Although I believe the PlayerData object doesn't list these as optional so if there was an issue we could just deal with it then

@Manason Manason merged commit c2e9b8f into Qbox-project:main Sep 22, 2023
@mockdot
Copy link
Contributor Author

mockdot commented Sep 22, 2023

I would double check that core has a default for these values. Although I believe the PlayerData object doesn't list these as optional so if there was an issue we could just deal with it then

We are setting it here (server/players):
PlayerData.metadata.health = PlayerData.metadata.health or 200
PlayerData.metadata.hunger = PlayerData.metadata.hunger or 100
PlayerData.metadata.thirst = PlayerData.metadata.thirst or 100
PlayerData.metadata.stress = PlayerData.metadata.stress or 0

@mockdot mockdot deleted the load-data branch September 22, 2023 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants