Make gMarioStates->controller immutable in Lua

This commit is contained in:
MysterD 2023-04-01 17:16:18 -07:00
parent 1bd5c03133
commit 103e184270
3 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ override_field_invisible = {
} }
override_field_immutable = { override_field_immutable = {
"MarioState": [ "playerIndex" ], "MarioState": [ "playerIndex", "controller" ],
"Character": [ "*" ], "Character": [ "*" ],
"NetworkPlayer": [ "*" ], "NetworkPlayer": [ "*" ],
"TextureInfo": [ "*" ], "TextureInfo": [ "*" ],

View File

@ -1042,7 +1042,7 @@
| ceilHeight | `number` | | | ceilHeight | `number` | |
| character | [Character](structs.md#Character) | | | character | [Character](structs.md#Character) | |
| collidedObjInteractTypes | `integer` | | | collidedObjInteractTypes | `integer` | |
| controller | [Controller](structs.md#Controller) | | | controller | [Controller](structs.md#Controller) | read-only |
| curAnimOffset | `number` | | | curAnimOffset | `number` | |
| currentRoom | `integer` | | | currentRoom | `integer` | |
| doubleJumpTimer | `integer` | | | doubleJumpTimer | `integer` | |

View File

@ -827,7 +827,7 @@ static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = {
{ "ceilHeight", LVT_F32, offsetof(struct MarioState, ceilHeight), false, LOT_NONE }, { "ceilHeight", LVT_F32, offsetof(struct MarioState, ceilHeight), false, LOT_NONE },
{ "character", LVT_COBJECT_P, offsetof(struct MarioState, character), false, LOT_CHARACTER }, { "character", LVT_COBJECT_P, offsetof(struct MarioState, character), false, LOT_CHARACTER },
{ "collidedObjInteractTypes", LVT_U32, offsetof(struct MarioState, collidedObjInteractTypes), false, LOT_NONE }, { "collidedObjInteractTypes", LVT_U32, offsetof(struct MarioState, collidedObjInteractTypes), false, LOT_NONE },
{ "controller", LVT_COBJECT_P, offsetof(struct MarioState, controller), false, LOT_CONTROLLER }, { "controller", LVT_COBJECT_P, offsetof(struct MarioState, controller), true, LOT_CONTROLLER },
{ "curAnimOffset", LVT_F32, offsetof(struct MarioState, curAnimOffset), false, LOT_NONE }, { "curAnimOffset", LVT_F32, offsetof(struct MarioState, curAnimOffset), false, LOT_NONE },
{ "currentRoom", LVT_S16, offsetof(struct MarioState, currentRoom), false, LOT_NONE }, { "currentRoom", LVT_S16, offsetof(struct MarioState, currentRoom), false, LOT_NONE },
{ "doubleJumpTimer", LVT_U8, offsetof(struct MarioState, doubleJumpTimer), false, LOT_NONE }, { "doubleJumpTimer", LVT_U8, offsetof(struct MarioState, doubleJumpTimer), false, LOT_NONE },