summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 386b7e070..eab1e6279 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -591,6 +591,21 @@ void LuaEntitySAO::getAttachment(int *parent_id, std::string *bone, v3f *positio
*rotation = m_attachment_rotation;
}
+void LuaEntitySAO::addAttachmentChild(int child_id)
+{
+ m_attachment_child_ids.insert(child_id);
+}
+
+void LuaEntitySAO::removeAttachmentChild(int child_id)
+{
+ m_attachment_child_ids.erase(child_id);
+}
+
+std::set<int> LuaEntitySAO::getAttachmentChildIds()
+{
+ return m_attachment_child_ids;
+}
+
ObjectProperties* LuaEntitySAO::accessObjectProperties()
{
return &m_prop;
@@ -1231,6 +1246,21 @@ void PlayerSAO::getAttachment(int *parent_id, std::string *bone, v3f *position,
*rotation = m_attachment_rotation;
}
+void PlayerSAO::addAttachmentChild(int child_id)
+{
+ m_attachment_child_ids.insert(child_id);
+}
+
+void PlayerSAO::removeAttachmentChild(int child_id)
+{
+ m_attachment_child_ids.erase(child_id);
+}
+
+std::set<int> PlayerSAO::getAttachmentChildIds()
+{
+ return m_attachment_child_ids;
+}
+
ObjectProperties* PlayerSAO::accessObjectProperties()
{
return &m_prop;