diff --git a/src/client/luafunctions.cpp b/src/client/luafunctions.cpp index 1c1ce018..66d0ee84 100644 --- a/src/client/luafunctions.cpp +++ b/src/client/luafunctions.cpp @@ -526,6 +526,7 @@ void Client::registerLuaFunctions() g_lua.bindClassMemberFunction("isNotMoveable", &ThingType::isNotMoveable); g_lua.bindClassMemberFunction("blockProjectile", &ThingType::blockProjectile); g_lua.bindClassMemberFunction("isNotPathable", &ThingType::isNotPathable); + g_lua.bindClassMemberFunction("setPathable", &ThingType::setPathable); g_lua.bindClassMemberFunction("isPickupable", &ThingType::isPickupable); g_lua.bindClassMemberFunction("isHangable", &ThingType::isHangable); g_lua.bindClassMemberFunction("isHookSouth", &ThingType::isHookSouth); diff --git a/src/client/thingtype.h b/src/client/thingtype.h index 278df324..b8709574 100644 --- a/src/client/thingtype.h +++ b/src/client/thingtype.h @@ -178,6 +178,7 @@ public: bool isNotMoveable() { return m_attribs.has(ThingAttrNotMoveable); } bool blockProjectile() { return m_attribs.has(ThingAttrBlockProjectile); } bool isNotPathable() { return m_attribs.has(ThingAttrNotPathable); } + void setPathable(bool var) { var == true ? m_attribs.remove(ThingAttrNotPathable) : m_attribs.set(ThingAttrNotPathable, true); } bool isPickupable() { return m_attribs.has(ThingAttrPickupable); } bool isHangable() { return m_attribs.has(ThingAttrHangable); } bool isHookSouth() { return m_attribs.has(ThingAttrHookSouth); }