Revert "Add gServerSettings.enableChat"

This reverts commit c21c255241.
This commit is contained in:
Agent X 2024-05-12 08:15:57 -04:00
parent f3b583ac47
commit cb6f5f2b30
6 changed files with 2 additions and 8 deletions

View file

@ -2001,7 +2001,6 @@
--- @class ServerSettings
--- @field public bouncyLevelBounds BouncyLevelBounds
--- @field public bubbleDeath integer
--- @field public enableChat integer
--- @field public enableCheats integer
--- @field public enablePlayerList integer
--- @field public enablePlayersInLevelDisplay integer

View file

@ -2514,7 +2514,6 @@
| ----- | ---- | ------ |
| bouncyLevelBounds | [enum BouncyLevelBounds](constants.md#enum-BouncyLevelBounds) | |
| bubbleDeath | `integer` | |
| enableChat | `integer` | |
| enablePlayerList | `integer` | |
| enablePlayersInLevelDisplay | `integer` | |
| headlessServer | `integer` | |

View file

@ -223,7 +223,7 @@ bool djui_interactable_on_key_down(int scancode) {
return true;
}
if (gDjuiChatBox != NULL && !gDjuiChatBoxFocus && gServerSettings.enableChat) {
if (gDjuiChatBox != NULL && !gDjuiChatBoxFocus) {
bool pressChat = false;
for (int i = 0; i < MAX_BINDS; i++) {
if (scancode == (int)configKeyChat[i]) { pressChat = true; }

View file

@ -2195,11 +2195,10 @@ static struct LuaObjectField sRayIntersectionInfoFields[LUA_RAY_INTERSECTION_INF
{ "surface", LVT_COBJECT_P, offsetof(struct RayIntersectionInfo, surface), false, LOT_SURFACE },
};
#define LUA_SERVER_SETTINGS_FIELD_COUNT 14
#define LUA_SERVER_SETTINGS_FIELD_COUNT 13
static struct LuaObjectField sServerSettingsFields[LUA_SERVER_SETTINGS_FIELD_COUNT] = {
{ "bouncyLevelBounds", LVT_S32, offsetof(struct ServerSettings, bouncyLevelBounds), false, LOT_NONE },
{ "bubbleDeath", LVT_U8, offsetof(struct ServerSettings, bubbleDeath), false, LOT_NONE },
{ "enableChat", LVT_U8, offsetof(struct ServerSettings, enableChat), false, LOT_NONE },
{ "enableCheats", LVT_U8, offsetof(struct ServerSettings, enableCheats), false, LOT_NONE },
{ "enablePlayerList", LVT_U8, offsetof(struct ServerSettings, enablePlayerList), false, LOT_NONE },
{ "enablePlayersInLevelDisplay", LVT_U8, offsetof(struct ServerSettings, enablePlayersInLevelDisplay), false, LOT_NONE },

View file

@ -76,7 +76,6 @@ struct ServerSettings gServerSettings = {
.bubbleDeath = TRUE,
.enablePlayersInLevelDisplay = TRUE,
.enablePlayerList = TRUE,
.enableChat = TRUE,
.headlessServer = FALSE,
.nametags = TRUE,
.maxPlayers = MAX_PLAYERS,
@ -125,7 +124,6 @@ bool network_init(enum NetworkType inNetworkType, bool reconnecting) {
gServerSettings.bubbleDeath = configBubbleDeath;
gServerSettings.enablePlayersInLevelDisplay = TRUE;
gServerSettings.enablePlayerList = TRUE;
gServerSettings.enableChat = TRUE;
gServerSettings.nametags = configNametags;
gServerSettings.maxPlayers = configAmountofPlayers;
gServerSettings.pauseAnywhere = configPauseAnywhere;

View file

@ -79,7 +79,6 @@ struct ServerSettings {
u8 bubbleDeath;
u8 enablePlayersInLevelDisplay;
u8 enablePlayerList;
u8 enableChat;
u8 headlessServer;
u8 nametags;
u8 maxPlayers;