diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml
index 9cb9246d2f..636511b41a 100644
--- a/Docs/Luadoc/Lua.xml
+++ b/Docs/Luadoc/Lua.xml
@@ -769,6 +769,8 @@
+
+
@@ -786,12 +788,14 @@
+
+
diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml
index 7c5bd89a8d..667cd9f5b1 100644
--- a/Docs/Luadoc/LuaDocumentation.xml
+++ b/Docs/Luadoc/LuaDocumentation.xml
@@ -2289,6 +2289,12 @@ save yourself some time, copy this for undocumented things:
Returns true if an extra stage was earned.
+
+ Returns true if either player does not have a profile loaded, and there is a loadable profile.
+
+
+ Returns true if either player has a profile loaded.
+
Returns true if we are specifically in the Step Editor's
editing portion. If in recording or playing mode, this will return
@@ -2342,6 +2348,9 @@ save yourself some time, copy this for undocumented things:
Similar to JoinPlayer, but checks whether the player is allowed to join and returns false if the player is not allowed to join. Also deducts coins for joining. A player can't join if PlayersCanJoin() returns false, or that side is already joined (is true for both sides when in a style that is OnePlayerTwoSides), or there are not enough coins.
+
+ If profiles are not loaded, this will load the profiles for each player. It will load from memory cards if they are present, and local profiles otherwise. It will load edits if LoadEdits is true, or by default if the argument is omitted.
+
Returns true if player pn is using modifier sModifier.
@@ -2357,6 +2366,9 @@ save yourself some time, copy this for undocumented things:
Resets the specific Player's mods to the default settings.
+
+ Save profiles.
+
Saves the bookkeeping and machine profile data.
diff --git a/src/GameState.cpp b/src/GameState.cpp
index 20d9fad9e9..b08b07ce67 100644
--- a/src/GameState.cpp
+++ b/src/GameState.cpp
@@ -2545,6 +2545,28 @@ public:
return 1;
}
+ static int LoadProfiles( T* p, lua_State *L )
+ {
+ bool LoadEdits = true;
+ if(lua_isboolean(L, 1))
+ {
+ LoadEdits = BArg(1);
+ }
+ p->LoadProfiles( LoadEdits );
+ SCREENMAN->ZeroNextUpdate();
+ return 0;
+ }
+
+ static int SaveProfiles( T* p, lua_State *L )
+ {
+ p->SavePlayerProfiles();
+ SCREENMAN->ZeroNextUpdate();
+ return 0;
+ }
+
+ DEFINE_METHOD( HaveProfileToLoad, HaveProfileToLoad() )
+ DEFINE_METHOD( HaveProfileToSave, HaveProfileToSave() )
+
LunaGameState()
{
ADD_METHOD( IsPlayerEnabled );
@@ -2655,6 +2677,10 @@ public:
ADD_METHOD( ResetPlayerOptions );
ADD_METHOD( RefreshNoteSkinData );
ADD_METHOD( Dopefish );
+ ADD_METHOD( LoadProfiles );
+ ADD_METHOD( SaveProfiles );
+ ADD_METHOD( HaveProfileToLoad );
+ ADD_METHOD( HaveProfileToSave );
}
};