1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-13 04:35:28 +01:00

Add persistent unique identifiers for objects (#14135)

This commit is contained in:
sfence
2025-07-09 10:40:26 +02:00
committed by GitHub
parent e0f8243629
commit 4f42b4308c
20 changed files with 257 additions and 19 deletions

View File

@@ -141,6 +141,10 @@ public:
virtual u16 getHP() const
{ return 0; }
/// @brief Returns an unique ID for this object (persistent across unload, server restarts).
/// @note Because these strings are very short, copying them is not expensive.
virtual std::string getGUID() const = 0;
virtual void setArmorGroups(const ItemGroupList &armor_groups)
{}
virtual const ItemGroupList &getArmorGroups() const