mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
feat(glue): implement Script_ContestAccepted (#161)
Co-authored-by: fallenoak <git@fallenoak.me>
This commit is contained in:
parent
d19658185a
commit
0a91d44600
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user