diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index d57a61c26..ee960c0d0 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -4744,13 +4744,13 @@ PLAYER_INTERACTIONS_SOLID = 1 PLAYER_INTERACTIONS_PVP = 2 --- @type integer -MAX_RX_SEQ_IDS = 64 +MAX_RX_SEQ_IDS = 256 --- @type integer NETWORK_PLAYER_PING_TIMEOUT = 3 --- @type integer -NETWORK_PLAYER_TIMEOUT = 10 +NETWORK_PLAYER_TIMEOUT = 15 --- @type integer UNKNOWN_GLOBAL_INDEX = (-1) @@ -11519,10 +11519,10 @@ SPTASK_STATE_FINISHED = 3 SPTASK_STATE_FINISHED_DP = 4 --- @type integer -MAX_LOCAL_VERSION_LENGTH = 12 +MAX_LOCAL_VERSION_LENGTH = 32 --- @type integer -MAX_VERSION_LENGTH = 10 +MAX_VERSION_LENGTH = 28 --- @type integer MINOR_VERSION_NUMBER = 0 diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index ba54ac50a..fe37b4720 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -783,6 +783,7 @@ --- @class Mod --- @field public basePath string +--- @field public customBehaviorIndex integer --- @field public description string --- @field public enabled boolean --- @field public fileCount integer diff --git a/docs/lua/structs.md b/docs/lua/structs.md index c09b5406f..9a80c9bfe 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -1116,6 +1116,7 @@ | Field | Type | Access | | ----- | ---- | ------ | | basePath | `string` | read-only | +| customBehaviorIndex | `integer` | read-only | | description | `string` | read-only | | enabled | `boolean` | read-only | | fileCount | `integer` | read-only | diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index dbff5144d..68eb961a1 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -893,19 +893,20 @@ static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = { { "waterLevel", LVT_S16, offsetof(struct MarioState, waterLevel), false, LOT_NONE }, }; -#define LUA_MOD_FIELD_COUNT 10 +#define LUA_MOD_FIELD_COUNT 11 static struct LuaObjectField sModFields[LUA_MOD_FIELD_COUNT] = { - { "basePath", LVT_STRING, offsetof(struct Mod, basePath), true, LOT_NONE }, - { "description", LVT_STRING_P, offsetof(struct Mod, description), true, LOT_NONE }, - { "enabled", LVT_BOOL, offsetof(struct Mod, enabled), true, LOT_NONE }, - { "fileCount", LVT_U16, offsetof(struct Mod, fileCount), true, LOT_NONE }, - { "incompatible", LVT_STRING_P, offsetof(struct Mod, incompatible), true, LOT_NONE }, - { "index", LVT_S32, offsetof(struct Mod, index), true, LOT_NONE }, - { "isDirectory", LVT_BOOL, offsetof(struct Mod, isDirectory), true, LOT_NONE }, - { "name", LVT_STRING_P, offsetof(struct Mod, name), true, LOT_NONE }, - { "relativePath", LVT_STRING, offsetof(struct Mod, relativePath), true, LOT_NONE }, - { "selectable", LVT_BOOL, offsetof(struct Mod, selectable), true, LOT_NONE }, -// { "size", LVT_???, offsetof(struct Mod, size), true, LOT_??? }, <--- UNIMPLEMENTED + { "basePath", LVT_STRING, offsetof(struct Mod, basePath), true, LOT_NONE }, + { "customBehaviorIndex", LVT_U8, offsetof(struct Mod, customBehaviorIndex), true, LOT_NONE }, + { "description", LVT_STRING_P, offsetof(struct Mod, description), true, LOT_NONE }, + { "enabled", LVT_BOOL, offsetof(struct Mod, enabled), true, LOT_NONE }, + { "fileCount", LVT_U16, offsetof(struct Mod, fileCount), true, LOT_NONE }, + { "incompatible", LVT_STRING_P, offsetof(struct Mod, incompatible), true, LOT_NONE }, + { "index", LVT_S32, offsetof(struct Mod, index), true, LOT_NONE }, + { "isDirectory", LVT_BOOL, offsetof(struct Mod, isDirectory), true, LOT_NONE }, + { "name", LVT_STRING_P, offsetof(struct Mod, name), true, LOT_NONE }, + { "relativePath", LVT_STRING, offsetof(struct Mod, relativePath), true, LOT_NONE }, + { "selectable", LVT_BOOL, offsetof(struct Mod, selectable), true, LOT_NONE }, +// { "size", LVT_???, offsetof(struct Mod, size), true, LOT_??? }, <--- UNIMPLEMENTED }; #define LUA_MOD_FILE_FIELD_COUNT 3 diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 0f1b414b1..0e52988f0 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -1767,9 +1767,9 @@ char gSmluaConstants[] = "" "UNKNOWN_LOCAL_INDEX = (-1)\n" "UNKNOWN_GLOBAL_INDEX = (-1)\n" "UNKNOWN_NETWORK_INDEX = (-1)\n" -"NETWORK_PLAYER_TIMEOUT = 10\n" +"NETWORK_PLAYER_TIMEOUT = 15\n" "NETWORK_PLAYER_PING_TIMEOUT = 3\n" -"MAX_RX_SEQ_IDS = 64\n" +"MAX_RX_SEQ_IDS = 256\n" "USE_REAL_PALETTE_VAR = 0xFF\n" "NPT_UNKNOWN = 0\n" "NPT_LOCAL = 1\n" @@ -4019,6 +4019,6 @@ char gSmluaConstants[] = "" "VERSION_NUMBER = 34\n" "MINOR_VERSION_NUMBER = 0\n" "PATCH_VERSION_NUMBER = 0\n" -"MAX_VERSION_LENGTH = 10\n" -"MAX_LOCAL_VERSION_LENGTH = 12\n" +"MAX_VERSION_LENGTH = 28\n" +"MAX_LOCAL_VERSION_LENGTH = 32\n" ; \ No newline at end of file diff --git a/src/pc/network/version.c b/src/pc/network/version.c index 8457eb6c9..a820a6abd 100644 --- a/src/pc/network/version.c +++ b/src/pc/network/version.c @@ -1,13 +1,16 @@ #include #include "version.h" -#include "version_text.h" #include "types.h" static char sVersionString[MAX_VERSION_LENGTH] = { 0 }; static char sLocalVersionString[MAX_LOCAL_VERSION_LENGTH] = { 0 }; char* get_version(void) { - snprintf(sVersionString, MAX_VERSION_LENGTH, "%s", VERSION_TEXT); + if (MINOR_VERSION_NUMBER > 0) { + snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER); + } else { + snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d", VERSION_TEXT, VERSION_NUMBER); + } return sVersionString; } @@ -15,6 +18,6 @@ char* get_version_local(void) { if (PATCH_VERSION_NUMBER <= 0) { return get_version(); } - snprintf(sLocalVersionString, MAX_LOCAL_VERSION_LENGTH, "%s.%d", VERSION_TEXT, PATCH_VERSION_NUMBER); + snprintf(sLocalVersionString, MAX_LOCAL_VERSION_LENGTH, "%s %d.%d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, PATCH_VERSION_NUMBER); return sLocalVersionString; } diff --git a/src/pc/network/version.h b/src/pc/network/version.h index 4903621f4..e330882c3 100644 --- a/src/pc/network/version.h +++ b/src/pc/network/version.h @@ -1,11 +1,13 @@ #ifndef VERSION_H #define VERSION_H +#define VERSION_TEXT "beta" +#define VERSION_NUMBER 34 +#define MINOR_VERSION_NUMBER 0 #define PATCH_VERSION_NUMBER 0 #define MAX_VERSION_LENGTH 28 #define MAX_LOCAL_VERSION_LENGTH 32 - char* get_version(void); char* get_version_local(void); diff --git a/src/pc/network/version_text.h b/src/pc/network/version_text.h deleted file mode 100644 index be6263c24..000000000 --- a/src/pc/network/version_text.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#define VERSION_TEXT "beta 34" \ No newline at end of file