diff --git a/docs/dev/Lua API.rst b/docs/dev/Lua API.rst index f002297ad..0dac09a64 100644 --- a/docs/dev/Lua API.rst +++ b/docs/dev/Lua API.rst @@ -2603,8 +2603,9 @@ Textures module In order for the game to render a particular tile (graphic), it needs to know the ``texpos`` - the position in the vector of the registered game textures (also the graphical tile id passed as the ``tile`` field in a `Pen `). -Add your own texture to it and get ``texpos`` is not difficult. But the game periodically deletes textures that are in the vector, and that's the problem. -Because the ``texpos`` we got earlier no longer points to our added texture. +Adding new textures to the vector is not difficult, but the game periodically +deletes textures that are in the vector, and that's a problem since it +invalidates the ``texpos`` value that used to point to that texture. The ``texture`` module solves this problem. Instead of ``texpos`` directly, it operates on the ``TexposHandle`` entity, which is essentially a reference to ``texpos``. Thanks to this handle, it is possible to get a valid ``texpos`` at any time.