Closed yancouto closed 5 years ago
We should start to documentate which fucntions we have already implemented from Steam's API, and which "module" they are from (such as 'userStats'). How about we use github's wiki for this?
Yes, I have tested all new functions, and MarvInc works with the renamed functions (here). Other than that, I haven't individually tested the old functions, but they were just renamed in this PR.
If you want to keep track of which functions are already implemented and which are missing, an issue with a task list is best. Documenting the lua library is another thing.
If you want to keep track of which functions are already implemented and which are missing, an issue with a task list is best. I mean just detail which lua functions we have implemented so far (and ideally how to use them so we could just use our own documentation instead of going to Steam's)
Yes, documenting the library would be great, but it's not on the scope of this PR.
I prefer merging this directly to master. I don't think "master is only for releases" is a good strategy. Tags are meant for releases, not master.
Will start sending PRs to master once we have some proper explanations on README.
I'll list everything that changed:
Reformatted
luasteam.cxx
using clang-format and added a.clang-format
file with some basic settings to make it easy to format it again.Added methods inside their proper interfaces (as Steam calls it), so the code will look more like using the API in C++. For example
SteamUserStats()->StoreStats()
becomesSteam.userStats.storeStats()
(if you importedluasteam
asSteam
). I changed CamelCase to camelCase.Added some functions:
ActivateGameOverlay
,ActivateGameOverlayToWebPage
andRunCallbacks
, and tested them with Steam. I'd love for this repo to have tests, but that seems almost impossible.Added a callback,
onGameOverlayActivated
. To use it, just overrideSteam.friends.onGameOverlayActivated
with your own functions and don't forget to callRunCallbacks
every frame.Steam.shutdown()
now frees all memory we allocate, so any other calls after that will error.Updated README. Having proper documentation seems essential, we should do that sometime.
Notice I submitted this PR to merge into dev. I think we should only merge to master when we have a new release, and add the proper compiled libraries. It would be awesome if this could be done automatically, but remember it must work for all platforms.