diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5747794fa..b4923c700 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -101,6 +101,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- New `Scene` Lua functions `AddNavigatableArea(areaName)` and `ClearNavigatableAreas()`. This can be used to restrict pathfinding to only search a set of areas that have been added to the scene before via `Scene:SetArea(area)`.
+- New `ADoor` Lua function `ResetSensorTimer()`. Resets the sensor timer for that door, making it take the full SensorInterval again for it to detect actors.
+
+- Exposed `SceneObject` property `BuyableMode` to Lua (R).
+
+- `Enum` binding for `SceneObject.BuyableMode`: `NORESTRICTIONS = 0, BUYMENUONLY = 1, OBJECTPICKERONLY = 2, SCRIPTONLY = 3`.
+
Changed
@@ -141,6 +147,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Script values, i.e `GetStringValue`, `RemoveStringValue`, `StringValueExists` and the associated functions for `GetNumberValue`/`GetObjectValue`, have been moved from MOSRotating to MovableObject, so now any object with script support can use these values.
+- The `SceneObject` property `IsBuyable` has been renamed to `Buyable`.
+
Fixed
diff --git a/Entities/SceneObject.h b/Entities/SceneObject.h
index f3c75cea8..5667c4719 100644
--- a/Entities/SceneObject.h
+++ b/Entities/SceneObject.h
@@ -464,6 +464,12 @@ class SceneObject : public Entity {
bool IsBuyable() const { return m_Buyable; }
+ ///
+ /// Gets the BuyableMode of this SceneObject.
+ ///
+ /// The BuyableMode of this SceneObject
+ BuyableMode GetBuyableMode() const { return m_BuyableMode; }
+
///
/// Gets whether this SceneObject is available only in the BuyMenu list when buyable.
///
diff --git a/Lua/LuaBindingsEntities.cpp b/Lua/LuaBindingsEntities.cpp
index 4f13f0cd6..8b6811019 100644
--- a/Lua/LuaBindingsEntities.cpp
+++ b/Lua/LuaBindingsEntities.cpp
@@ -371,6 +371,7 @@ namespace RTE {
.def("OpenDoor", &ADoor::OpenDoor)
.def("CloseDoor", &ADoor::CloseDoor)
.def("StopDoor", &ADoor::StopDoor)
+ .def("ResetSensorTimer", &ADoor::ResetSensorTimer)
.def("SetClosedByDefault", &ADoor::SetClosedByDefault)
.enum_("DoorState")[
@@ -1337,8 +1338,9 @@ namespace RTE {
.property("RotAngle", &SceneObject::GetRotAngle, &SceneObject::SetRotAngle)
.property("Team", &SceneObject::GetTeam, &SceneObject::SetTeam)
.property("PlacedByPlayer", &SceneObject::GetPlacedByPlayer, &SceneObject::SetPlacedByPlayer)
- .property("IsBuyable", &SceneObject::IsBuyable)
-
+ .property("Buyable", &SceneObject::IsBuyable)
+ .property("BuyableMode", &SceneObject::GetBuyableMode)
+
.def("IsOnScenePoint", &SceneObject::IsOnScenePoint)
.def("GetGoldValue", &SceneObject::GetGoldValueOld)
.def("GetGoldValue", &SceneObject::GetGoldValue)
@@ -1346,7 +1348,14 @@ namespace RTE {
.def("GetGoldValueString", &SceneObject::GetGoldValueString)
.def("GetTotalValue", &SceneObject::GetTotalValue)
- .def("GetTotalValue", &LuaAdaptersSceneObject::GetTotalValue);
+ .def("GetTotalValue", &LuaAdaptersSceneObject::GetTotalValue)
+
+ .enum_("BuyableMode")[
+ luabind::value("NORESTRICTIONS", SceneObject::BuyableMode::NoRestrictions),
+ luabind::value("BUYMENUONLY", SceneObject::BuyableMode::BuyMenuOnly),
+ luabind::value("OBJECTPICKERONLY", SceneObject::BuyableMode::ObjectPickerOnly),
+ luabind::value("SCRIPTONLY", SceneObject::BuyableMode::ScriptOnly)];
+
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////