diff --git a/src/addons/lua_engine.cpp b/src/addons/lua_engine.cpp index 9f2e4468..db94d109 100644 --- a/src/addons/lua_engine.cpp +++ b/src/addons/lua_engine.cpp @@ -5062,6 +5062,23 @@ void LuaEngine::registerCoreAPI() { lua_pushboolean(L, 1); // isCastable return 4; }}, + // --- Calendar --- + {"CalendarGetDate", [](lua_State* L) -> int { + // CalendarGetDate() → weekday, month, day, year + time_t now = time(nullptr); + struct tm* t = localtime(&now); + lua_pushnumber(L, t->tm_wday + 1); // weekday (1=Sun) + lua_pushnumber(L, t->tm_mon + 1); // month (1-12) + lua_pushnumber(L, t->tm_mday); // day + lua_pushnumber(L, t->tm_year + 1900); // year + return 4; + }}, + {"CalendarGetNumPendingInvites", [](lua_State* L) -> int { + lua_pushnumber(L, 0); return 1; + }}, + {"CalendarGetNumDayEvents", [](lua_State* L) -> int { + lua_pushnumber(L, 0); return 1; + }}, // --- Instance --- {"GetDifficultyInfo", [](lua_State* L) -> int { // GetDifficultyInfo(id) → name, groupType, isHeroic, maxPlayers