Add back legacy palette fields so mods don't immediately break
This commit is contained in:
parent
47bfff14d8
commit
b1b8ceafcb
|
@ -71,7 +71,8 @@ override_field_types = {
|
||||||
override_field_mutable = {
|
override_field_mutable = {
|
||||||
"NetworkPlayer": [
|
"NetworkPlayer": [
|
||||||
"overrideModelIndex",
|
"overrideModelIndex",
|
||||||
"overridePalette"
|
"overridePalette",
|
||||||
|
"overridePaletteIndex"
|
||||||
],
|
],
|
||||||
"Animation": [
|
"Animation": [
|
||||||
"values",
|
"values",
|
||||||
|
@ -88,6 +89,7 @@ override_field_invisible = {
|
||||||
}
|
}
|
||||||
|
|
||||||
override_field_deprecated = {
|
override_field_deprecated = {
|
||||||
|
"NetworkPlayer": [ "paletteIndex", "overridePaletteIndex", "overridePaletteIndexLp" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
override_field_immutable = {
|
override_field_immutable = {
|
||||||
|
|
|
@ -1123,7 +1123,10 @@
|
||||||
--- @field public onRxSeqId integer
|
--- @field public onRxSeqId integer
|
||||||
--- @field public overrideModelIndex integer
|
--- @field public overrideModelIndex integer
|
||||||
--- @field public overridePalette PlayerPalette
|
--- @field public overridePalette PlayerPalette
|
||||||
|
--- @field public overridePaletteIndex integer
|
||||||
|
--- @field public overridePaletteIndexLp integer
|
||||||
--- @field public palette PlayerPalette
|
--- @field public palette PlayerPalette
|
||||||
|
--- @field public paletteIndex integer
|
||||||
--- @field public ping integer
|
--- @field public ping integer
|
||||||
--- @field public type integer
|
--- @field public type integer
|
||||||
|
|
||||||
|
|
|
@ -1245,7 +1245,7 @@ static struct LuaObjectField sNametagsSettingsFields[LUA_NAMETAGS_SETTINGS_FIELD
|
||||||
{ "showSelfTag", LVT_BOOL, offsetof(struct NametagsSettings, showSelfTag), false, LOT_NONE },
|
{ "showSelfTag", LVT_BOOL, offsetof(struct NametagsSettings, showSelfTag), false, LOT_NONE },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define LUA_NETWORK_PLAYER_FIELD_COUNT 28
|
#define LUA_NETWORK_PLAYER_FIELD_COUNT 31
|
||||||
static struct LuaObjectField sNetworkPlayerFields[LUA_NETWORK_PLAYER_FIELD_COUNT] = {
|
static struct LuaObjectField sNetworkPlayerFields[LUA_NETWORK_PLAYER_FIELD_COUNT] = {
|
||||||
{ "connected", LVT_BOOL, offsetof(struct NetworkPlayer, connected), true, LOT_NONE },
|
{ "connected", LVT_BOOL, offsetof(struct NetworkPlayer, connected), true, LOT_NONE },
|
||||||
{ "currActNum", LVT_S16, offsetof(struct NetworkPlayer, currActNum), true, LOT_NONE },
|
{ "currActNum", LVT_S16, offsetof(struct NetworkPlayer, currActNum), true, LOT_NONE },
|
||||||
|
@ -1272,7 +1272,10 @@ static struct LuaObjectField sNetworkPlayerFields[LUA_NETWORK_PLAYER_FIELD_COUNT
|
||||||
{ "onRxSeqId", LVT_U8, offsetof(struct NetworkPlayer, onRxSeqId), true, LOT_NONE },
|
{ "onRxSeqId", LVT_U8, offsetof(struct NetworkPlayer, onRxSeqId), true, LOT_NONE },
|
||||||
{ "overrideModelIndex", LVT_U8, offsetof(struct NetworkPlayer, overrideModelIndex), false, LOT_NONE },
|
{ "overrideModelIndex", LVT_U8, offsetof(struct NetworkPlayer, overrideModelIndex), false, LOT_NONE },
|
||||||
{ "overridePalette", LVT_COBJECT, offsetof(struct NetworkPlayer, overridePalette), false, LOT_PLAYERPALETTE },
|
{ "overridePalette", LVT_COBJECT, offsetof(struct NetworkPlayer, overridePalette), false, LOT_PLAYERPALETTE },
|
||||||
|
{ "overridePaletteIndex", LVT_U8, offsetof(struct NetworkPlayer, overridePaletteIndex), false, LOT_NONE },
|
||||||
|
{ "overridePaletteIndexLp", LVT_U8, offsetof(struct NetworkPlayer, overridePaletteIndexLp), true, LOT_NONE },
|
||||||
{ "palette", LVT_COBJECT, offsetof(struct NetworkPlayer, palette), true, LOT_PLAYERPALETTE },
|
{ "palette", LVT_COBJECT, offsetof(struct NetworkPlayer, palette), true, LOT_PLAYERPALETTE },
|
||||||
|
{ "paletteIndex", LVT_U8, offsetof(struct NetworkPlayer, paletteIndex), true, LOT_NONE },
|
||||||
{ "ping", LVT_U32, offsetof(struct NetworkPlayer, ping), true, LOT_NONE },
|
{ "ping", LVT_U32, offsetof(struct NetworkPlayer, ping), true, LOT_NONE },
|
||||||
// { "rxPacketHash", LOT_???, offsetof(struct NetworkPlayer, rxPacketHash), true, LOT_??? }, <--- UNIMPLEMENTED
|
// { "rxPacketHash", LOT_???, offsetof(struct NetworkPlayer, rxPacketHash), true, LOT_??? }, <--- UNIMPLEMENTED
|
||||||
// { "rxSeqIds", LOT_???, offsetof(struct NetworkPlayer, rxSeqIds), true, LOT_??? }, <--- UNIMPLEMENTED
|
// { "rxSeqIds", LOT_???, offsetof(struct NetworkPlayer, rxSeqIds), true, LOT_??? }, <--- UNIMPLEMENTED
|
||||||
|
|
|
@ -57,6 +57,11 @@ struct NetworkPlayer {
|
||||||
|
|
||||||
u16 rxSeqIds[MAX_RX_SEQ_IDS];
|
u16 rxSeqIds[MAX_RX_SEQ_IDS];
|
||||||
u32 rxPacketHash[MAX_RX_SEQ_IDS];
|
u32 rxPacketHash[MAX_RX_SEQ_IDS];
|
||||||
|
|
||||||
|
// legacy fields to allow mods not to fully break (they don't do anything anymore)
|
||||||
|
u8 paletteIndex;
|
||||||
|
u8 overridePaletteIndex;
|
||||||
|
u8 overridePaletteIndexLp;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct NetworkPlayer gNetworkPlayers[];
|
extern struct NetworkPlayer gNetworkPlayers[];
|
||||||
|
|
Loading…
Reference in New Issue