mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-15 02:31:10 +03:00
feat(glue): implement Script_ContestAccepted (#161)
Co-authored-by: fallenoak <git@fallenoak.me>
This commit is contained in:
1 parent
d19658185a
commit
0a91d44600
3 files changed
+9
-1
No files matched your search
@@ -38,6 +38,7 @@
|
||||
#include <common/MD5.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
int32_t CGlueMgr::m_acceptedContest = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
||||
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
||||
|
||||
@@ -32,6 +32,7 @@ class CGlueMgr {
|
||||
};
|
||||
|
||||
// Static variables
|
||||
static int32_t m_acceptedContest;
|
||||
static int32_t m_acceptedEULA;
|
||||
static int32_t m_acceptedTerminationWithoutNotice;
|
||||
static int32_t m_acceptedTOS;
|
||||
|
||||
@@ -234,7 +234,13 @@ int32_t Script_ShowContestNotice(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_ContestAccepted(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (CGlueMgr::m_acceptedContest) {
|
||||
lua_pushnumber(L, 1.0);
|
||||
} else {
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_AcceptContest(lua_State* L) {
|
||||
|
||||
Reference in new issue
Block a user