uspgamedev / luasteam

Bindings to connect lua with Steam API
https://luasteam.readthedocs.io/en/stable/
MIT License
129 stars 23 forks source link

Add get/set stats functions #17

Closed GeorgeA93 closed 3 years ago

GeorgeA93 commented 3 years ago

Adds the bindings for the getStats and setStats so that we can access the raw stat values. Pretty much what it says on the tin.

I was a little unsure how to handle the float/int differences in the steam api, went with int as that is all I require, but happy to change if there is an easy way!

First PR for this, and first time doing any Lua binding-ey so be patient... :joy:

Side note: I am planning on adding a few more things as I go, but this was the simplest thing for me to get started on.

GeorgeA93 commented 3 years ago

@yancouto any ideas on the travis build failures? Think the Steamworks SDK is missing?

GeorgeA93 commented 3 years ago

@yancouto Changes all made!

Were you able to use this successfully?

Yep I have been using this locally for my upcoming game and it seems to be working well.

yancouto commented 3 years ago

Merged! @GeorgeA93 do you plan to add more features soon? Just wondering if I should do a new release now or later.

Thanks for contributing! If you wish to add your game to "Games using luasteam" section, just let me know.

GeorgeA93 commented 3 years ago

Merged! @GeorgeA93 do you plan to add more features soon? Just wondering if I should do a new release now or later.

Thanks for contributing! If you wish to add your game to "Games using luasteam" section, just let me know.

Yeh dude, I'm probably going to be adding some more stuff soon! I'll probably combine a bunch of smaller function additions into a new PR. Off the top of my head I know I need to add something to get the players locale from steam. I might need more too!

In terms of releasing, im not sure whats involved for you, but for me the benefit is I can get the dlls for windows, currently developing on linux.

yancouto commented 3 years ago

I just added a release 1.0.5. From my side I just need to write the new release and changelog, and travis takes care of building and uploading everything, so not too much work.