Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 4c07418

Browse files
committed
Exposing Actor property SharpAimProgress and HeldDevice property Supported to Lua
1 parent da903cd commit 4c07418

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Entities/HeldDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ ClassInfoGetters;
256256
/// Gets whether this HeldDevice is currently supported by a second hand.
257257
/// </summary>
258258
/// <returns>Whether the device is supported or not.</returns>
259-
bool GetSupported() { return m_Supported; }
259+
bool GetSupported() const { return m_Supported; }
260260

261261

262262
//////////////////////////////////////////////////////////////////////////////////////////

Lua/LuaBindingsEntities.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ namespace RTE {
220220
.property("HolsterOffset", &Actor::GetHolsterOffset, &Actor::SetHolsterOffset)
221221
.property("ViewPoint", &Actor::GetViewPoint, &Actor::SetViewPoint)
222222
.property("ItemInReach", &Actor::GetItemInReach, &Actor::SetItemInReach)
223+
.property("SharpAimProgress", &Actor::GetSharpAimProgress)
223224
.property("Height", &Actor::GetHeight)
224225
.property("AIMode", &Actor::GetAIMode, &Actor::SetAIMode)
225226
.property("DeploymentID", &Actor::GetDeploymentID)
@@ -649,6 +650,7 @@ namespace RTE {
649650
.property("HasPickupLimitations", &HeldDevice::HasPickupLimitations)
650651
.property("UnPickupable", &HeldDevice::IsUnPickupable, &HeldDevice::SetUnPickupable)
651652
.property("GripStrengthMultiplier", &HeldDevice::GetGripStrengthMultiplier, &HeldDevice::SetGripStrengthMultiplier)
653+
.property("Supported", &HeldDevice::GetSupported, &HeldDevice::SetSupported)
652654

653655
.def("IsWeapon", &HeldDevice::IsWeapon)
654656
.def("IsTool", &HeldDevice::IsTool)
@@ -667,8 +669,7 @@ namespace RTE {
667669
.def("IsFull", &HeldDevice::IsFull)
668670
.def("IsPickupableBy", &HeldDevice::IsPickupableBy)
669671
.def("AddPickupableByPresetName", &HeldDevice::AddPickupableByPresetName)
670-
.def("RemovePickupableByPresetName", &HeldDevice::RemovePickupableByPresetName)
671-
.def("SetSupported", &HeldDevice::SetSupported);
672+
.def("RemovePickupableByPresetName", &HeldDevice::RemovePickupableByPresetName);
672673
}
673674

674675
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)