Module api

Public API functions.

Functions

objectuuids.get_uuid (objref) Gets the UUID of the specified object.
objectuuids.get_object_by_uuid (uuid) Finds the object with the specified UUID.
objectuuids.set_uuid (objref, uuid) Sets the UUID of the specified object.
objectuuids.add_entity_with_uuid (pos, name, uuid, staticdata) Spawns an entity with its UUID already set.
objectuuids.get_uuid_for_username (name) Calculates the UUID that would be used for a player with the specified name.


Functions

objectuuids.get_uuid (objref)
Gets the UUID of the specified object.

Parameters:

  • objref [ObjectRef|LuaEntity] The object to get the UUID of.

Returns:

    [string] The object's UUID.
objectuuids.get_object_by_uuid (uuid)
Finds the object with the specified UUID.

Parameters:

  • uuid [string] The object's UUID, in lenient form.

Returns:

    [ObjectRef|nil] The object associated with the UUID, or nil if it's unavailable.
objectuuids.set_uuid (objref, uuid)
Sets the UUID of the specified object.

Parameters:

  • objref [ObjectRef|LuaEntity] The object to change the UUID of.
  • uuid [string] The new UUID, in lenient form.
objectuuids.add_entity_with_uuid (pos, name, uuid, staticdata)
Spawns an entity with its UUID already set.

Parameters:

  • pos [vector] Where to spawn the entity.
  • name [string] The name of the entity type.
  • uuid [string] The UUID to assign to the object.
  • staticdata [string|nil] The initial state of the entity.

Returns:

    [ObjectRef|nil] The spawned object, or nil on failure.
objectuuids.get_uuid_for_username (name)
Calculates the UUID that would be used for a player with the specified name. The player is not required to have ever been in the world.

Parameters:

  • name [string] The player's username.

Returns:

    [string] The player's UUID.
generated by LDoc 1.4.6 Last updated 2023-06-11 02:20:13