mirror of
https://github.com/Steffo99/lihzahrd.git
synced 2024-11-21 07:34:23 +00:00
1.0b1
This commit is contained in:
parent
b97cd85766
commit
c2bc719aa9
55 changed files with 1739 additions and 818 deletions
52
README.md
52
README.md
|
@ -1,9 +1,45 @@
|
|||
# lihzahrd
|
||||
A Terraria world parser in Python
|
||||
# ![](https://gamepedia.cursecdn.com/terraria_gamepedia/e/ee/Lihzahrd.png?version=b8e7ea78b2f9f27a46e2e70d5684b344) `lihzahrd` ![](https://img.shields.io/pypi/v/lihzahrd)
|
||||
|
||||
## References
|
||||
- http://seancode.com/terrafirma/world.html
|
||||
- http://ludwig.schafer.free.fr/
|
||||
- https://github.com/cokolele/terraria-world-parser/
|
||||
- https://github.com/TEdit/Terraria-Map-Editor/blob/master/TEditXna/Terraria/World.FileV2.cs
|
||||
- https://steamcommunity.com/sharedfiles/filedetails/?id=841032800
|
||||
A Terraria 1.3.5.3 world parser in Python.
|
||||
|
||||
You can use this package to get programmer-friendly data from a Terraria world!
|
||||
|
||||
Install with:
|
||||
```
|
||||
pip install lihzahrd
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
You can open a world file and get a `World` object by calling:
|
||||
|
||||
```
|
||||
import lihzahrd
|
||||
world = lihzahrd.World.create_from_file("filename.wld")
|
||||
```
|
||||
|
||||
It _will_ take a while to process: a small Terraria world contains more than 5 million tiles!
|
||||
|
||||
Once you have a `World` object, you can use all data present in the save file by accessing [its attributes](http://gh.steffo.eu/lihzahrd/html/world.html).
|
||||
|
||||
## Documentation
|
||||
|
||||
The documentation is available [here](https://gh.steffo.eu/lihzahrd/html/).
|
||||
|
||||
It's a bit messy and incomplete, as I still have not figured out the meaning of some data, and the code is in need of some refactoring.
|
||||
|
||||
If you know something that isn't present in the documentation, please let me know [with an issue](https://github.com/Steffo99/lihzahrd/issues/new)!
|
||||
|
||||
## References used
|
||||
|
||||
- The [TEdit World Parser](https://github.com/TEdit/Terraria-Map-Editor/blob/master/TEditXna/Terraria/World.FileV2.cs), the most accurate source currently available.
|
||||
- The [tModLoader wiki](https://github.com/tModLoader/tModLoader/wiki), containing lists of all possible IDs.
|
||||
- The [Terrafirma world documentation](http://seancode.com/terrafirma/world.html), accurate for old worlds (version <69)
|
||||
- The [1.3.x.x world documentation](http://ludwig.schafer.free.fr/), a bit incomplete, but an useful source nevertheless.
|
||||
- A [JS World Parser](https://github.com/cokolele/terraria-world-parser/) on GitHub.
|
||||
- A [Background Guide](https://steamcommunity.com/sharedfiles/filedetails/?id=841032800) on Steam that displays all possible world backgrounds.
|
||||
|
||||
## License
|
||||
|
||||
`lihzard` is licensed under the [AGPL 3.0](/LICENSE.txt).
|
||||
That means you have to publish under the same license the source code of any program you create that uses `lihzahrd`.
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/doctrees/reference.doctree
Normal file
BIN
docs/doctrees/reference.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/doctrees/usage.doctree
Normal file
BIN
docs/doctrees/usage.doctree
Normal file
Binary file not shown.
Binary file not shown.
BIN
docs/html/_images/lihzahrd.png
Normal file
BIN
docs/html/_images/lihzahrd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 853 B |
|
@ -1,25 +1,31 @@
|
|||
lihzahrd
|
||||
====================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
.. image:: lihzahrd.png
|
||||
:width: 32px
|
||||
:height: 48px
|
||||
:alt: A Lihzahrd from the Jungle Temple
|
||||
|
||||
chests
|
||||
fileutils
|
||||
header
|
||||
npcs
|
||||
pressureplates
|
||||
signs
|
||||
tileentities
|
||||
tiles
|
||||
timer
|
||||
townmanager
|
||||
world
|
||||
errors
|
||||
``lihzahrd`` is a Terraria 1.3.5.3 world parser in Python.
|
||||
|
||||
You can use this package to get programmer-friendly data from a Terraria world!
|
||||
|
||||
Some useful links
|
||||
Documentation pages
|
||||
------------------------------------
|
||||
|
||||
Find out more on how to use ``lihzahrd`` in these pages:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
usage
|
||||
reference
|
||||
|
||||
|
||||
Some more links
|
||||
------------------------------------
|
||||
|
||||
Here are some links that may be useful:
|
||||
|
||||
* `Lihzahrd on GitHub <https://github.com/Steffo99/lihzahrd>`_
|
||||
* :ref:`genindex`
|
||||
* :ref:`genindex`
|
||||
|
|
22
docs/html/_sources/reference.rst.txt
Normal file
22
docs/html/_sources/reference.rst.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
API Reference
|
||||
====================================
|
||||
|
||||
Here are the pages autogenerated from the docstrings inside the Python library code.
|
||||
|
||||
Type annotations are missing for some reason, maybe ``autodoc`` doesn't support them yet?
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
world
|
||||
chests
|
||||
header
|
||||
npcs
|
||||
pressureplates
|
||||
signs
|
||||
tileentities
|
||||
tiles
|
||||
townmanager
|
||||
errors
|
||||
fileutils
|
||||
timer
|
122
docs/html/_sources/usage.rst.txt
Normal file
122
docs/html/_sources/usage.rst.txt
Normal file
|
@ -0,0 +1,122 @@
|
|||
.. currentmodule:: lihzahrd
|
||||
|
||||
Usage guide
|
||||
====================================
|
||||
|
||||
Prerequisites
|
||||
------------------------------------
|
||||
|
||||
To use ``lihzahrd``, you need Python 3.7 or higher.
|
||||
|
||||
That's it! No other packages are required!
|
||||
|
||||
Installing
|
||||
------------------------------------
|
||||
|
||||
You can download (or update) the package with ``pip`` by entering in your terminal: ::
|
||||
|
||||
python3.7 -m pip install --upgrade lihzahrd
|
||||
|
||||
Opening a world
|
||||
------------------------------------
|
||||
|
||||
To open a Terraria world file named ``terra.wld`` located in the current working directory, you should import the
|
||||
:py:mod:`lihzahrd` package and then call the :py:meth:`World.create_from_file` function: ::
|
||||
|
||||
import lihzahrd
|
||||
world = lihzahrd.World.create_from_file("terra.wld")
|
||||
|
||||
It should take **up to a few minutes**, depending on the size of the world, and then return a
|
||||
:py:class:`World` object.
|
||||
|
||||
Accessing the world properties
|
||||
------------------------------------
|
||||
|
||||
Most of the world properties are accessible directly as attributes of the :py:class:`World` object: ::
|
||||
|
||||
print(world.name)
|
||||
# "Terra"
|
||||
|
||||
print(world.is_hardmode)
|
||||
# False
|
||||
|
||||
print(world.spawn_point)
|
||||
# Coordinates(2101, 246)
|
||||
|
||||
Some world properties may be grouped in other objects: ::
|
||||
|
||||
print(world.bosses_defeated)
|
||||
# <BossesDefeated>
|
||||
|
||||
print(world.bosses_defeated.eye_of_cthulhu)
|
||||
# False
|
||||
|
||||
You can look at the :py:class:`World` class documentation or use an IDE that supports type annotations
|
||||
(such as `PyCharm <https://www.jetbrains.com/pycharm/>`_) to find all available attributes.
|
||||
|
||||
Accessing the tile data
|
||||
------------------------------------
|
||||
|
||||
All :py:class:`tiles.Tile` are stored in the :py:class:`tiles.TileMatrix` accessible at the :py:attr:`World.tiles`
|
||||
attribute. ::
|
||||
|
||||
print(world.tiles)
|
||||
# <TileMatrix 4200x1200>
|
||||
|
||||
You can access them by using the ``tiles`` attribute as a two-dimensional array, where (0, 0) is the top-left block: ::
|
||||
|
||||
print(world.tiles[0, 0])
|
||||
# <Tile >
|
||||
|
||||
You can also use :py:class:`fileutils.Coordinates` instead of a :py:class:`tuple` to fetch a specific tile: ::
|
||||
|
||||
print(world.tiles[lihzahrd.fileutils.Coordinates(2000, 1000)])
|
||||
# <Tile B>
|
||||
|
||||
print(world.tiles[world.spawn_point])
|
||||
# <Tile B>
|
||||
|
||||
Counting tiles from the bottom-right is possible too: ::
|
||||
|
||||
print(world.tiles[-1, -1])
|
||||
# <Tile >
|
||||
|
||||
A single :py:class:`tiles.Tile` has five attributes that you can access:
|
||||
|
||||
* :py:attr:`tiles.Tile.block`, the foreground :py:class:`tiles.Block`;
|
||||
* :py:attr:`tiles.Tile.wall`, the background :py:class:`tiles.Wall`;
|
||||
* :py:attr:`tiles.Tile.liquid`, the :py:class:`tiles.Liquid` present in that tile;
|
||||
* :py:attr:`tiles.Tile.wiring`, the colored wires and actuators (:py:class:`tiles.Wiring`);
|
||||
* :py:attr:`tiles.Tile.extra`, additional data about the block present at that tile, such as the contents of a chest.
|
||||
|
||||
All of these attributes may be :py:const:`None` if the property isn't applicable for the tile:
|
||||
for example, :py:attr:`tiles.Tile.block` is :py:const:`None` if there is no block ("air") placed there.
|
||||
|
||||
Accessing extra data
|
||||
------------------------------------
|
||||
|
||||
Extra data, such as the content of chests or the text of signs, may be accessed in two different ways:
|
||||
|
||||
* Through the :py:attr:`tiles.Tile.extra` attribute: ::
|
||||
|
||||
print(world.tiles[2893, 1074].extra)
|
||||
# <Chest '' at 2893, 1074>
|
||||
|
||||
* Through the various lists available in the :py:class:`World` class, such as :py:attr:`World.chests`: ::
|
||||
|
||||
print(world.chests[0])
|
||||
# <Chest '' at 2893, 1074>
|
||||
|
||||
Both ways return the same object, but one may be faster than the other, depending on your use case: ::
|
||||
|
||||
print(world.tiles[2893, 1074].extra is world.chests[0])
|
||||
# True
|
||||
|
||||
Something else
|
||||
------------------------------------
|
||||
|
||||
All information included in a Terraria savefile is parsed in this package and made available in the :py:class:`World`
|
||||
object.
|
||||
|
||||
If you couldn't find what you needed in this short usage guide, check the API Reference or have a look at the
|
||||
`source code <https://github.com/Steffo99/lihzahrd/tree/master/lihzahrd>`_ !
|
|
@ -7,5 +7,4 @@ lihzahrd.World
|
|||
|
||||
.. autoclass:: lihzahrd.World
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
|
3
docs/html/_static/lihzahrd.css
Normal file
3
docs/html/_static/lihzahrd.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
.wy-side-nav-search {
|
||||
background-color:#7FA23E !important;
|
||||
}
|
|
@ -33,10 +33,11 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.fileutils" href="fileutils.html" />
|
||||
<link rel="prev" title="lihzahrd" href="index.html" />
|
||||
<link rel="next" title="lihzahrd.header" href="header.html" />
|
||||
<link rel="prev" title="lihzahrd.World" href="world.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.chests</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.chests</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.chests</li>
|
||||
|
||||
|
||||
|
@ -20105,10 +20112,10 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="fileutils.html" class="btn btn-neutral float-right" title="lihzahrd.fileutils" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="header.html" class="btn btn-neutral float-right" title="lihzahrd.header" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="index.html" class="btn btn-neutral float-left" title="lihzahrd" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="world.html" class="btn btn-neutral float-left" title="lihzahrd.World" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -33,9 +33,11 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="prev" title="lihzahrd.World" href="world.html" />
|
||||
<link rel="next" title="lihzahrd.fileutils" href="fileutils.html" />
|
||||
<link rel="prev" title="lihzahrd.townmanager" href="townmanager.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -80,18 +82,22 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.errors</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.errors</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -139,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.errors</li>
|
||||
|
||||
|
||||
|
@ -178,8 +186,10 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="fileutils.html" class="btn btn-neutral float-right" title="lihzahrd.fileutils" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
<a href="world.html" class="btn btn-neutral float-left" title="lihzahrd.World" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
<a href="townmanager.html" class="btn btn-neutral float-left" title="lihzahrd.townmanager" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -33,10 +33,11 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.header" href="header.html" />
|
||||
<link rel="prev" title="lihzahrd.chests" href="chests.html" />
|
||||
<link rel="next" title="lihzahrd.timer" href="timer.html" />
|
||||
<link rel="prev" title="lihzahrd.errors" href="errors.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.fileutils</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.fileutils</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.fileutils</li>
|
||||
|
||||
|
||||
|
@ -284,10 +291,10 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="header.html" class="btn btn-neutral float-right" title="lihzahrd.header" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="timer.html" class="btn btn-neutral float-right" title="lihzahrd.timer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="chests.html" class="btn btn-neutral float-left" title="lihzahrd.chests" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="errors.html" class="btn btn-neutral float-left" title="lihzahrd.errors" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="#" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
</head>
|
||||
|
@ -80,18 +81,8 @@
|
|||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -190,14 +181,10 @@
|
|||
<h2 id="_">_</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="tiles.html#lihzahrd.tiles.TileMatrix.__getitem__">__getitem__() (lihzahrd.tiles.TileMatrix method)</a>
|
||||
</li>
|
||||
<li><a href="world.html#lihzahrd.World._read_tile_block">_read_tile_block() (lihzahrd.World static method)</a>
|
||||
<li><a href="timer.html#lihzahrd.timer.Timer._result">_result() (lihzahrd.timer.Timer property)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="timer.html#lihzahrd.timer.Timer._result">_result() (lihzahrd.timer.Timer property)</a>
|
||||
</li>
|
||||
<li><a href="header.html#lihzahrd.header.Version._version_ids">_version_ids (lihzahrd.header.Version attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
|
@ -3442,8 +3429,6 @@
|
|||
<h2 id="E">E</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="tileentities.html#lihzahrd.tileentities.ItemFrame.e">e (lihzahrd.tileentities.ItemFrame attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.EATER_MASK">EATER_MASK (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="header.html#lihzahrd.header.AnglerQuestFish.EATER_OF_PLANKTON">EATER_OF_PLANKTON (lihzahrd.header.AnglerQuestFish attribute)</a>
|
||||
|
@ -5584,12 +5569,6 @@
|
|||
<h2 id="I">I</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pressureplates.html#lihzahrd.pressureplates.WeighedPressurePlate.i">i (lihzahrd.pressureplates.WeighedPressurePlate attribute)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="tileentities.html#lihzahrd.tileentities.ItemFrame.i">(lihzahrd.tileentities.ItemFrame attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="npcs.html#lihzahrd.npcs.EntityType.ICE_BAT">ICE_BAT (lihzahrd.npcs.EntityType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.ICE_BAT_BANNER">ICE_BAT_BANNER (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -5692,10 +5671,12 @@
|
|||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.ICY_WATER_FOUNTAIN">ICY_WATER_FOUNTAIN (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="tileentities.html#lihzahrd.tileentities.TileEntity.id">id (lihzahrd.tileentities.TileEntity attribute)</a>
|
||||
<li><a href="header.html#lihzahrd.header.Version.id">id (lihzahrd.header.Version attribute)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="world.html#lihzahrd.World.id">(lihzahrd.World attribute)</a>
|
||||
</li>
|
||||
<li><a href="tileentities.html#lihzahrd.tileentities.TileEntity.id">(lihzahrd.tileentities.TileEntity attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.ILLEGAL_GUN_PARTS">ILLEGAL_GUN_PARTS (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -6670,8 +6651,6 @@
|
|||
<h2 id="M">M</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="tileentities.html#lihzahrd.tileentities.ItemFrame.m">m (lihzahrd.tileentities.ItemFrame attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.MAGIC_CUFFS">MAGIC_CUFFS (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.MAGIC_DAGGER">MAGIC_DAGGER (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -7084,10 +7063,10 @@
|
|||
<li><a href="header.html#lihzahrd.header.AnglerQuestFish.MIRAGE_FISH">(lihzahrd.header.AnglerQuestFish attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="npcs.html#lihzahrd.npcs.EntityType.MISASSEMBLED_SKELETON">MISASSEMBLED_SKELETON (lihzahrd.npcs.EntityType attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="npcs.html#lihzahrd.npcs.EntityType.MISTER_STABBY">MISTER_STABBY (lihzahrd.npcs.EntityType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.MISTER_STABBY_BANNER">MISTER_STABBY_BANNER (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -7510,8 +7489,6 @@
|
|||
<h2 id="N">N</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pressureplates.html#lihzahrd.pressureplates.WeighedPressurePlate.n">n (lihzahrd.pressureplates.WeighedPressurePlate attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.NAIL">NAIL (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.NAIL_GUN">NAIL_GUN (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -7598,10 +7575,10 @@
|
|||
</li>
|
||||
<li><a href="npcs.html#lihzahrd.npcs.EntityType.NECROMANCER_ARMORED">NECROMANCER_ARMORED (lihzahrd.npcs.EntityType attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.NECROMANCER_BANNER">NECROMANCER_BANNER (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.NECROMANTIC_SCROLL">NECROMANTIC_SCROLL (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.NECROMANTIC_SIGN">NECROMANTIC_SIGN (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -7667,6 +7644,8 @@
|
|||
<li><a href="header.html#lihzahrd.header.HardmodeTier3Ore.NOT_DETERMINED_TOO">NOT_DETERMINED_TOO (lihzahrd.header.HardmodeTier3Ore attribute)</a>
|
||||
</li>
|
||||
<li><a href="npcs.html#lihzahrd.npcs.NPC">NPC (class in lihzahrd.npcs)</a>
|
||||
</li>
|
||||
<li><a href="townmanager.html#lihzahrd.townmanager.Room.npc">npc (lihzahrd.townmanager.Room attribute)</a>
|
||||
</li>
|
||||
<li><a href="world.html#lihzahrd.World.npcs">npcs (lihzahrd.World attribute)</a>
|
||||
</li>
|
||||
|
@ -7696,8 +7675,6 @@
|
|||
<h2 id="O">O</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pressureplates.html#lihzahrd.pressureplates.WeighedPressurePlate.o">o (lihzahrd.pressureplates.WeighedPressurePlate attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.OBELISK">OBELISK (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.OBSIDIAN">OBSIDIAN (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -7878,8 +7855,6 @@
|
|||
<h2 id="P">P</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pressureplates.html#lihzahrd.pressureplates.WeighedPressurePlate.p">p (lihzahrd.pressureplates.WeighedPressurePlate attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.PAD_THAI">PAD_THAI (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="tiles.html#lihzahrd.tiles.Block.paint">paint (lihzahrd.tiles.Block attribute)</a>
|
||||
|
@ -8358,10 +8333,10 @@
|
|||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.PINK_ESKIMO_COAT">PINK_ESKIMO_COAT (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.PINK_ESKIMO_HOOD">PINK_ESKIMO_HOOD (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.PINK_ESKIMO_PANTS">PINK_ESKIMO_PANTS (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.PINK_GEL">PINK_GEL (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
@ -8618,6 +8593,8 @@
|
|||
<li><a href="signs.html#lihzahrd.signs.Sign.position">(lihzahrd.signs.Sign attribute)</a>
|
||||
</li>
|
||||
<li><a href="tileentities.html#lihzahrd.tileentities.TileEntity.position">(lihzahrd.tileentities.TileEntity attribute)</a>
|
||||
</li>
|
||||
<li><a href="townmanager.html#lihzahrd.townmanager.Room.position">(lihzahrd.townmanager.Room attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="npcs.html#lihzahrd.npcs.EntityType.POSSESSED_ARMOR">POSSESSED_ARMOR (lihzahrd.npcs.EntityType attribute)</a>
|
||||
|
@ -9316,8 +9293,6 @@
|
|||
<h2 id="S">S</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pressureplates.html#lihzahrd.pressureplates.WeighedPressurePlate.s">s (lihzahrd.pressureplates.WeighedPressurePlate attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.SAFE">SAFE (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="tiles.html#lihzahrd.tiles.BlockType.SAFES">SAFES (lihzahrd.tiles.BlockType attribute)</a>
|
||||
|
@ -10978,12 +10953,6 @@
|
|||
<h2 id="T">T</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pressureplates.html#lihzahrd.pressureplates.WeighedPressurePlate.t">t (lihzahrd.pressureplates.WeighedPressurePlate attribute)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="tileentities.html#lihzahrd.tileentities.ItemFrame.t">(lihzahrd.tileentities.ItemFrame attribute)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.TABI">TABI (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="tiles.html#lihzahrd.tiles.BlockType.TABLES">TABLES (lihzahrd.tiles.BlockType attribute)</a>
|
||||
|
@ -11324,10 +11293,10 @@
|
|||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.TIN_CHAINMAIL">TIN_CHAINMAIL (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.TIN_CHANDELIER">TIN_CHANDELIER (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.TIN_GREAVES">TIN_GREAVES (lihzahrd.chests.ItemType attribute)</a>
|
||||
</li>
|
||||
<li><a href="chests.html#lihzahrd.chests.ItemType.TIN_HAMMER">TIN_HAMMER (lihzahrd.chests.ItemType attribute)</a>
|
||||
|
|
|
@ -33,10 +33,11 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.npcs" href="npcs.html" />
|
||||
<link rel="prev" title="lihzahrd.fileutils" href="fileutils.html" />
|
||||
<link rel="prev" title="lihzahrd.chests" href="chests.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.header</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.header</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.header</li>
|
||||
|
||||
|
||||
|
@ -893,6 +900,11 @@
|
|||
<code class="sig-name descname">_version_ids</code><em class="property"> = {71: '1.2.0.3.1', 77: '1.2.2', 104: '1.2.3', 140: '1.3.0.1', 151: '1.3.0.4', 153: '1.3.0.5', 154: '1.3.0.6', 155: '1.3.0.7', 156: '1.3.0.8', 170: '1.3.2', 174: '1.3.3', 178: '1.3.4', 194: '1.3.5.3'}</em><a class="headerlink" href="#lihzahrd.header.Version._version_ids" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.header.Version.id">
|
||||
<code class="sig-name descname">id</code><a class="headerlink" href="#lihzahrd.header.Version.id" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="lihzahrd.header.Version.name">
|
||||
<em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#lihzahrd.header.Version.name" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -929,7 +941,7 @@
|
|||
<a href="npcs.html" class="btn btn-neutral float-right" title="lihzahrd.npcs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="fileutils.html" class="btn btn-neutral float-left" title="lihzahrd.fileutils" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="chests.html" class="btn btn-neutral float-left" title="lihzahrd.chests" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -33,9 +33,10 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.chests" href="chests.html" />
|
||||
<link rel="next" title="Usage guide" href="usage.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -80,18 +81,8 @@
|
|||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -158,48 +149,22 @@
|
|||
|
||||
<div class="section" id="lihzahrd">
|
||||
<h1>lihzahrd<a class="headerlink" href="#lihzahrd" title="Permalink to this headline">¶</a></h1>
|
||||
<a class="reference internal image-reference" href="_images/lihzahrd.png"><img alt="A Lihzahrd from the Jungle Temple" src="_images/lihzahrd.png" style="width: 32px; height: 48px;" /></a>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">lihzahrd</span></code> is a Terraria 1.3.5.3 world parser in Python.</p>
|
||||
<p>You can use this package to get programmer-friendly data from a Terraria world!</p>
|
||||
<div class="section" id="documentation-pages">
|
||||
<h2>Documentation pages<a class="headerlink" href="#documentation-pages" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Find out more on how to use <code class="docutils literal notranslate"><span class="pre">lihzahrd</span></code> in these pages:</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="some-useful-links">
|
||||
<h2>Some useful links<a class="headerlink" href="#some-useful-links" title="Permalink to this headline">¶</a></h2>
|
||||
</div>
|
||||
<div class="section" id="some-more-links">
|
||||
<h2>Some more links<a class="headerlink" href="#some-more-links" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Here are some links that may be useful:</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://github.com/Steffo99/lihzahrd">Lihzahrd on GitHub</a></p></li>
|
||||
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
|
||||
|
@ -215,7 +180,7 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="chests.html" class="btn btn-neutral float-right" title="lihzahrd.chests" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="usage.html" class="btn btn-neutral float-right" title="Usage guide" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.pressureplates" href="pressureplates.html" />
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.npcs</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.npcs</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.npcs</li>
|
||||
|
||||
|
||||
|
|
Binary file not shown.
|
@ -33,6 +33,7 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.signs" href="signs.html" />
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.pressureplates</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.pressureplates</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.pressureplates</li>
|
||||
|
||||
|
||||
|
@ -166,42 +173,12 @@
|
|||
<span class="target" id="module-lihzahrd.pressureplates"></span><dl class="class">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.pressureplates.</code><code class="sig-name descname">WeighedPressurePlate</code><span class="sig-paren">(</span><em class="sig-param">position: lihzahrd.fileutils.coordinates.Coordinates</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A single pressure plate placed in the world.</p>
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate.i">
|
||||
<code class="sig-name descname">i</code><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate.i" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate.n">
|
||||
<code class="sig-name descname">n</code><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate.n" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate.o">
|
||||
<code class="sig-name descname">o</code><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate.o" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate.p">
|
||||
<code class="sig-name descname">p</code><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate.p" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dd><p>A single <a class="reference external" href="https://terraria.gamepedia.com/Pressure_Plates">Weighed Pressure Plate</a> placed in the world.</p>
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate.position">
|
||||
<code class="sig-name descname">position</code><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate.position" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate.s">
|
||||
<code class="sig-name descname">s</code><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate.s" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.pressureplates.WeighedPressurePlate.t">
|
||||
<code class="sig-name descname">t</code><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate.t" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
||||
|
@ -82,18 +83,8 @@
|
|||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
260
docs/html/reference.html
Normal file
260
docs/html/reference.html
Normal file
|
@ -0,0 +1,260 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>API Reference — lihzahrd documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/language_data.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.World" href="world.html" />
|
||||
<link rel="prev" title="Usage guide" href="usage.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home"> lihzahrd
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">API Reference</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">lihzahrd</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li>API Reference</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="_sources/reference.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="api-reference">
|
||||
<h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Here are the pages autogenerated from the docstrings inside the Python library code.</p>
|
||||
<p>Type annotations are missing for some reason, maybe <code class="docutils literal notranslate"><span class="pre">autodoc</span></code> doesn’t support them yet?</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="world.html" class="btn btn-neutral float-right" title="lihzahrd.World" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="usage.html" class="btn btn-neutral float-left" title="Usage guide" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2019, Stefano Pigozzi
|
||||
|
||||
</p>
|
||||
</div>
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="#" />
|
||||
</head>
|
||||
|
@ -80,18 +81,8 @@
|
|||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -33,6 +33,7 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.tileentities" href="tileentities.html" />
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.signs</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.signs</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.signs</li>
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.tiles" href="tiles.html" />
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.tileentities</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.tileentities</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.tileentities</li>
|
||||
|
||||
|
||||
|
@ -187,31 +194,12 @@
|
|||
<dl class="class">
|
||||
<dt id="lihzahrd.tileentities.ItemFrame">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tileentities.</code><code class="sig-name descname">ItemFrame</code><span class="sig-paren">(</span><em class="sig-param">item: lihzahrd.chests.itemstack.ItemStack</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.ItemFrame" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><dl class="attribute">
|
||||
<dt id="lihzahrd.tileentities.ItemFrame.e">
|
||||
<code class="sig-name descname">e</code><a class="headerlink" href="#lihzahrd.tileentities.ItemFrame.e" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.tileentities.ItemFrame.i">
|
||||
<code class="sig-name descname">i</code><a class="headerlink" href="#lihzahrd.tileentities.ItemFrame.i" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dd><p>Data pertaining to an <a class="reference external" href="https://terraria.gamepedia.com/Item_Frame">https://terraria.gamepedia.com/Item_Frame</a> .</p>
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.tileentities.ItemFrame.item">
|
||||
<code class="sig-name descname">item</code><a class="headerlink" href="#lihzahrd.tileentities.ItemFrame.item" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.tileentities.ItemFrame.m">
|
||||
<code class="sig-name descname">m</code><a class="headerlink" href="#lihzahrd.tileentities.ItemFrame.m" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.tileentities.ItemFrame.t">
|
||||
<code class="sig-name descname">t</code><a class="headerlink" href="#lihzahrd.tileentities.ItemFrame.t" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="class">
|
||||
|
|
|
@ -33,9 +33,10 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.timer" href="timer.html" />
|
||||
<link rel="next" title="lihzahrd.townmanager" href="townmanager.html" />
|
||||
<link rel="prev" title="lihzahrd.tileentities" href="tileentities.html" />
|
||||
</head>
|
||||
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.tiles</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.tiles</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.tiles</li>
|
||||
|
||||
|
||||
|
@ -3912,7 +3919,7 @@ the save file.</p>
|
|||
|
||||
<dl class="class">
|
||||
<dt id="lihzahrd.tiles.Tile">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tiles.</code><code class="sig-name descname">Tile</code><span class="sig-paren">(</span><em class="sig-param">block: Optional[lihzahrd.tiles.block.Block] = None</em>, <em class="sig-param">wall: Optional[lihzahrd.tiles.wall.Wall] = None</em>, <em class="sig-param">liquid: Optional[lihzahrd.tiles.liquid.Liquid] = None</em>, <em class="sig-param">wiring: Optional[lihzahrd.tiles.wiring.Wiring] = None</em>, <em class="sig-param">extra: Optional[lihzahrd.chests.chest.Chest] = None</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tiles.Tile" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tiles.</code><code class="sig-name descname">Tile</code><span class="sig-paren">(</span><em class="sig-param">block: Optional[lihzahrd.tiles.block.Block] = None</em>, <em class="sig-param">wall: Optional[lihzahrd.tiles.wall.Wall] = None</em>, <em class="sig-param">liquid: Optional[lihzahrd.tiles.liquid.Liquid] = None</em>, <em class="sig-param">wiring: Optional[lihzahrd.tiles.wiring.Wiring] = None</em>, <em class="sig-param">extra: Union[lihzahrd.chests.chest.Chest</em>, <em class="sig-param">lihzahrd.signs.sign.Sign</em>, <em class="sig-param">lihzahrd.pressureplates.weighedpressureplate.WeighedPressurePlate</em>, <em class="sig-param">lihzahrd.tileentities.tileentity.TileEntity</em>, <em class="sig-param">None] = None</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tiles.Tile" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A tile, composed by a block, a wall, a liquid and wires.</p>
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.tiles.Tile.block">
|
||||
|
@ -3922,7 +3929,8 @@ the save file.</p>
|
|||
<dl class="attribute">
|
||||
<dt id="lihzahrd.tiles.Tile.extra">
|
||||
<code class="sig-name descname">extra</code><a class="headerlink" href="#lihzahrd.tiles.Tile.extra" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>A reference to the extra data of this tile, such as Chest or Sign data.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.tiles.Tile.liquid">
|
||||
|
@ -3945,15 +3953,6 @@ the save file.</p>
|
|||
<dt id="lihzahrd.tiles.TileMatrix">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tiles.</code><code class="sig-name descname">TileMatrix</code><a class="headerlink" href="#lihzahrd.tiles.TileMatrix" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A huge matrix containing the tiles of a whole world.</p>
|
||||
<dl class="method">
|
||||
<dt id="lihzahrd.tiles.TileMatrix.__getitem__">
|
||||
<code class="sig-name descname">__getitem__</code><span class="sig-paren">(</span><em class="sig-param">item: Union[Tuple, lihzahrd.fileutils.coordinates.Coordinates]</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tiles.TileMatrix.__getitem__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get a tile at specific coordinates.</p>
|
||||
<p>(x=0, y=0) returns the top-left tile in the map.</p>
|
||||
<p>You can specify a negative coordinate to count tiles respectively from the right or from the bottom:
|
||||
(x=-1, y=-1) returns the bottom-right tile in the map.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="lihzahrd.tiles.TileMatrix.add_column">
|
||||
<code class="sig-name descname">add_column</code><span class="sig-paren">(</span><em class="sig-param">column: List[lihzahrd.tiles.tile.Tile]</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tiles.TileMatrix.add_column" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -3978,7 +3977,7 @@ the save file.</p>
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="timer.html" class="btn btn-neutral float-right" title="lihzahrd.timer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="townmanager.html" class="btn btn-neutral float-right" title="lihzahrd.townmanager" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="tileentities.html" class="btn btn-neutral float-left" title="lihzahrd.tileentities" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.townmanager" href="townmanager.html" />
|
||||
<link rel="prev" title="lihzahrd.tiles" href="tiles.html" />
|
||||
<link rel="prev" title="lihzahrd.fileutils" href="fileutils.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -81,20 +81,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.timer</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.timer</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +144,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.timer</li>
|
||||
|
||||
|
||||
|
@ -194,10 +200,8 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="townmanager.html" class="btn btn-neutral float-right" title="lihzahrd.townmanager" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="tiles.html" class="btn btn-neutral float-left" title="lihzahrd.tiles" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="fileutils.html" class="btn btn-neutral float-left" title="lihzahrd.fileutils" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -33,10 +33,11 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.World" href="world.html" />
|
||||
<link rel="prev" title="lihzahrd.timer" href="timer.html" />
|
||||
<link rel="next" title="lihzahrd.errors" href="errors.html" />
|
||||
<link rel="prev" title="lihzahrd.tiles" href="tiles.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.townmanager</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.townmanager</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="world.html">lihzahrd.World</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.townmanager</li>
|
||||
|
||||
|
||||
|
@ -166,8 +173,18 @@
|
|||
<span class="target" id="module-lihzahrd.townmanager"></span><dl class="class">
|
||||
<dt id="lihzahrd.townmanager.Room">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.townmanager.</code><code class="sig-name descname">Room</code><span class="sig-paren">(</span><em class="sig-param">npc: lihzahrd.npcs.npctype.EntityType</em>, <em class="sig-param">position: lihzahrd.fileutils.coordinates.Coordinates</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.townmanager.Room" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><dl class="attribute">
|
||||
<dt id="lihzahrd.townmanager.Room.npc">
|
||||
<code class="sig-name descname">npc</code><a class="headerlink" href="#lihzahrd.townmanager.Room.npc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.townmanager.Room.position">
|
||||
<code class="sig-name descname">position</code><a class="headerlink" href="#lihzahrd.townmanager.Room.position" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -178,10 +195,10 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="world.html" class="btn btn-neutral float-right" title="lihzahrd.World" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="errors.html" class="btn btn-neutral float-right" title="lihzahrd.errors" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="timer.html" class="btn btn-neutral float-left" title="lihzahrd.timer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="tiles.html" class="btn btn-neutral float-left" title="lihzahrd.tiles" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
327
docs/html/usage.html
Normal file
327
docs/html/usage.html
Normal file
|
@ -0,0 +1,327 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Usage guide — lihzahrd documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/language_data.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="API Reference" href="reference.html" />
|
||||
<link rel="prev" title="lihzahrd" href="index.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home"> lihzahrd
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Usage guide</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#installing">Installing</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#opening-a-world">Opening a world</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#accessing-the-world-properties">Accessing the world properties</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#accessing-the-tile-data">Accessing the tile data</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#accessing-extra-data">Accessing extra data</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#something-else">Something else</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">lihzahrd</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li>Usage guide</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="_sources/usage.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="usage-guide">
|
||||
<h1>Usage guide<a class="headerlink" href="#usage-guide" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="prerequisites">
|
||||
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To use <code class="docutils literal notranslate"><span class="pre">lihzahrd</span></code>, you need Python 3.7 or higher.</p>
|
||||
<p>That’s it! No other packages are required!</p>
|
||||
</div>
|
||||
<div class="section" id="installing">
|
||||
<h2>Installing<a class="headerlink" href="#installing" title="Permalink to this headline">¶</a></h2>
|
||||
<p>You can download (or update) the package with <code class="docutils literal notranslate"><span class="pre">pip</span></code> by entering in your terminal:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span><span class="o">.</span><span class="mi">7</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">lihzahrd</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="opening-a-world">
|
||||
<h2>Opening a world<a class="headerlink" href="#opening-a-world" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To open a Terraria world file named <code class="docutils literal notranslate"><span class="pre">terra.wld</span></code> located in the current working directory, you should import the
|
||||
<code class="xref py py-mod docutils literal notranslate"><span class="pre">lihzahrd</span></code> package and then call the <a class="reference internal" href="world.html#lihzahrd.World.create_from_file" title="lihzahrd.World.create_from_file"><code class="xref py py-meth docutils literal notranslate"><span class="pre">World.create_from_file()</span></code></a> function:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">lihzahrd</span>
|
||||
<span class="n">world</span> <span class="o">=</span> <span class="n">lihzahrd</span><span class="o">.</span><span class="n">World</span><span class="o">.</span><span class="n">create_from_file</span><span class="p">(</span><span class="s2">"terra.wld"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>It should take <strong>up to a few minutes</strong>, depending on the size of the world, and then return a
|
||||
<a class="reference internal" href="world.html#lihzahrd.World" title="lihzahrd.World"><code class="xref py py-class docutils literal notranslate"><span class="pre">World</span></code></a> object.</p>
|
||||
</div>
|
||||
<div class="section" id="accessing-the-world-properties">
|
||||
<h2>Accessing the world properties<a class="headerlink" href="#accessing-the-world-properties" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Most of the world properties are accessible directly as attributes of the <a class="reference internal" href="world.html#lihzahrd.World" title="lihzahrd.World"><code class="xref py py-class docutils literal notranslate"><span class="pre">World</span></code></a> object:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
|
||||
<span class="c1"># "Terra"</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">is_hardmode</span><span class="p">)</span>
|
||||
<span class="c1"># False</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">spawn_point</span><span class="p">)</span>
|
||||
<span class="c1"># Coordinates(2101, 246)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Some world properties may be grouped in other objects:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">bosses_defeated</span><span class="p">)</span>
|
||||
<span class="c1"># <BossesDefeated></span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">bosses_defeated</span><span class="o">.</span><span class="n">eye_of_cthulhu</span><span class="p">)</span>
|
||||
<span class="c1"># False</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can look at the <a class="reference internal" href="world.html#lihzahrd.World" title="lihzahrd.World"><code class="xref py py-class docutils literal notranslate"><span class="pre">World</span></code></a> class documentation or use an IDE that supports type annotations
|
||||
(such as <a class="reference external" href="https://www.jetbrains.com/pycharm/">PyCharm</a>) to find all available attributes.</p>
|
||||
</div>
|
||||
<div class="section" id="accessing-the-tile-data">
|
||||
<h2>Accessing the tile data<a class="headerlink" href="#accessing-the-tile-data" title="Permalink to this headline">¶</a></h2>
|
||||
<p>All <a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile" title="lihzahrd.tiles.Tile"><code class="xref py py-class docutils literal notranslate"><span class="pre">tiles.Tile</span></code></a> are stored in the <a class="reference internal" href="tiles.html#lihzahrd.tiles.TileMatrix" title="lihzahrd.tiles.TileMatrix"><code class="xref py py-class docutils literal notranslate"><span class="pre">tiles.TileMatrix</span></code></a> accessible at the <a class="reference internal" href="world.html#lihzahrd.World.tiles" title="lihzahrd.World.tiles"><code class="xref py py-attr docutils literal notranslate"><span class="pre">World.tiles</span></code></a>
|
||||
attribute.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">tiles</span><span class="p">)</span>
|
||||
<span class="c1"># <TileMatrix 4200x1200></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can access them by using the <code class="docutils literal notranslate"><span class="pre">tiles</span></code> attribute as a two-dimensional array, where (0, 0) is the top-left block:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">tiles</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span>
|
||||
<span class="c1"># <Tile ></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can also use <a class="reference internal" href="fileutils.html#lihzahrd.fileutils.Coordinates" title="lihzahrd.fileutils.Coordinates"><code class="xref py py-class docutils literal notranslate"><span class="pre">fileutils.Coordinates</span></code></a> instead of a <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#tuple" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> to fetch a specific tile:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">tiles</span><span class="p">[</span><span class="n">lihzahrd</span><span class="o">.</span><span class="n">fileutils</span><span class="o">.</span><span class="n">Coordinates</span><span class="p">(</span><span class="mi">2000</span><span class="p">,</span> <span class="mi">1000</span><span class="p">)])</span>
|
||||
<span class="c1"># <Tile B></span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">tiles</span><span class="p">[</span><span class="n">world</span><span class="o">.</span><span class="n">spawn_point</span><span class="p">])</span>
|
||||
<span class="c1"># <Tile B></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Counting tiles from the bottom-right is possible too:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">tiles</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">])</span>
|
||||
<span class="c1"># <Tile ></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A single <a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile" title="lihzahrd.tiles.Tile"><code class="xref py py-class docutils literal notranslate"><span class="pre">tiles.Tile</span></code></a> has five attributes that you can access:</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile.block" title="lihzahrd.tiles.Tile.block"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tiles.Tile.block</span></code></a>, the foreground <a class="reference internal" href="tiles.html#lihzahrd.tiles.Block" title="lihzahrd.tiles.Block"><code class="xref py py-class docutils literal notranslate"><span class="pre">tiles.Block</span></code></a>;</p></li>
|
||||
<li><p><a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile.wall" title="lihzahrd.tiles.Tile.wall"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tiles.Tile.wall</span></code></a>, the background <a class="reference internal" href="tiles.html#lihzahrd.tiles.Wall" title="lihzahrd.tiles.Wall"><code class="xref py py-class docutils literal notranslate"><span class="pre">tiles.Wall</span></code></a>;</p></li>
|
||||
<li><p><a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile.liquid" title="lihzahrd.tiles.Tile.liquid"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tiles.Tile.liquid</span></code></a>, the <a class="reference internal" href="tiles.html#lihzahrd.tiles.Liquid" title="lihzahrd.tiles.Liquid"><code class="xref py py-class docutils literal notranslate"><span class="pre">tiles.Liquid</span></code></a> present in that tile;</p></li>
|
||||
<li><p><a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile.wiring" title="lihzahrd.tiles.Tile.wiring"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tiles.Tile.wiring</span></code></a>, the colored wires and actuators (<a class="reference internal" href="tiles.html#lihzahrd.tiles.Wiring" title="lihzahrd.tiles.Wiring"><code class="xref py py-class docutils literal notranslate"><span class="pre">tiles.Wiring</span></code></a>);</p></li>
|
||||
<li><p><a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile.extra" title="lihzahrd.tiles.Tile.extra"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tiles.Tile.extra</span></code></a>, additional data about the block present at that tile, such as the contents of a chest.</p></li>
|
||||
</ul>
|
||||
<p>All of these attributes may be <code class="xref py py-const docutils literal notranslate"><span class="pre">None</span></code> if the property isn’t applicable for the tile:
|
||||
for example, <a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile.block" title="lihzahrd.tiles.Tile.block"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tiles.Tile.block</span></code></a> is <code class="xref py py-const docutils literal notranslate"><span class="pre">None</span></code> if there is no block (“air”) placed there.</p>
|
||||
</div>
|
||||
<div class="section" id="accessing-extra-data">
|
||||
<h2>Accessing extra data<a class="headerlink" href="#accessing-extra-data" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Extra data, such as the content of chests or the text of signs, may be accessed in two different ways:</p>
|
||||
<ul>
|
||||
<li><p>Through the <a class="reference internal" href="tiles.html#lihzahrd.tiles.Tile.extra" title="lihzahrd.tiles.Tile.extra"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tiles.Tile.extra</span></code></a> attribute:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">tiles</span><span class="p">[</span><span class="mi">2893</span><span class="p">,</span> <span class="mi">1074</span><span class="p">]</span><span class="o">.</span><span class="n">extra</span><span class="p">)</span>
|
||||
<span class="c1"># <Chest '' at 2893, 1074></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p>Through the various lists available in the <a class="reference internal" href="world.html#lihzahrd.World" title="lihzahrd.World"><code class="xref py py-class docutils literal notranslate"><span class="pre">World</span></code></a> class, such as <a class="reference internal" href="world.html#lihzahrd.World.chests" title="lihzahrd.World.chests"><code class="xref py py-attr docutils literal notranslate"><span class="pre">World.chests</span></code></a>:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">chests</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
|
||||
<span class="c1"># <Chest '' at 2893, 1074></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Both ways return the same object, but one may be faster than the other, depending on your use case:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">world</span><span class="o">.</span><span class="n">tiles</span><span class="p">[</span><span class="mi">2893</span><span class="p">,</span> <span class="mi">1074</span><span class="p">]</span><span class="o">.</span><span class="n">extra</span> <span class="ow">is</span> <span class="n">world</span><span class="o">.</span><span class="n">chests</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
|
||||
<span class="c1"># True</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="something-else">
|
||||
<h2>Something else<a class="headerlink" href="#something-else" title="Permalink to this headline">¶</a></h2>
|
||||
<p>All information included in a Terraria savefile is parsed in this package and made available in the <a class="reference internal" href="world.html#lihzahrd.World" title="lihzahrd.World"><code class="xref py py-class docutils literal notranslate"><span class="pre">World</span></code></a>
|
||||
object.</p>
|
||||
<p>If you couldn’t find what you needed in this short usage guide, check the API Reference or have a look at the
|
||||
<a class="reference external" href="https://github.com/Steffo99/lihzahrd/tree/master/lihzahrd">source code</a> !</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="reference.html" class="btn btn-neutral float-right" title="API Reference" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="index.html" class="btn btn-neutral float-left" title="lihzahrd" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2019, Stefano Pigozzi
|
||||
|
||||
</p>
|
||||
</div>
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -33,10 +33,11 @@
|
|||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/lihzahrd.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="lihzahrd.errors" href="errors.html" />
|
||||
<link rel="prev" title="lihzahrd.townmanager" href="townmanager.html" />
|
||||
<link rel="next" title="lihzahrd.chests" href="chests.html" />
|
||||
<link rel="prev" title="API Reference" href="reference.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -81,20 +82,24 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">lihzahrd.World</a><ul class="simple">
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage guide</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">API Reference</a><ul class="current">
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">lihzahrd.World</a><ul class="simple">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="chests.html">lihzahrd.chests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="header.html">lihzahrd.header</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="npcs.html">lihzahrd.npcs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="pressureplates.html">lihzahrd.pressureplates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="signs.html">lihzahrd.signs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tileentities.html">lihzahrd.tileentities</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="tiles.html">lihzahrd.tiles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="townmanager.html">lihzahrd.townmanager</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="fileutils.html">lihzahrd.fileutils</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="timer.html">lihzahrd.timer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="errors.html">lihzahrd.errors</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -140,6 +145,8 @@
|
|||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="reference.html">API Reference</a> »</li>
|
||||
|
||||
<li>lihzahrd.World</li>
|
||||
|
||||
|
||||
|
@ -167,11 +174,6 @@
|
|||
<dt id="lihzahrd.World">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.</code><code class="sig-name descname">World</code><span class="sig-paren">(</span><em class="sig-param">version: lihzahrd.header.version.Version, savefile_type: int, revision: int, is_favorite: bool, name: str, generator: lihzahrd.header.generatorinfo.GeneratorInfo, uuid_: uuid.UUID, id_: int, bounds: lihzahrd.fileutils.rect.Rect, size: lihzahrd.fileutils.coordinates.Coordinates, is_expert: bool, created_on, styles: lihzahrd.header.styles.Styles, backgrounds: lihzahrd.header.backgrounds.Backgrounds, spawn_point: lihzahrd.fileutils.coordinates.Coordinates, underground_level: float, cavern_level: float, time: lihzahrd.header.time.Time, events: lihzahrd.header.events.Events, dungeon_point: lihzahrd.fileutils.coordinates.Coordinates, world_evil: lihzahrd.header.worldeviltype.WorldEvilType, saved_npcs: lihzahrd.header.savednpcs.SavedNPCs, altars_smashed: lihzahrd.header.altarssmashed.AltarsSmashed, is_hardmode: bool, shadow_orbs: lihzahrd.header.shadoworbs.ShadowOrbs, bosses_defeated: lihzahrd.header.bossesdefeated.BossesDefeated, anglers_quest: lihzahrd.header.anglerquest.AnglerQuest, clouds: lihzahrd.header.clouds.Clouds, cultist_delay: int, tiles: lihzahrd.tiles.tilematrix.TileMatrix, chests: List[lihzahrd.chests.chest.Chest], signs: List[lihzahrd.signs.sign.Sign], npcs: List[lihzahrd.npcs.npc.NPC], mobs: List[lihzahrd.npcs.mob.Mob], tile_entities: List[lihzahrd.tileentities.tileentity.TileEntity], weighed_pressure_plates: List[lihzahrd.pressureplates.weighedpressureplate.WeighedPressurePlate], rooms: List[lihzahrd.townmanager.room.Room], unknown_file_format_data: bytes = b'', unknown_world_header_data: bytes = b'', unknown_world_tiles_data: bytes = b'', unknown_chests_data: bytes = b'', unknown_signs_data: bytes = b'', unknown_npcs_data: bytes = b'', unknown_tile_entities_data: bytes = b'', unknown_pressure_plates_data: bytes = b'', unknown_town_manager_data: bytes = b''</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.World" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The Python representation of a Terraria world.</p>
|
||||
<dl class="method">
|
||||
<dt id="lihzahrd.World._read_tile_block">
|
||||
<em class="property">static </em><code class="sig-name descname">_read_tile_block</code><span class="sig-paren">(</span><em class="sig-param">fr: lihzahrd.fileutils.filereader.FileReader</em>, <em class="sig-param">tileframeimportant</em><span class="sig-paren">)</span> → List<a class="headerlink" href="#lihzahrd.World._read_tile_block" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.World.altars_smashed">
|
||||
<code class="sig-name descname">altars_smashed</code><em class="property"> = None</em><a class="headerlink" href="#lihzahrd.World.altars_smashed" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -216,8 +218,17 @@
|
|||
|
||||
<dl class="method">
|
||||
<dt id="lihzahrd.World.create_from_file">
|
||||
<em class="property">classmethod </em><code class="sig-name descname">create_from_file</code><span class="sig-paren">(</span><em class="sig-param">file</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.World.create_from_file" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property">classmethod </em><code class="sig-name descname">create_from_file</code><span class="sig-paren">(</span><em class="sig-param">filename: str</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.World.create_from_file" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Create a World object from a .wld file.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>Parsing an entire world may take up to a few minutes and quite a bit of memory!</p>
|
||||
</div>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>filename</strong> – The name of the file that should be parsed.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
|
@ -229,7 +240,8 @@
|
|||
<dl class="method">
|
||||
<dt id="lihzahrd.World.crimson_hearts">
|
||||
<em class="property">property </em><code class="sig-name descname">crimson_hearts</code><a class="headerlink" href="#lihzahrd.World.crimson_hearts" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Information related to the Shadow Orbs or Crimson Hearts in the world.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="attribute">
|
||||
<dt id="lihzahrd.World.dungeon_point">
|
||||
|
@ -399,10 +411,10 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="errors.html" class="btn btn-neutral float-right" title="lihzahrd.errors" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="chests.html" class="btn btn-neutral float-right" title="lihzahrd.chests" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="townmanager.html" class="btn btn-neutral float-left" title="lihzahrd.townmanager" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="reference.html" class="btn btn-neutral float-left" title="API Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
3
docs_source/_static/lihzahrd.css
Normal file
3
docs_source/_static/lihzahrd.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
.wy-side-nav-search {
|
||||
background-color:#7FA23E !important;
|
||||
}
|
|
@ -26,7 +26,7 @@ author = 'Stefano Pigozzi'
|
|||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.intersphinx"]
|
||||
extensions = ["sphinx.ext.napoleon", "sphinx.ext.intersphinx"]
|
||||
|
||||
intersphinx_mapping = {"python": ("https://docs.python.org/3.7", None)}
|
||||
napoleon_use_param = True
|
||||
|
@ -39,7 +39,7 @@ def skip(app, what, name: str, obj, would_skip, options):
|
|||
|
||||
|
||||
def setup(app):
|
||||
app.connect("autodoc-skip-member", skip)
|
||||
app.add_stylesheet('lihzahrd.css')
|
||||
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
|
|
|
@ -1,25 +1,31 @@
|
|||
lihzahrd
|
||||
====================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
.. image:: lihzahrd.png
|
||||
:width: 32px
|
||||
:height: 48px
|
||||
:alt: A Lihzahrd from the Jungle Temple
|
||||
|
||||
chests
|
||||
fileutils
|
||||
header
|
||||
npcs
|
||||
pressureplates
|
||||
signs
|
||||
tileentities
|
||||
tiles
|
||||
timer
|
||||
townmanager
|
||||
world
|
||||
errors
|
||||
``lihzahrd`` is a Terraria 1.3.5.3 world parser in Python.
|
||||
|
||||
You can use this package to get programmer-friendly data from a Terraria world!
|
||||
|
||||
Some useful links
|
||||
Documentation pages
|
||||
------------------------------------
|
||||
|
||||
Find out more on how to use ``lihzahrd`` in these pages:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
usage
|
||||
reference
|
||||
|
||||
|
||||
Some more links
|
||||
------------------------------------
|
||||
|
||||
Here are some links that may be useful:
|
||||
|
||||
* `Lihzahrd on GitHub <https://github.com/Steffo99/lihzahrd>`_
|
||||
* :ref:`genindex`
|
||||
* :ref:`genindex`
|
||||
|
|
BIN
docs_source/lihzahrd.png
Normal file
BIN
docs_source/lihzahrd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 853 B |
|
@ -8,7 +8,7 @@ if "%SPHINXBUILD%" == "" (
|
|||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=.
|
||||
set BUILDDIR=../docs
|
||||
set BUILDDIR=..\docs
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
|
@ -25,6 +25,9 @@ if errorlevel 9009 (
|
|||
exit /b 1
|
||||
)
|
||||
|
||||
del /f /q /s ..\docs\html\*.*
|
||||
del /f /q /s ..\docs\doctrees\*.*
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
||||
goto end
|
||||
|
||||
|
|
22
docs_source/reference.rst
Normal file
22
docs_source/reference.rst
Normal file
|
@ -0,0 +1,22 @@
|
|||
API Reference
|
||||
====================================
|
||||
|
||||
Here are the pages autogenerated from the docstrings inside the Python library code.
|
||||
|
||||
Type annotations are missing for some reason, maybe ``autodoc`` doesn't support them yet?
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
world
|
||||
chests
|
||||
header
|
||||
npcs
|
||||
pressureplates
|
||||
signs
|
||||
tileentities
|
||||
tiles
|
||||
townmanager
|
||||
errors
|
||||
fileutils
|
||||
timer
|
122
docs_source/usage.rst
Normal file
122
docs_source/usage.rst
Normal file
|
@ -0,0 +1,122 @@
|
|||
.. currentmodule:: lihzahrd
|
||||
|
||||
Usage guide
|
||||
====================================
|
||||
|
||||
Prerequisites
|
||||
------------------------------------
|
||||
|
||||
To use ``lihzahrd``, you need Python 3.7 or higher.
|
||||
|
||||
That's it! No other packages are required!
|
||||
|
||||
Installing
|
||||
------------------------------------
|
||||
|
||||
You can download (or update) the package with ``pip`` by entering in your terminal: ::
|
||||
|
||||
python3.7 -m pip install --upgrade lihzahrd
|
||||
|
||||
Opening a world
|
||||
------------------------------------
|
||||
|
||||
To open a Terraria world file named ``terra.wld`` located in the current working directory, you should import the
|
||||
:py:mod:`lihzahrd` package and then call the :py:meth:`World.create_from_file` function: ::
|
||||
|
||||
import lihzahrd
|
||||
world = lihzahrd.World.create_from_file("terra.wld")
|
||||
|
||||
It should take **a few minutes**, depending on the size of the world, and then return a
|
||||
:py:class:`World` object.
|
||||
|
||||
Accessing the world properties
|
||||
------------------------------------
|
||||
|
||||
Most of the world properties are accessible directly as attributes of the :py:class:`World` object: ::
|
||||
|
||||
print(world.name)
|
||||
# "Terra"
|
||||
|
||||
print(world.is_hardmode)
|
||||
# False
|
||||
|
||||
print(world.spawn_point)
|
||||
# Coordinates(2101, 246)
|
||||
|
||||
Some world properties may be grouped in other objects: ::
|
||||
|
||||
print(world.bosses_defeated)
|
||||
# <BossesDefeated>
|
||||
|
||||
print(world.bosses_defeated.eye_of_cthulhu)
|
||||
# False
|
||||
|
||||
You can look at the :py:class:`World` class documentation or use an IDE that supports type annotations
|
||||
(such as `PyCharm <https://www.jetbrains.com/pycharm/>`_) to find all available attributes.
|
||||
|
||||
Accessing the tile data
|
||||
------------------------------------
|
||||
|
||||
All :py:class:`tiles.Tile` are stored in the :py:class:`tiles.TileMatrix` accessible at the :py:attr:`World.tiles`
|
||||
attribute. ::
|
||||
|
||||
print(world.tiles)
|
||||
# <TileMatrix 4200x1200>
|
||||
|
||||
You can access them by using the ``tiles`` attribute as a two-dimensional array, where (0, 0) is the top-left block: ::
|
||||
|
||||
print(world.tiles[0, 0])
|
||||
# <Tile >
|
||||
|
||||
You can also use :py:class:`fileutils.Coordinates` instead of a :py:class:`tuple` to fetch a specific tile: ::
|
||||
|
||||
print(world.tiles[lihzahrd.fileutils.Coordinates(2000, 1000)])
|
||||
# <Tile B>
|
||||
|
||||
print(world.tiles[world.spawn_point])
|
||||
# <Tile B>
|
||||
|
||||
Counting tiles from the bottom-right is possible too: ::
|
||||
|
||||
print(world.tiles[-1, -1])
|
||||
# <Tile >
|
||||
|
||||
A single :py:class:`tiles.Tile` has five attributes that you can access:
|
||||
|
||||
* :py:attr:`tiles.Tile.block`, the foreground :py:class:`tiles.Block`;
|
||||
* :py:attr:`tiles.Tile.wall`, the background :py:class:`tiles.Wall`;
|
||||
* :py:attr:`tiles.Tile.liquid`, the :py:class:`tiles.Liquid` present in that tile;
|
||||
* :py:attr:`tiles.Tile.wiring`, the colored wires and actuators (:py:class:`tiles.Wiring`);
|
||||
* :py:attr:`tiles.Tile.extra`, additional data about the block present at that tile, such as the contents of a chest.
|
||||
|
||||
All of these attributes may be :py:const:`None` if the property isn't applicable for the tile:
|
||||
for example, :py:attr:`tiles.Tile.block` is :py:const:`None` if there is no block ("air") placed there.
|
||||
|
||||
Accessing extra data
|
||||
------------------------------------
|
||||
|
||||
Extra data, such as the content of chests or the text of signs, may be accessed in two different ways:
|
||||
|
||||
* Through the :py:attr:`tiles.Tile.extra` attribute: ::
|
||||
|
||||
print(world.tiles[2893, 1074].extra)
|
||||
# <Chest '' at 2893, 1074>
|
||||
|
||||
* Through the various lists available in the :py:class:`World` class, such as :py:attr:`World.chests`: ::
|
||||
|
||||
print(world.chests[0])
|
||||
# <Chest '' at 2893, 1074>
|
||||
|
||||
Both ways return the same object, but one may be faster than the other, depending on your use case: ::
|
||||
|
||||
print(world.tiles[2893, 1074].extra is world.chests[0])
|
||||
# True
|
||||
|
||||
Something else
|
||||
------------------------------------
|
||||
|
||||
All information included in a Terraria savefile is parsed in this package and made available in the :py:class:`World`
|
||||
object.
|
||||
|
||||
If you couldn't find what you needed in this short usage guide, check the API Reference or have a look at the
|
||||
`source code <https://github.com/Steffo99/lihzahrd/tree/master/lihzahrd>`_ !
|
|
@ -7,5 +7,4 @@ lihzahrd.World
|
|||
|
||||
.. autoclass:: lihzahrd.World
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from .world import World
|
||||
from . import chests, fileutils, header, npcs, pressureplates, signs, tileentities, tiles, townmanager
|
||||
|
||||
__all__ = ["World"]
|
||||
__all__ = ["World", "chests", "fileutils", "header", "npcs", "pressureplates", "signs", "tileentities", "tiles",
|
||||
"townmanager"]
|
||||
|
|
|
@ -57,4 +57,4 @@ class BossesDefeated:
|
|||
self.old_ones_army: OldOnesArmyTiers = old_ones_army
|
||||
|
||||
def __repr__(self):
|
||||
return f"<WorldBossesDefeated>"
|
||||
return f"<BossesDefeated>"
|
||||
|
|
|
@ -4,6 +4,8 @@ import typing
|
|||
class Version:
|
||||
"""A Terraria version."""
|
||||
|
||||
__slots__ = ("id", )
|
||||
|
||||
_version_ids = {
|
||||
71: "1.2.0.3.1",
|
||||
77: "1.2.2",
|
||||
|
|
|
@ -2,9 +2,9 @@ from ..fileutils import Coordinates
|
|||
|
||||
|
||||
class WeighedPressurePlate:
|
||||
"""A single pressure plate placed in the world."""
|
||||
"""A single `Weighed Pressure Plate <https://terraria.gamepedia.com/Pressure_Plates>`_ placed in the world."""
|
||||
|
||||
__slots__ = "position"
|
||||
__slots__ = ("position", )
|
||||
|
||||
def __init__(self, position: Coordinates):
|
||||
self.position: Coordinates = position
|
||||
|
|
|
@ -4,7 +4,7 @@ from ..chests import ItemStack
|
|||
class ItemFrame:
|
||||
"""Data pertaining to an https://terraria.gamepedia.com/Item_Frame ."""
|
||||
|
||||
__slots__ = "item"
|
||||
__slots__ = ("item", )
|
||||
|
||||
def __init__(self, item: ItemStack):
|
||||
self.item: ItemStack = item
|
||||
|
|
|
@ -4,6 +4,9 @@ from .wall import Wall
|
|||
from .liquid import Liquid
|
||||
from .wiring import Wiring
|
||||
from ..chests import Chest
|
||||
from ..signs import Sign
|
||||
from ..pressureplates import WeighedPressurePlate
|
||||
from ..tileentities import TileEntity
|
||||
|
||||
|
||||
class Tile:
|
||||
|
@ -16,7 +19,7 @@ class Tile:
|
|||
wall: typing.Optional[Wall] = None,
|
||||
liquid: typing.Optional[Liquid] = None,
|
||||
wiring: typing.Optional[Wiring] = None,
|
||||
extra: typing.Optional[typing.Union[Chest]] = None):
|
||||
extra: typing.Optional[typing.Union[Chest, Sign, WeighedPressurePlate, TileEntity]] = None):
|
||||
if wiring is None:
|
||||
wiring = Wiring()
|
||||
|
||||
|
@ -24,7 +27,9 @@ class Tile:
|
|||
self.wall: typing.Optional[Wall] = wall
|
||||
self.liquid: typing.Optional[Liquid] = liquid
|
||||
self.wiring: typing.Optional[Wiring] = wiring
|
||||
self.extra: typing.Optional[typing.Union[Chest]] = extra
|
||||
|
||||
self.extra: typing.Optional[typing.Union[Chest, Sign, WeighedPressurePlate, TileEntity]] = extra
|
||||
"""A reference to the extra data of this tile, such as Chest or Sign data."""
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Tile {'B' if self.block else '_'}{'W' if self.wall else '_'}{'L' if self.liquid else '_'}{'W' if self.wiring else '_'}{'E' if self.extra else '_'}>"
|
||||
return f"<Tile {'B' if self.block else ''}{'W' if self.wall else ''}{'L' if self.liquid else ''}{'W' if self.wiring else ''}{'E' if self.extra else ''}>"
|
||||
|
|
|
@ -3,6 +3,8 @@ from ..npcs import EntityType
|
|||
|
||||
|
||||
class Room:
|
||||
__slots__ = "npc", "position"
|
||||
|
||||
def __init__(self, npc: EntityType, position: Coordinates):
|
||||
self.npc: EntityType = npc
|
||||
self.position: Coordinates = position
|
||||
|
|
|
@ -185,6 +185,7 @@ class World:
|
|||
|
||||
@property
|
||||
def crimson_hearts(self) -> ShadowOrbs:
|
||||
"""Information related to the Shadow Orbs or Crimson Hearts in the world."""
|
||||
return self.shadow_orbs
|
||||
|
||||
@crimson_hearts.setter
|
||||
|
@ -263,405 +264,421 @@ class World:
|
|||
return [tile] * multiply_by
|
||||
|
||||
@classmethod
|
||||
def create_from_file(cls, file):
|
||||
"""Create a World object from a .wld file."""
|
||||
def create_from_file(cls, filename: str):
|
||||
"""Create a World object from a .wld file.
|
||||
|
||||
Warning:
|
||||
Parsing an entire world may take up to a few minutes and quite a bit of memory!
|
||||
|
||||
Arguments:
|
||||
filename: The name of the file that should be parsed."""
|
||||
# This code is a mess.
|
||||
|
||||
file = open(filename, "rb")
|
||||
f = FileReader(file)
|
||||
|
||||
with Timer("File Format", display=True):
|
||||
version = Version(f.int4())
|
||||
relogic = f.string(7)
|
||||
savefile_type = f.uint1()
|
||||
if version != Version("1.3.5.3") or relogic != "relogic" or savefile_type != 2:
|
||||
raise NotImplementedError("This parser can only read Terraria 1.3.5.3 save files.")
|
||||
|
||||
revision = f.uint4()
|
||||
is_favorite = f.uint8() != 0
|
||||
|
||||
# Pointers and tileframeimportant
|
||||
pointers = Pointers(*[f.int4() for _ in range(f.int2())])
|
||||
tileframeimportant_size = math.ceil(f.int2() / 8)
|
||||
tileframeimportant = []
|
||||
for _ in range(tileframeimportant_size):
|
||||
current_bit = f.bits()
|
||||
tileframeimportant = [*tileframeimportant, *current_bit]
|
||||
|
||||
unknown_file_format_data = f.read_until(pointers.world_header)
|
||||
|
||||
with Timer("World Header", display=True):
|
||||
name = f.string()
|
||||
|
||||
generator = GeneratorInfo(f.string(), f.uint8())
|
||||
|
||||
uuid_ = f.uuid()
|
||||
id_ = f.int4()
|
||||
bounds = f.rect()
|
||||
world_size = Coordinates(y=f.int4(), x=f.int4())
|
||||
is_expert = f.bool()
|
||||
created_on = f.datetime()
|
||||
|
||||
world_styles = Styles(moon=MoonStyle(f.uint1()),
|
||||
trees=FourPartSplit(separators=[f.int4(), f.int4(), f.int4()],
|
||||
properties=[f.int4(),
|
||||
f.int4(),
|
||||
f.int4(),
|
||||
f.int4()]),
|
||||
moss=FourPartSplit(separators=[f.int4(), f.int4(), f.int4()],
|
||||
properties=[f.int4(),
|
||||
f.int4(),
|
||||
f.int4(),
|
||||
f.int4()]))
|
||||
|
||||
bg_underground_snow = f.int4()
|
||||
bg_underground_jungle = f.int4()
|
||||
bg_hell = f.int4()
|
||||
|
||||
spawn_point = Coordinates(f.int4(), f.int4())
|
||||
underground_level = f.double()
|
||||
cavern_level = f.double()
|
||||
|
||||
current_time = f.double()
|
||||
is_daytime = f.bool()
|
||||
moon_phase = MoonPhase(f.uint4())
|
||||
|
||||
blood_moon = f.bool()
|
||||
eclipse = f.bool()
|
||||
|
||||
dungeon_point = Coordinates(f.int4(), f.int4())
|
||||
world_evil = WorldEvilType(f.bool())
|
||||
|
||||
defeated_eye_of_cthulhu = f.bool() # Possibly. I'm not sure.
|
||||
defeated_eater_of_worlds = f.bool() # Possibly. I'm not sure.
|
||||
defeated_skeletron = f.bool() # Possibly. I'm not sure.
|
||||
defeated_queen_bee = f.bool()
|
||||
defeated_the_twins = f.bool()
|
||||
defeated_the_destroyer = f.bool()
|
||||
defeated_skeletron_prime = f.bool()
|
||||
defeated_any_mechnical_boss = f.bool()
|
||||
defeated_plantera = f.bool()
|
||||
defeated_golem = f.bool()
|
||||
defeated_king_slime = f.bool()
|
||||
|
||||
saved_goblin_tinkerer = f.bool()
|
||||
saved_wizard = f.bool()
|
||||
saved_mechanic = f.bool()
|
||||
|
||||
defeated_goblin_army = f.bool()
|
||||
defeated_clown = f.bool()
|
||||
defeated_frost_moon = f.bool()
|
||||
defeated_pirates = f.bool()
|
||||
|
||||
shadow_orbs = ShadowOrbs(smashed_at_least_once=f.bool(),
|
||||
spawn_meteorite=f.bool(),
|
||||
evil_boss_counter=f.int4())
|
||||
|
||||
smashed_altars_count = f.int4()
|
||||
|
||||
is_hardmode = f.bool()
|
||||
|
||||
invasion_delay = f.int4()
|
||||
invasion_size = f.int4()
|
||||
invasion_type = InvasionType(f.int4())
|
||||
invasion_position = f.double()
|
||||
|
||||
time_left_slime_rain = f.double()
|
||||
|
||||
sundial_cooldown = f.uint1()
|
||||
|
||||
rain = Rain(is_active=f.bool(), time_left=f.int4(), max_rain=f.single())
|
||||
|
||||
hardmode_ore_1 = HardmodeTier1Ore(f.int4())
|
||||
hardmode_ore_2 = HardmodeTier2Ore(f.int4())
|
||||
hardmode_ore_3 = HardmodeTier3Ore(f.int4())
|
||||
altars_smashed = AltarsSmashed(count=smashed_altars_count,
|
||||
ore_tier1=hardmode_ore_1,
|
||||
ore_tier2=hardmode_ore_2,
|
||||
ore_tier3=hardmode_ore_3)
|
||||
|
||||
bg_forest = f.int1()
|
||||
bg_corruption = f.int1()
|
||||
bg_jungle = f.int1()
|
||||
bg_snow = f.int1()
|
||||
bg_hallow = f.int1()
|
||||
bg_crimson = f.int1()
|
||||
bg_desert = f.int1()
|
||||
bg_ocean = f.int1()
|
||||
|
||||
backgrounds = Backgrounds(bg_underground_snow=bg_underground_snow,
|
||||
bg_underground_jungle=bg_underground_jungle,
|
||||
bg_hell=bg_hell,
|
||||
bg_forest=bg_forest,
|
||||
bg_corruption=bg_corruption,
|
||||
bg_jungle=bg_jungle,
|
||||
bg_snow=bg_snow,
|
||||
bg_hallow=bg_hallow,
|
||||
bg_crimson=bg_crimson,
|
||||
bg_desert=bg_desert,
|
||||
bg_ocean=bg_ocean)
|
||||
|
||||
clouds = Clouds(bg_cloud=f.int4(), cloud_number=f.int2(), wind_speed=f.single())
|
||||
|
||||
angler_today_quest_completed_by_count = f.uint1()
|
||||
angler_today_quest_completed_by = []
|
||||
for _ in range(angler_today_quest_completed_by_count):
|
||||
angler_today_quest_completed_by.append(f.string())
|
||||
|
||||
saved_angler = f.bool()
|
||||
|
||||
angler_today_quest_target = AnglerQuestFish(f.int4())
|
||||
anglers_quest = AnglerQuest(current_goal=angler_today_quest_target,
|
||||
completed_by=angler_today_quest_completed_by)
|
||||
|
||||
saved_stylist = f.bool()
|
||||
saved_tax_collector = f.bool()
|
||||
|
||||
invasion_size_start = f.int4() # ???
|
||||
invasion = Invasion(delay=invasion_delay,
|
||||
size=invasion_size,
|
||||
type_=invasion_type,
|
||||
position=invasion_position,
|
||||
size_start=invasion_size_start)
|
||||
|
||||
cultist_delay = f.int4() # ???
|
||||
mob_types_count = f.int2()
|
||||
mob_kills = {}
|
||||
for mob_id in range(mob_types_count):
|
||||
mob_kills[mob_id] = f.int4()
|
||||
|
||||
fast_forward_time = f.bool()
|
||||
time = Time(current=current_time,
|
||||
is_daytime=is_daytime,
|
||||
moon_phase=moon_phase,
|
||||
sundial_cooldown=sundial_cooldown,
|
||||
fast_forward_time=fast_forward_time)
|
||||
|
||||
defeated_duke_fishron = f.bool()
|
||||
defeated_moon_lord = f.bool()
|
||||
defeated_pumpking = f.bool()
|
||||
defeated_mourning_wood = f.bool()
|
||||
defeated_ice_queen = f.bool()
|
||||
defeated_santa_nk1 = f.bool()
|
||||
defeated_everscream = f.bool()
|
||||
defeated_pillars = PillarsInfo(solar=f.bool(), vortex=f.bool(), nebula=f.bool(), stardust=f.bool())
|
||||
|
||||
lunar_events = LunarEvents(pillars_present=PillarsInfo(solar=f.bool(),
|
||||
vortex=f.bool(),
|
||||
nebula=f.bool(),
|
||||
stardust=f.bool()),
|
||||
are_active=f.bool())
|
||||
|
||||
party_center_active = f.bool()
|
||||
party_natural_active = f.bool()
|
||||
party_cooldown = f.int4()
|
||||
partying_npcs_count = f.int4()
|
||||
partying_npcs = []
|
||||
for _ in range(partying_npcs_count):
|
||||
partying_npcs.append(f.int4())
|
||||
party = Party(thrown_by_party_center=party_center_active,
|
||||
thrown_by_npcs=party_natural_active,
|
||||
cooldown=party_cooldown,
|
||||
partying_npcs=partying_npcs)
|
||||
|
||||
sandstorm = Sandstorm(is_active=f.bool(),
|
||||
time_left=f.int4(),
|
||||
severity=f.single(),
|
||||
intended_severity=f.single())
|
||||
|
||||
events = Events(blood_moon=blood_moon,
|
||||
solar_eclipse=eclipse,
|
||||
invasion=invasion,
|
||||
slime_rain=time_left_slime_rain,
|
||||
rain=rain,
|
||||
party=party,
|
||||
sandstorm=sandstorm,
|
||||
lunar_events=lunar_events)
|
||||
|
||||
saved_bartender = f.bool()
|
||||
saved_npcs = SavedNPCs(goblin_tinkerer=saved_goblin_tinkerer,
|
||||
wizard=saved_wizard,
|
||||
mechanic=saved_mechanic,
|
||||
angler=saved_angler,
|
||||
stylist=saved_stylist,
|
||||
tax_collector=saved_tax_collector,
|
||||
bartender=saved_bartender)
|
||||
|
||||
old_ones_army = OldOnesArmyTiers(f.bool(), f.bool(), f.bool())
|
||||
|
||||
bosses_defeated = BossesDefeated(eye_of_cthulhu=defeated_eye_of_cthulhu,
|
||||
eater_of_worlds=defeated_eater_of_worlds,
|
||||
skeletron=defeated_skeletron,
|
||||
queen_bee=defeated_queen_bee,
|
||||
the_twins=defeated_the_twins,
|
||||
the_destroyer=defeated_the_destroyer,
|
||||
skeletron_prime=defeated_skeletron_prime,
|
||||
any_mechnical_boss=defeated_any_mechnical_boss,
|
||||
plantera=defeated_plantera,
|
||||
golem=defeated_golem,
|
||||
king_slime=defeated_king_slime,
|
||||
goblin_army=defeated_goblin_army,
|
||||
clown=defeated_clown,
|
||||
frost_moon=defeated_frost_moon,
|
||||
pirates=defeated_pirates,
|
||||
duke_fishron=defeated_duke_fishron,
|
||||
moon_lord=defeated_moon_lord,
|
||||
pumpking=defeated_pumpking,
|
||||
mourning_wood=defeated_mourning_wood,
|
||||
ice_queen=defeated_ice_queen,
|
||||
santa_nk1=defeated_santa_nk1,
|
||||
everscream=defeated_everscream,
|
||||
lunar_pillars=defeated_pillars,
|
||||
old_ones_army=old_ones_army)
|
||||
|
||||
unknown_world_header_data = f.read_until(pointers.world_tiles)
|
||||
|
||||
with Timer("World Tiles", display=True):
|
||||
tm = TileMatrix()
|
||||
while tm.size.x < world_size.x:
|
||||
column = []
|
||||
while len(column) < world_size.y:
|
||||
readtiles = cls._read_tile_block(f, tileframeimportant)
|
||||
column = [*column, *readtiles]
|
||||
tm.add_column(column)
|
||||
|
||||
unknown_world_tiles_data = f.read_until(pointers.chests)
|
||||
|
||||
with Timer("Chests", display=True):
|
||||
chests = []
|
||||
|
||||
chests_count = f.int2()
|
||||
chests_max_items = f.int2()
|
||||
|
||||
for _ in range(chests_count):
|
||||
chest_position = Coordinates(x=f.int4(), y=f.int4())
|
||||
chest_name = f.string()
|
||||
chest_contents = []
|
||||
|
||||
for _ in range(chests_max_items):
|
||||
item_quantity = f.int2()
|
||||
if item_quantity > 0:
|
||||
item_type = ItemType(f.int4())
|
||||
item_modifier = f.uint1()
|
||||
item = ItemStack(quantity=item_quantity,
|
||||
type_=item_type,
|
||||
modifier=item_modifier)
|
||||
else:
|
||||
item = None
|
||||
chest_contents.append(item)
|
||||
chest = Chest(position=chest_position,
|
||||
name=chest_name,
|
||||
contents=chest_contents)
|
||||
chests.append(chest)
|
||||
|
||||
unknown_chests_data = f.read_until(pointers.signs)
|
||||
|
||||
with Timer("Signs", display=True):
|
||||
signs = []
|
||||
|
||||
signs_count = f.int2()
|
||||
|
||||
for _ in range(signs_count):
|
||||
sign = Sign(text=f.string(),
|
||||
position=Coordinates(f.int4(), f.int4()))
|
||||
|
||||
unknown_signs_data = f.read_until(pointers.npcs)
|
||||
|
||||
with Timer("Entities", display=True):
|
||||
npcs = []
|
||||
mobs = []
|
||||
|
||||
while f.bool():
|
||||
npc_type = EntityType(f.int4())
|
||||
npc_name = f.string()
|
||||
npc_position = Coordinates(f.single(), f.single())
|
||||
is_homeless = f.bool()
|
||||
npc_home = Coordinates(f.int4(), f.int4())
|
||||
if is_homeless:
|
||||
npc_home = None
|
||||
|
||||
npc = NPC(type_=npc_type,
|
||||
name=npc_name,
|
||||
position=npc_position,
|
||||
home=npc_home)
|
||||
npcs.append(npc)
|
||||
|
||||
while f.bool():
|
||||
mob_type = EntityType(f.int4())
|
||||
mob_position = Coordinates(f.single(), f.single())
|
||||
|
||||
mob = Mob(type_=npc_type,
|
||||
position=npc_position)
|
||||
mobs.append(mob)
|
||||
|
||||
unknown_npcs_data = f.read_until(pointers.tile_entities)
|
||||
|
||||
with Timer("Tile Entities", display=True):
|
||||
tile_entities_count = f.int4()
|
||||
tile_entities = []
|
||||
|
||||
for _ in range(tile_entities_count):
|
||||
te_type = f.uint1()
|
||||
te_id = f.int4()
|
||||
te_position = Coordinates(f.int2(), f.int2())
|
||||
if te_type == 0:
|
||||
te_extra = TargetDummy(npc=f.int2())
|
||||
elif te_type == 1:
|
||||
te_extra = ItemFrame(item=ItemStack(type_=ItemType(f.int2()),
|
||||
modifier=f.uint1(),
|
||||
quantity=f.int2()))
|
||||
elif te_type == 2:
|
||||
te_extra = LogicSensor(logic_check=f.uint1(), enabled=f.bool())
|
||||
tile_entity = TileEntity(id_=te_id, position=te_position, extra=te_extra)
|
||||
tile_entities.append(tile_entity)
|
||||
|
||||
unknown_tile_entities_data = f.read_until(pointers.pressure_plates)
|
||||
|
||||
with Timer("Weighed Pressure Plates", display=True):
|
||||
weighed_pressure_plates_count = f.int4()
|
||||
weighed_pressure_plates = []
|
||||
|
||||
for _ in range(weighed_pressure_plates_count):
|
||||
wpp = WeighedPressurePlate(position=Coordinates(f.int4(), f.int4()))
|
||||
weighed_pressure_plates.append(wpp)
|
||||
|
||||
unknown_pressure_plates_data = f.read_until(pointers.town_manager)
|
||||
|
||||
with Timer("Town Manager", display=True):
|
||||
rooms_count = f.int4()
|
||||
rooms = []
|
||||
|
||||
for _ in range(rooms_count):
|
||||
room = Room(npc=EntityType(f.int4()), position=Coordinates(f.int4(), f.int4()))
|
||||
rooms.append(room)
|
||||
|
||||
unknown_town_manager_data = f.read_until(pointers.footer)
|
||||
|
||||
world = World(version=version, savefile_type=savefile_type, revision=revision, is_favorite=is_favorite,
|
||||
name=name, generator=generator, uuid_=uuid_, id_=id_, bounds=bounds, size=world_size,
|
||||
is_expert=is_expert, created_on=created_on, styles=world_styles, backgrounds=backgrounds,
|
||||
spawn_point=spawn_point, underground_level=underground_level, cavern_level=cavern_level,
|
||||
time=time, events=events, dungeon_point=dungeon_point, world_evil=world_evil,
|
||||
saved_npcs=saved_npcs, altars_smashed=altars_smashed, is_hardmode=is_hardmode,
|
||||
shadow_orbs=shadow_orbs, bosses_defeated=bosses_defeated, anglers_quest=anglers_quest,
|
||||
clouds=clouds, cultist_delay=cultist_delay, tiles=tm, chests=chests, signs=signs,
|
||||
npcs=npcs, mobs=mobs, tile_entities=tile_entities,
|
||||
weighed_pressure_plates=weighed_pressure_plates, rooms=rooms,
|
||||
unknown_file_format_data=unknown_file_format_data,
|
||||
unknown_world_header_data=unknown_world_header_data,
|
||||
unknown_world_tiles_data=unknown_world_tiles_data,
|
||||
unknown_chests_data=unknown_chests_data,
|
||||
unknown_signs_data=unknown_signs_data,
|
||||
unknown_npcs_data=unknown_npcs_data,
|
||||
unknown_tile_entities_data=unknown_tile_entities_data,
|
||||
unknown_pressure_plates_data=unknown_pressure_plates_data,
|
||||
unknown_town_manager_data=unknown_town_manager_data)
|
||||
|
||||
with Timer("Footer", display=True):
|
||||
if not f.bool():
|
||||
raise InvalidFooterError("Invalid footer")
|
||||
if not f.string() == world.name:
|
||||
raise InvalidFooterError("Invalid footer")
|
||||
if not f.int4() == world.id:
|
||||
raise InvalidFooterError("Invalid footer")
|
||||
# File header
|
||||
version = Version(f.int4())
|
||||
relogic = f.string(7)
|
||||
savefile_type = f.uint1()
|
||||
if version != Version("1.3.5.3") or relogic != "relogic" or savefile_type != 2:
|
||||
raise NotImplementedError("This parser can only read Terraria 1.3.5.3 save files.")
|
||||
|
||||
revision = f.uint4()
|
||||
is_favorite = f.uint8() != 0
|
||||
|
||||
# Pointers and tileframeimportant
|
||||
pointers = Pointers(*[f.int4() for _ in range(f.int2())])
|
||||
tileframeimportant_size = math.ceil(f.int2() / 8)
|
||||
tileframeimportant = []
|
||||
for _ in range(tileframeimportant_size):
|
||||
current_bit = f.bits()
|
||||
tileframeimportant = [*tileframeimportant, *current_bit]
|
||||
|
||||
unknown_file_format_data = f.read_until(pointers.world_header)
|
||||
|
||||
name = f.string()
|
||||
|
||||
generator = GeneratorInfo(f.string(), f.uint8())
|
||||
|
||||
uuid_ = f.uuid()
|
||||
id_ = f.int4()
|
||||
bounds = f.rect()
|
||||
world_size = Coordinates(y=f.int4(), x=f.int4())
|
||||
is_expert = f.bool()
|
||||
created_on = f.datetime()
|
||||
|
||||
world_styles = Styles(moon=MoonStyle(f.uint1()),
|
||||
trees=FourPartSplit(separators=[f.int4(), f.int4(), f.int4()],
|
||||
properties=[f.int4(),
|
||||
f.int4(),
|
||||
f.int4(),
|
||||
f.int4()]),
|
||||
moss=FourPartSplit(separators=[f.int4(), f.int4(), f.int4()],
|
||||
properties=[f.int4(),
|
||||
f.int4(),
|
||||
f.int4(),
|
||||
f.int4()]))
|
||||
|
||||
bg_underground_snow = f.int4()
|
||||
bg_underground_jungle = f.int4()
|
||||
bg_hell = f.int4()
|
||||
|
||||
spawn_point = Coordinates(f.int4(), f.int4())
|
||||
underground_level = f.double()
|
||||
cavern_level = f.double()
|
||||
|
||||
current_time = f.double()
|
||||
is_daytime = f.bool()
|
||||
moon_phase = MoonPhase(f.uint4())
|
||||
|
||||
blood_moon = f.bool()
|
||||
eclipse = f.bool()
|
||||
|
||||
dungeon_point = Coordinates(f.int4(), f.int4())
|
||||
world_evil = WorldEvilType(f.bool())
|
||||
|
||||
defeated_eye_of_cthulhu = f.bool() # Possibly. I'm not sure.
|
||||
defeated_eater_of_worlds = f.bool() # Possibly. I'm not sure.
|
||||
defeated_skeletron = f.bool() # Possibly. I'm not sure.
|
||||
defeated_queen_bee = f.bool()
|
||||
defeated_the_twins = f.bool()
|
||||
defeated_the_destroyer = f.bool()
|
||||
defeated_skeletron_prime = f.bool()
|
||||
defeated_any_mechnical_boss = f.bool()
|
||||
defeated_plantera = f.bool()
|
||||
defeated_golem = f.bool()
|
||||
defeated_king_slime = f.bool()
|
||||
|
||||
saved_goblin_tinkerer = f.bool()
|
||||
saved_wizard = f.bool()
|
||||
saved_mechanic = f.bool()
|
||||
|
||||
defeated_goblin_army = f.bool()
|
||||
defeated_clown = f.bool()
|
||||
defeated_frost_moon = f.bool()
|
||||
defeated_pirates = f.bool()
|
||||
|
||||
shadow_orbs = ShadowOrbs(smashed_at_least_once=f.bool(),
|
||||
spawn_meteorite=f.bool(),
|
||||
evil_boss_counter=f.int4())
|
||||
|
||||
smashed_altars_count = f.int4()
|
||||
|
||||
is_hardmode = f.bool()
|
||||
|
||||
invasion_delay = f.int4()
|
||||
invasion_size = f.int4()
|
||||
invasion_type = InvasionType(f.int4())
|
||||
invasion_position = f.double()
|
||||
|
||||
time_left_slime_rain = f.double()
|
||||
|
||||
sundial_cooldown = f.uint1()
|
||||
|
||||
rain = Rain(is_active=f.bool(), time_left=f.int4(), max_rain=f.single())
|
||||
|
||||
hardmode_ore_1 = HardmodeTier1Ore(f.int4())
|
||||
hardmode_ore_2 = HardmodeTier2Ore(f.int4())
|
||||
hardmode_ore_3 = HardmodeTier3Ore(f.int4())
|
||||
altars_smashed = AltarsSmashed(count=smashed_altars_count,
|
||||
ore_tier1=hardmode_ore_1,
|
||||
ore_tier2=hardmode_ore_2,
|
||||
ore_tier3=hardmode_ore_3)
|
||||
|
||||
bg_forest = f.int1()
|
||||
bg_corruption = f.int1()
|
||||
bg_jungle = f.int1()
|
||||
bg_snow = f.int1()
|
||||
bg_hallow = f.int1()
|
||||
bg_crimson = f.int1()
|
||||
bg_desert = f.int1()
|
||||
bg_ocean = f.int1()
|
||||
|
||||
backgrounds = Backgrounds(bg_underground_snow=bg_underground_snow,
|
||||
bg_underground_jungle=bg_underground_jungle,
|
||||
bg_hell=bg_hell,
|
||||
bg_forest=bg_forest,
|
||||
bg_corruption=bg_corruption,
|
||||
bg_jungle=bg_jungle,
|
||||
bg_snow=bg_snow,
|
||||
bg_hallow=bg_hallow,
|
||||
bg_crimson=bg_crimson,
|
||||
bg_desert=bg_desert,
|
||||
bg_ocean=bg_ocean)
|
||||
|
||||
clouds = Clouds(bg_cloud=f.int4(), cloud_number=f.int2(), wind_speed=f.single())
|
||||
|
||||
angler_today_quest_completed_by_count = f.uint1()
|
||||
angler_today_quest_completed_by = []
|
||||
for _ in range(angler_today_quest_completed_by_count):
|
||||
angler_today_quest_completed_by.append(f.string())
|
||||
|
||||
saved_angler = f.bool()
|
||||
|
||||
angler_today_quest_target = AnglerQuestFish(f.int4())
|
||||
anglers_quest = AnglerQuest(current_goal=angler_today_quest_target,
|
||||
completed_by=angler_today_quest_completed_by)
|
||||
|
||||
saved_stylist = f.bool()
|
||||
saved_tax_collector = f.bool()
|
||||
|
||||
invasion_size_start = f.int4() # ???
|
||||
invasion = Invasion(delay=invasion_delay,
|
||||
size=invasion_size,
|
||||
type_=invasion_type,
|
||||
position=invasion_position,
|
||||
size_start=invasion_size_start)
|
||||
|
||||
cultist_delay = f.int4() # ???
|
||||
mob_types_count = f.int2()
|
||||
mob_kills = {}
|
||||
for mob_id in range(mob_types_count):
|
||||
mob_kills[mob_id] = f.int4()
|
||||
|
||||
fast_forward_time = f.bool()
|
||||
time = Time(current=current_time,
|
||||
is_daytime=is_daytime,
|
||||
moon_phase=moon_phase,
|
||||
sundial_cooldown=sundial_cooldown,
|
||||
fast_forward_time=fast_forward_time)
|
||||
|
||||
defeated_duke_fishron = f.bool()
|
||||
defeated_moon_lord = f.bool()
|
||||
defeated_pumpking = f.bool()
|
||||
defeated_mourning_wood = f.bool()
|
||||
defeated_ice_queen = f.bool()
|
||||
defeated_santa_nk1 = f.bool()
|
||||
defeated_everscream = f.bool()
|
||||
defeated_pillars = PillarsInfo(solar=f.bool(), vortex=f.bool(), nebula=f.bool(), stardust=f.bool())
|
||||
|
||||
lunar_events = LunarEvents(pillars_present=PillarsInfo(solar=f.bool(),
|
||||
vortex=f.bool(),
|
||||
nebula=f.bool(),
|
||||
stardust=f.bool()),
|
||||
are_active=f.bool())
|
||||
|
||||
party_center_active = f.bool()
|
||||
party_natural_active = f.bool()
|
||||
party_cooldown = f.int4()
|
||||
partying_npcs_count = f.int4()
|
||||
partying_npcs = []
|
||||
for _ in range(partying_npcs_count):
|
||||
partying_npcs.append(f.int4())
|
||||
party = Party(thrown_by_party_center=party_center_active,
|
||||
thrown_by_npcs=party_natural_active,
|
||||
cooldown=party_cooldown,
|
||||
partying_npcs=partying_npcs)
|
||||
|
||||
sandstorm = Sandstorm(is_active=f.bool(),
|
||||
time_left=f.int4(),
|
||||
severity=f.single(),
|
||||
intended_severity=f.single())
|
||||
|
||||
events = Events(blood_moon=blood_moon,
|
||||
solar_eclipse=eclipse,
|
||||
invasion=invasion,
|
||||
slime_rain=time_left_slime_rain,
|
||||
rain=rain,
|
||||
party=party,
|
||||
sandstorm=sandstorm,
|
||||
lunar_events=lunar_events)
|
||||
|
||||
saved_bartender = f.bool()
|
||||
saved_npcs = SavedNPCs(goblin_tinkerer=saved_goblin_tinkerer,
|
||||
wizard=saved_wizard,
|
||||
mechanic=saved_mechanic,
|
||||
angler=saved_angler,
|
||||
stylist=saved_stylist,
|
||||
tax_collector=saved_tax_collector,
|
||||
bartender=saved_bartender)
|
||||
|
||||
old_ones_army = OldOnesArmyTiers(f.bool(), f.bool(), f.bool())
|
||||
|
||||
bosses_defeated = BossesDefeated(eye_of_cthulhu=defeated_eye_of_cthulhu,
|
||||
eater_of_worlds=defeated_eater_of_worlds,
|
||||
skeletron=defeated_skeletron,
|
||||
queen_bee=defeated_queen_bee,
|
||||
the_twins=defeated_the_twins,
|
||||
the_destroyer=defeated_the_destroyer,
|
||||
skeletron_prime=defeated_skeletron_prime,
|
||||
any_mechnical_boss=defeated_any_mechnical_boss,
|
||||
plantera=defeated_plantera,
|
||||
golem=defeated_golem,
|
||||
king_slime=defeated_king_slime,
|
||||
goblin_army=defeated_goblin_army,
|
||||
clown=defeated_clown,
|
||||
frost_moon=defeated_frost_moon,
|
||||
pirates=defeated_pirates,
|
||||
duke_fishron=defeated_duke_fishron,
|
||||
moon_lord=defeated_moon_lord,
|
||||
pumpking=defeated_pumpking,
|
||||
mourning_wood=defeated_mourning_wood,
|
||||
ice_queen=defeated_ice_queen,
|
||||
santa_nk1=defeated_santa_nk1,
|
||||
everscream=defeated_everscream,
|
||||
lunar_pillars=defeated_pillars,
|
||||
old_ones_army=old_ones_army)
|
||||
|
||||
unknown_world_header_data = f.read_until(pointers.world_tiles)
|
||||
|
||||
# Tiles
|
||||
tm = TileMatrix()
|
||||
while tm.size.x < world_size.x:
|
||||
column = []
|
||||
while len(column) < world_size.y:
|
||||
readtiles = cls._read_tile_block(f, tileframeimportant)
|
||||
column = [*column, *readtiles]
|
||||
tm.add_column(column)
|
||||
|
||||
unknown_world_tiles_data = f.read_until(pointers.chests)
|
||||
|
||||
# Chests
|
||||
chests = []
|
||||
|
||||
chests_count = f.int2()
|
||||
chests_max_items = f.int2()
|
||||
|
||||
for _ in range(chests_count):
|
||||
chest_position = Coordinates(x=f.int4(), y=f.int4())
|
||||
chest_name = f.string()
|
||||
chest_contents = []
|
||||
|
||||
for _ in range(chests_max_items):
|
||||
item_quantity = f.int2()
|
||||
if item_quantity > 0:
|
||||
item_type = ItemType(f.int4())
|
||||
item_modifier = f.uint1()
|
||||
item = ItemStack(quantity=item_quantity,
|
||||
type_=item_type,
|
||||
modifier=item_modifier)
|
||||
else:
|
||||
item = None
|
||||
chest_contents.append(item)
|
||||
chest = Chest(position=chest_position,
|
||||
name=chest_name,
|
||||
contents=chest_contents)
|
||||
chests.append(chest)
|
||||
tm[chest.position].extra = chest
|
||||
|
||||
unknown_chests_data = f.read_until(pointers.signs)
|
||||
|
||||
# Signs
|
||||
signs = []
|
||||
|
||||
signs_count = f.int2()
|
||||
|
||||
for _ in range(signs_count):
|
||||
sign = Sign(text=f.string(),
|
||||
position=Coordinates(f.int4(), f.int4()))
|
||||
signs.append(sign)
|
||||
tm[sign.position].extra = sign
|
||||
|
||||
unknown_signs_data = f.read_until(pointers.npcs)
|
||||
|
||||
# Entities
|
||||
npcs = []
|
||||
mobs = []
|
||||
|
||||
while f.bool():
|
||||
npc_type = EntityType(f.int4())
|
||||
npc_name = f.string()
|
||||
npc_position = Coordinates(f.single(), f.single())
|
||||
is_homeless = f.bool()
|
||||
npc_home = Coordinates(f.int4(), f.int4())
|
||||
if is_homeless:
|
||||
npc_home = None
|
||||
|
||||
npc = NPC(type_=npc_type,
|
||||
name=npc_name,
|
||||
position=npc_position,
|
||||
home=npc_home)
|
||||
npcs.append(npc)
|
||||
|
||||
while f.bool():
|
||||
mob_type = EntityType(f.int4())
|
||||
mob_position = Coordinates(f.single(), f.single())
|
||||
|
||||
mob = Mob(type_=mob_type,
|
||||
position=mob_position)
|
||||
mobs.append(mob)
|
||||
|
||||
unknown_npcs_data = f.read_until(pointers.tile_entities)
|
||||
|
||||
# Tile entities
|
||||
tile_entities_count = f.int4()
|
||||
tile_entities = []
|
||||
|
||||
for _ in range(tile_entities_count):
|
||||
te_type = f.uint1()
|
||||
te_id = f.int4()
|
||||
te_position = Coordinates(f.int2(), f.int2())
|
||||
if te_type == 0:
|
||||
te_extra = TargetDummy(npc=f.int2())
|
||||
elif te_type == 1:
|
||||
te_extra = ItemFrame(item=ItemStack(type_=ItemType(f.int2()),
|
||||
modifier=f.uint1(),
|
||||
quantity=f.int2()))
|
||||
elif te_type == 2:
|
||||
te_extra = LogicSensor(logic_check=f.uint1(), enabled=f.bool())
|
||||
else:
|
||||
te_extra = ...
|
||||
tile_entity = TileEntity(id_=te_id, position=te_position, extra=te_extra)
|
||||
tile_entities.append(tile_entity)
|
||||
tm[tile_entity.position].extra = tile_entity
|
||||
|
||||
unknown_tile_entities_data = f.read_until(pointers.pressure_plates)
|
||||
|
||||
# Weighed Pressure Plates
|
||||
weighed_pressure_plates_count = f.int4()
|
||||
weighed_pressure_plates = []
|
||||
|
||||
for _ in range(weighed_pressure_plates_count):
|
||||
wpp = WeighedPressurePlate(position=Coordinates(f.int4(), f.int4()))
|
||||
weighed_pressure_plates.append(wpp)
|
||||
tm[wpp.position].extra = wpp
|
||||
|
||||
unknown_pressure_plates_data = f.read_until(pointers.town_manager)
|
||||
|
||||
# Town Manager
|
||||
rooms_count = f.int4()
|
||||
rooms = []
|
||||
|
||||
for _ in range(rooms_count):
|
||||
room = Room(npc=EntityType(f.int4()), position=Coordinates(f.int4(), f.int4()))
|
||||
rooms.append(room)
|
||||
|
||||
unknown_town_manager_data = f.read_until(pointers.footer)
|
||||
|
||||
# Object creation
|
||||
world = cls(version=version, savefile_type=savefile_type, revision=revision, is_favorite=is_favorite,
|
||||
name=name, generator=generator, uuid_=uuid_, id_=id_, bounds=bounds, size=world_size,
|
||||
is_expert=is_expert, created_on=created_on, styles=world_styles, backgrounds=backgrounds,
|
||||
spawn_point=spawn_point, underground_level=underground_level, cavern_level=cavern_level,
|
||||
time=time, events=events, dungeon_point=dungeon_point, world_evil=world_evil,
|
||||
saved_npcs=saved_npcs, altars_smashed=altars_smashed, is_hardmode=is_hardmode,
|
||||
shadow_orbs=shadow_orbs, bosses_defeated=bosses_defeated, anglers_quest=anglers_quest,
|
||||
clouds=clouds, cultist_delay=cultist_delay, tiles=tm, chests=chests, signs=signs,
|
||||
npcs=npcs, mobs=mobs, tile_entities=tile_entities,
|
||||
weighed_pressure_plates=weighed_pressure_plates, rooms=rooms,
|
||||
unknown_file_format_data=unknown_file_format_data,
|
||||
unknown_world_header_data=unknown_world_header_data,
|
||||
unknown_world_tiles_data=unknown_world_tiles_data,
|
||||
unknown_chests_data=unknown_chests_data,
|
||||
unknown_signs_data=unknown_signs_data,
|
||||
unknown_npcs_data=unknown_npcs_data,
|
||||
unknown_tile_entities_data=unknown_tile_entities_data,
|
||||
unknown_pressure_plates_data=unknown_pressure_plates_data,
|
||||
unknown_town_manager_data=unknown_town_manager_data)
|
||||
|
||||
# Footer
|
||||
if not f.bool():
|
||||
raise InvalidFooterError("Invalid footer")
|
||||
if not f.string() == world.name:
|
||||
raise InvalidFooterError("Invalid footer")
|
||||
if not f.int4() == world.id:
|
||||
raise InvalidFooterError("Invalid footer")
|
||||
|
||||
f.file.close()
|
||||
|
||||
return world
|
||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ with open("README.md", "r") as f:
|
|||
|
||||
setuptools.setup(
|
||||
name="lihzahrd",
|
||||
version="1.0a1",
|
||||
version="1.0b1",
|
||||
author="Stefano Pigozzi",
|
||||
author_email="ste.pigozzi@gmail.com",
|
||||
description="A Terraria world parser in Python",
|
||||
|
|
2
test.py
2
test.py
|
@ -1,3 +1,3 @@
|
|||
import lihzahrd
|
||||
|
||||
lihzahrd.World.create_from_file(open("Small_Example.wld", "rb"))
|
||||
lihzahrd.World.create_from_file("Small_Example.wld")
|
||||
|
|
Loading…
Reference in a new issue