diff --git a/libzhl/functions/Room.zhl b/libzhl/functions/Room.zhl index 2f2e0dd4..8926fb80 100644 --- a/libzhl/functions/Room.zhl +++ b/libzhl/functions/Room.zhl @@ -163,6 +163,7 @@ struct Room depends (EntityList, RoomDescriptor, TemporaryEffects, RailManager) int _greedWaveTimer : 0x7130; float _waterAmount : 0x7134; bool _pacifist : 0x7185; + ColorMod _wallColor : 0x71b4; TemporaryEffects _temporaryEffects : 0x71f4; int _numRainSpawners : 0x7338; float _rainIntensity : 0x733c; diff --git a/repentogon/LuaInterfaces/Room/LuaRoom.cpp b/repentogon/LuaInterfaces/Room/LuaRoom.cpp index 85c2fe99..c5e0e598 100644 --- a/repentogon/LuaInterfaces/Room/LuaRoom.cpp +++ b/repentogon/LuaInterfaces/Room/LuaRoom.cpp @@ -497,6 +497,12 @@ HOOK_METHOD(Room, GetSeededCollectible, (uint32_t seed, bool noDecrease) -> int) return super(seed, noDecrease); } +LUA_FUNCTION(Lua_RoomGetWallColor) { + Room* room = lua::GetUserdata(L, 1, lua::Metatables::ROOM, lua::metatables::RoomMT); + lua::luabridge::UserdataPtr::push(L, &room->_wallColor, lua::Metatables::COLOR); + return 1; +} + HOOK_METHOD(LuaEngine, RegisterClasses, () -> void) { super(); @@ -510,6 +516,7 @@ HOOK_METHOD(LuaEngine, RegisterClasses, () -> void) { { "GetWaterAmount", Lua_RoomGetWaterAmount}, { "SetWaterAmount", Lua_RoomSetWaterAmount}, { "GetFloorColor", Lua_RoomGetFloorColor}, + { "GetWallColor", Lua_RoomGetWallColor}, { "GetWaterColor", Lua_RoomGetWaterColor}, { "SetWaterColor", Lua_RoomSetWaterColor}, { "SetWaterCurrent", Lua_RoomSetWaterCurrent},