tostring
Implements the tostring meta method to make possible to pretty-print Entities from Lua.
Example of Usage
## Example of Usage
```lua
-- bind the exposed entity UserData to a local variable
local entityAPI = alacrity.Entity
-- create a new random unique user ID
local id = alacrity.uuid.new_v4()
-- create a new Entity instance
local e = entityAPI.new({
id = id,
name = "Ad-Hoc Test Entity",
description = "Ad-Hoc entity for testing",
attributes = {},
tags = {
{ name = "humanoid", value = "minotaur" },
}
})
print(e)
-- will print
--[[
Entity {
id: b5e4f8c559f64bd4be376328a2270220,
blueprint: "",
name: "Ad-Hoc Test Entity",
description: "Ad-Hoc entity for testing",
tags: {
"humanoid": Tag {
name: "humanoid",
value: Value {
kind: String(
"minotaur",
),
},
},
},
attributes: {},
properties: {},
buffs: {},
version: "0.0.1",
}
]]