1
Fork 0
mirror of https://github.com/Steffo99/lihzahrd.git synced 2024-11-21 15:44:24 +00:00

Improve tile repr

This commit is contained in:
Steffo 2020-04-17 17:03:12 +02:00
parent 5971c9dadd
commit 671fb558c3
49 changed files with 6833 additions and 6388 deletions

5
__main__.py Normal file
View file

@ -0,0 +1,5 @@
import lihzahrd
world = lihzahrd.World.create_from_file("Casarao.wld")
breakpoint()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e14f604a529d860828ac84af1e937285
config: 58c76448432ab7a46d14fc2944a74115
tags: 645f666f9bcd5a90fca523b33c5a78b7

View file

@ -28,5 +28,5 @@ Some more links
Here are some links that may be useful:
* `lihzahrd on GitHub <https://github.com/Steffo99/lihzahrd>`_
* `flyingsnake <https://github.com/Steffo99/flyingsnake>`_, a package using ``lihzahrd`` that may be a good example
* `flyingsnake <https://github.com/Steffo99/flyingsnake>`_, a package using ``lihzahrd``
* :ref:`genindex`

View file

@ -66,7 +66,7 @@ attribute. ::
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 >
# <Tile>
You can also use :py:class:`fileutils.Coordinates` instead of a :py:class:`tuple` to fetch a specific tile: ::
@ -79,7 +79,7 @@ You can also use :py:class:`fileutils.Coordinates` instead of a :py:class:`tuple
Counting tiles from the bottom-right is possible too: ::
print(world.tiles[-1, -1])
# <Tile >
# <Tile>
A single :py:class:`tiles.Tile` has five attributes that you can access:

View file

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -520,14 +520,15 @@ dl.citation > dd:after {
}
dl.field-list {
display: flex;
flex-wrap: wrap;
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
flex-basis: 20%;
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
@ -535,8 +536,8 @@ dl.field-list > dt:after {
}
dl.field-list > dd {
flex-basis: 70%;
padding-left: 1em;
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
@ -671,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;

View file

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -283,10 +283,11 @@ var Documentation = {
},
initOnKeyListeners: function() {
$(document).keyup(function(event) {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');

View file

@ -3,7 +3,9 @@ var DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View file

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -63,6 +63,11 @@ var Search = {
htmlElement.innerHTML = htmlString;
$(htmlElement).find('.headerlink').remove();
docContent = $(htmlElement).find('[role=main]')[0];
if(docContent === undefined) {
console.warn("Content block not found. Sphinx search tries to obtain it " +
"via '[role=main]'. Could you check your theme or template.");
return "";
}
return docContent.textContent || docContent.innerText;
},
@ -245,7 +250,9 @@ var Search = {
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
@ -253,15 +260,17 @@ var Search = {
} else if (dirname == 'index/') {
dirname = '';
}
listItem.append($('<a/>').attr('href',
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
listItem.append($('<a/>').attr('href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
@ -269,7 +278,7 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
@ -424,7 +433,7 @@ var Search = {
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});
@ -432,7 +441,7 @@ var Search = {
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];

File diff suppressed because it is too large Load diff

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -170,7 +170,7 @@
<h1>lihzahrd.errors<a class="headerlink" href="#lihzahrd-errors" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<dl class="class">
<dl class="py class">
<dt id="lihzahrd.errors.InvalidFooterError">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.errors.</code><code class="sig-name descname">InvalidFooterError</code><a class="headerlink" href="#lihzahrd.errors.InvalidFooterError" title="Permalink to this definition"></a></dt>
<dd><p>This exception is raised if the footer contents do not match the expected data.</p>

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -170,114 +170,119 @@
<h1>lihzahrd.fileutils<a class="headerlink" href="#lihzahrd-fileutils" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-lihzahrd.fileutils"></span><dl class="class">
<span class="target" id="module-lihzahrd.fileutils"></span><dl class="py class">
<dt id="lihzahrd.fileutils.FileReader">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">FileReader</code><span class="sig-paren">(</span><em class="sig-param">file</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.FileReader" title="Permalink to this definition"></a></dt>
<dd><dl class="method">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">FileReader</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">file</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.FileReader" title="Permalink to this definition"></a></dt>
<dd><dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.bits">
<code class="sig-name descname">bits</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple[lihzahrd.fileutils.filereader.FileReader.bool, lihzahrd.fileutils.filereader.FileReader.bool, lihzahrd.fileutils.filereader.FileReader.bool, lihzahrd.fileutils.filereader.FileReader.bool, lihzahrd.fileutils.filereader.FileReader.bool, lihzahrd.fileutils.filereader.FileReader.bool, lihzahrd.fileutils.filereader.FileReader.bool, lihzahrd.fileutils.filereader.FileReader.bool]<a class="headerlink" href="#lihzahrd.fileutils.FileReader.bits" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">bits</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">, </span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">, </span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">, </span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">, </span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">, </span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">, </span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">, </span>lihzahrd.fileutils.filereader.FileReader.bool<span class="p">]</span><a class="headerlink" href="#lihzahrd.fileutils.FileReader.bits" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.bool">
<code class="sig-name descname">bool</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#lihzahrd.fileutils.FileReader.bool" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">bool</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)">bool</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.bool" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.datetime">
<code class="sig-name descname">datetime</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; datetime.datetime<a class="headerlink" href="#lihzahrd.fileutils.FileReader.datetime" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">datetime</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/datetime.html#datetime.datetime" title="(in Python v3.7)">datetime.datetime</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.datetime" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.double">
<code class="sig-name descname">double</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; float<a class="headerlink" href="#lihzahrd.fileutils.FileReader.double" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">double</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#float" title="(in Python v3.7)">float</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.double" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.int1">
<code class="sig-name descname">int1</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.int1" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">int1</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.int1" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.int2">
<code class="sig-name descname">int2</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.int2" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">int2</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.int2" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.int4">
<code class="sig-name descname">int4</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.int4" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">int4</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.int4" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.int8">
<code class="sig-name descname">int8</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.int8" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">int8</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.int8" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.read_until">
<code class="sig-name descname">read_until</code><span class="sig-paren">(</span><em class="sig-param">address: int</em><span class="sig-paren">)</span> &#x2192; bytearray<a class="headerlink" href="#lihzahrd.fileutils.FileReader.read_until" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">read_until</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">address</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#bytearray" title="(in Python v3.7)">bytearray</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.read_until" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.rect">
<code class="sig-name descname">rect</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; lihzahrd.fileutils.rect.Rect<a class="headerlink" href="#lihzahrd.fileutils.FileReader.rect" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.single">
<code class="sig-name descname">single</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; float<a class="headerlink" href="#lihzahrd.fileutils.FileReader.single" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">single</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#float" title="(in Python v3.7)">float</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.single" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.skip_until">
<code class="sig-name descname">skip_until</code><span class="sig-paren">(</span><em class="sig-param">address: int</em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#lihzahrd.fileutils.FileReader.skip_until" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">skip_until</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">address</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/constants.html#None" title="(in Python v3.7)">None</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.skip_until" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.string">
<code class="sig-name descname">string</code><span class="sig-paren">(</span><em class="sig-param">size=None</em><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#lihzahrd.fileutils.FileReader.string" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">string</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">size</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)">str</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.string" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.uint1">
<code class="sig-name descname">uint1</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint1" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">uint1</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint1" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.uint2">
<code class="sig-name descname">uint2</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint2" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">uint2</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint2" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.uint4">
<code class="sig-name descname">uint4</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint4" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">uint4</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint4" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.uint8">
<code class="sig-name descname">uint8</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint8" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">uint8</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.uint8" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.uleb128">
<code class="sig-name descname">uleb128</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.uleb128" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="lihzahrd.fileutils.FileReader.uuid">
<code class="sig-name descname">uuid</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; uuid.UUID<a class="headerlink" href="#lihzahrd.fileutils.FileReader.uuid" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">uuid</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference external" href="https://docs.python.org/3.7/library/uuid.html#uuid.UUID" title="(in Python v3.7)">uuid.UUID</a><a class="headerlink" href="#lihzahrd.fileutils.FileReader.uuid" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dl class="py class">
<dt id="lihzahrd.fileutils.Rect">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">Rect</code><span class="sig-paren">(</span><em class="sig-param">left</em>, <em class="sig-param">right</em>, <em class="sig-param">top</em>, <em class="sig-param">bottom</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.Rect" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">Rect</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">left</span></em>, <em class="sig-param"><span class="n">right</span></em>, <em class="sig-param"><span class="n">top</span></em>, <em class="sig-param"><span class="n">bottom</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.Rect" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="class">
<dl class="py class">
<dt id="lihzahrd.fileutils.Pointers">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">Pointers</code><span class="sig-paren">(</span><em class="sig-param">world_header: int</em>, <em class="sig-param">world_tiles: int</em>, <em class="sig-param">chests: int</em>, <em class="sig-param">signs: int</em>, <em class="sig-param">npcs: int</em>, <em class="sig-param">tile_entities: int</em>, <em class="sig-param">pressure_plates: int</em>, <em class="sig-param">town_manager: int</em>, <em class="sig-param">footer: int</em>, <em class="sig-param">*unknown</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.Pointers" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">Pointers</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">world_header</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">world_tiles</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">chests</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">signs</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">npcs</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">tile_entities</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">pressure_plates</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">town_manager</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">footer</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="o">*</span><span class="n">unknown</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.Pointers" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="class">
<dl class="py class">
<dt id="lihzahrd.fileutils.Coordinates">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">Coordinates</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.Coordinates" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.fileutils.</code><code class="sig-name descname">Coordinates</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.fileutils.Coordinates" title="Permalink to this definition"></a></dt>
<dd><p>A pair of coordinates.</p>
</dd></dl>

View file

@ -22,10 +22,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -4209,16 +4209,16 @@
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.FROG_STATUE">FROG_STATUE (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="tiles.html#lihzahrd.tiles.LiquidType.from_flags">from_flags (lihzahrd.tiles.LiquidType attribute)</a>
<li><a href="tiles.html#lihzahrd.tiles.LiquidType.from_flags">from_flags() (lihzahrd.tiles.LiquidType class method)</a>
<ul>
<li><a href="tiles.html#lihzahrd.tiles.RLEEncoding.from_flags">(lihzahrd.tiles.RLEEncoding attribute)</a>
<li><a href="tiles.html#lihzahrd.tiles.RLEEncoding.from_flags">(lihzahrd.tiles.RLEEncoding class method)</a>
</li>
<li><a href="tiles.html#lihzahrd.tiles.Shape.from_flags">(lihzahrd.tiles.Shape attribute)</a>
<li><a href="tiles.html#lihzahrd.tiles.Shape.from_flags">(lihzahrd.tiles.Shape class method)</a>
</li>
<li><a href="tiles.html#lihzahrd.tiles.Wiring.from_flags">(lihzahrd.tiles.Wiring class method)</a>
</li>
</ul></li>
<li><a href="tiles.html#lihzahrd.tiles.Wiring.from_flags">from_flags() (lihzahrd.tiles.Wiring class method)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.FROST_BREASTPLATE">FROST_BREASTPLATE (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.FROST_CORE">FROST_CORE (lihzahrd.chests.ItemType attribute)</a>
@ -5674,9 +5674,9 @@
<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>
<li><a href="world.html#lihzahrd.World.id">(lihzahrd.World attribute)</a>
</li>
</ul></li>
<li><a href="chests.html#lihzahrd.chests.ItemType.ILLEGAL_GUN_PARTS">ILLEGAL_GUN_PARTS (lihzahrd.chests.ItemType attribute)</a>
@ -6259,26 +6259,76 @@
</li>
<li><a href="npcs.html#lihzahrd.npcs.EntityType.LIHZAHRD">LIHZAHRD (lihzahrd.npcs.EntityType attribute)</a>
</li>
<li><a href="chests.html#module-lihzahrd.chests">lihzahrd.chests (module)</a>
<li>
lihzahrd.chests
<ul>
<li><a href="chests.html#module-lihzahrd.chests">module</a>
</li>
<li><a href="fileutils.html#module-lihzahrd.fileutils">lihzahrd.fileutils (module)</a>
</ul></li>
<li>
lihzahrd.fileutils
<ul>
<li><a href="fileutils.html#module-lihzahrd.fileutils">module</a>
</li>
<li><a href="header.html#module-lihzahrd.header">lihzahrd.header (module)</a>
</ul></li>
<li>
lihzahrd.header
<ul>
<li><a href="header.html#module-lihzahrd.header">module</a>
</li>
<li><a href="npcs.html#module-lihzahrd.npcs">lihzahrd.npcs (module)</a>
</ul></li>
<li>
lihzahrd.npcs
<ul>
<li><a href="npcs.html#module-lihzahrd.npcs">module</a>
</li>
<li><a href="pressureplates.html#module-lihzahrd.pressureplates">lihzahrd.pressureplates (module)</a>
</ul></li>
<li>
lihzahrd.pressureplates
<ul>
<li><a href="pressureplates.html#module-lihzahrd.pressureplates">module</a>
</li>
<li><a href="signs.html#module-lihzahrd.signs">lihzahrd.signs (module)</a>
</ul></li>
<li>
lihzahrd.signs
<ul>
<li><a href="signs.html#module-lihzahrd.signs">module</a>
</li>
<li><a href="tileentities.html#module-lihzahrd.tileentities">lihzahrd.tileentities (module)</a>
</ul></li>
<li>
lihzahrd.tileentities
<ul>
<li><a href="tileentities.html#module-lihzahrd.tileentities">module</a>
</li>
<li><a href="tiles.html#module-lihzahrd.tiles">lihzahrd.tiles (module)</a>
</ul></li>
<li>
lihzahrd.tiles
<ul>
<li><a href="tiles.html#module-lihzahrd.tiles">module</a>
</li>
<li><a href="timer.html#module-lihzahrd.timer">lihzahrd.timer (module)</a>
</ul></li>
<li>
lihzahrd.timer
<ul>
<li><a href="timer.html#module-lihzahrd.timer">module</a>
</li>
<li><a href="townmanager.html#module-lihzahrd.townmanager">lihzahrd.townmanager (module)</a>
</ul></li>
<li>
lihzahrd.townmanager
<ul>
<li><a href="townmanager.html#module-lihzahrd.townmanager">module</a>
</li>
</ul></li>
<li><a href="chests.html#lihzahrd.chests.ItemType.LIHZAHRD_ALTAR">LIHZAHRD_ALTAR (lihzahrd.chests.ItemType attribute)</a>
<ul>
@ -6319,6 +6369,8 @@
</li>
<li><a href="npcs.html#lihzahrd.npcs.EntityType.LIHZAHRD_CRAWLER">LIHZAHRD_CRAWLER (lihzahrd.npcs.EntityType attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="chests.html#lihzahrd.chests.ItemType.LIHZAHRD_DOOR">LIHZAHRD_DOOR (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.LIHZAHRD_DRESSER">LIHZAHRD_DRESSER (lihzahrd.chests.ItemType attribute)</a>
@ -6331,8 +6383,6 @@
</ul></li>
<li><a href="chests.html#lihzahrd.chests.ItemType.LIHZAHRD_GUARDIAN_STATUE">LIHZAHRD_GUARDIAN_STATUE (lihzahrd.chests.ItemType attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="chests.html#lihzahrd.chests.ItemType.LIHZAHRD_LAMP">LIHZAHRD_LAMP (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.LIHZAHRD_LANTERN">LIHZAHRD_LANTERN (lihzahrd.chests.ItemType attribute)</a>
@ -7065,8 +7115,6 @@
</ul></li>
<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>
@ -7077,6 +7125,33 @@
</li>
<li><a href="chests.html#lihzahrd.chests.ItemStack.modifier">modifier (lihzahrd.chests.ItemStack attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
module
<ul>
<li><a href="chests.html#module-lihzahrd.chests">lihzahrd.chests</a>
</li>
<li><a href="fileutils.html#module-lihzahrd.fileutils">lihzahrd.fileutils</a>
</li>
<li><a href="header.html#module-lihzahrd.header">lihzahrd.header</a>
</li>
<li><a href="npcs.html#module-lihzahrd.npcs">lihzahrd.npcs</a>
</li>
<li><a href="pressureplates.html#module-lihzahrd.pressureplates">lihzahrd.pressureplates</a>
</li>
<li><a href="signs.html#module-lihzahrd.signs">lihzahrd.signs</a>
</li>
<li><a href="tileentities.html#module-lihzahrd.tileentities">lihzahrd.tileentities</a>
</li>
<li><a href="tiles.html#module-lihzahrd.tiles">lihzahrd.tiles</a>
</li>
<li><a href="timer.html#module-lihzahrd.timer">lihzahrd.timer</a>
</li>
<li><a href="townmanager.html#module-lihzahrd.townmanager">lihzahrd.townmanager</a>
</li>
</ul></li>
<li><a href="chests.html#lihzahrd.chests.ItemType.MOLOTOV_COCKTAIL">MOLOTOV_COCKTAIL (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.MOLTEN_BREASTPLATE">MOLTEN_BREASTPLATE (lihzahrd.chests.ItemType attribute)</a>
@ -7574,11 +7649,11 @@
<li><a href="npcs.html#lihzahrd.npcs.EntityType.NECROMANCER">NECROMANCER (lihzahrd.npcs.EntityType attribute)</a>
</li>
<li><a href="npcs.html#lihzahrd.npcs.EntityType.NECROMANCER_ARMORED">NECROMANCER_ARMORED (lihzahrd.npcs.EntityType attribute)</a>
</li>
<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.NECROMANCER_BANNER">NECROMANCER_BANNER (lihzahrd.chests.ItemType attribute)</a>
</li>
<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>
@ -7641,8 +7716,6 @@
<li><a href="header.html#lihzahrd.header.HardmodeTier3Ore.NOT_DETERMINED">(lihzahrd.header.HardmodeTier3Ore attribute)</a>
</li>
</ul></li>
<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>
@ -11648,6 +11721,8 @@
<li><a href="fileutils.html#lihzahrd.fileutils.FileReader.uint4">uint4() (lihzahrd.fileutils.FileReader method)</a>
</li>
<li><a href="fileutils.html#lihzahrd.fileutils.FileReader.uint8">uint8() (lihzahrd.fileutils.FileReader method)</a>
</li>
<li><a href="fileutils.html#lihzahrd.fileutils.FileReader.uleb128">uleb128() (lihzahrd.fileutils.FileReader method)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.ULTRA_BRIGHT_CAMPFIRE">ULTRA_BRIGHT_CAMPFIRE (lihzahrd.chests.ItemType attribute)</a>
</li>
@ -11678,11 +11753,11 @@
<li><a href="chests.html#lihzahrd.chests.ItemType.UNDEAD_VIKING_BANNER">UNDEAD_VIKING_BANNER (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.UNDEAD_VIKING_STATUE">UNDEAD_VIKING_STATUE (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="world.html#lihzahrd.World.underground_level">underground_level (lihzahrd.World attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="world.html#lihzahrd.World.underground_level">underground_level (lihzahrd.World attribute)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.UNDERGROUND_REWARD">UNDERGROUND_REWARD (lihzahrd.chests.ItemType attribute)</a>
</li>
<li><a href="chests.html#lihzahrd.chests.ItemType.UNHOLY_ARROW">UNHOLY_ARROW (lihzahrd.chests.ItemType attribute)</a>

File diff suppressed because one or more lines are too long

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -167,7 +167,7 @@
<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 external" href="https://github.com/Steffo99/flyingsnake">flyingsnake</a>, a package using <code class="docutils literal notranslate"><span class="pre">lihzahrd</span></code> that may be a good example</p></li>
<li><p><a class="reference external" href="https://github.com/Steffo99/flyingsnake">flyingsnake</a>, a package using <code class="docutils literal notranslate"><span class="pre">lihzahrd</span></code></p></li>
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
</ul>
</div>

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -170,11 +170,11 @@
<h1>lihzahrd.pressureplates<a class="headerlink" href="#lihzahrd-pressureplates" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-lihzahrd.pressureplates"></span><dl class="class">
<span class="target" id="module-lihzahrd.pressureplates"></span><dl class="py 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>
<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"><span class="n">position</span><span class="p">:</span> <span class="n">lihzahrd.fileutils.coordinates.Coordinates</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.pressureplates.WeighedPressurePlate" title="Permalink to this definition"></a></dt>
<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">
<dl class="py 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>

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>

View file

@ -21,11 +21,11 @@
<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/searchtools.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script src="_static/searchtools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>

File diff suppressed because one or more lines are too long

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -170,16 +170,16 @@
<h1>lihzahrd.signs<a class="headerlink" href="#lihzahrd-signs" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-lihzahrd.signs"></span><dl class="class">
<span class="target" id="module-lihzahrd.signs"></span><dl class="py class">
<dt id="lihzahrd.signs.Sign">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.signs.</code><code class="sig-name descname">Sign</code><span class="sig-paren">(</span><em class="sig-param">position: lihzahrd.fileutils.coordinates.Coordinates</em>, <em class="sig-param">text: str = ''</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.signs.Sign" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.signs.</code><code class="sig-name descname">Sign</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">position</span><span class="p">:</span> <span class="n">lihzahrd.fileutils.coordinates.Coordinates</span></em>, <em class="sig-param"><span class="n">text</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)">str</a></span> <span class="o">=</span> <span class="default_value">''</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.signs.Sign" title="Permalink to this definition"></a></dt>
<dd><p>A sign with something written on it.</p>
<dl class="attribute">
<dl class="py attribute">
<dt id="lihzahrd.signs.Sign.position">
<code class="sig-name descname">position</code><a class="headerlink" href="#lihzahrd.signs.Sign.position" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dl class="py attribute">
<dt id="lihzahrd.signs.Sign.text">
<code class="sig-name descname">text</code><a class="headerlink" href="#lihzahrd.signs.Sign.text" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -170,57 +170,57 @@
<h1>lihzahrd.tileentities<a class="headerlink" href="#lihzahrd-tileentities" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-lihzahrd.tileentities"></span><dl class="class">
<span class="target" id="module-lihzahrd.tileentities"></span><dl class="py class">
<dt id="lihzahrd.tileentities.TileEntity">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tileentities.</code><code class="sig-name descname">TileEntity</code><span class="sig-paren">(</span><em class="sig-param">id_: int, position: lihzahrd.fileutils.coordinates.Coordinates, extra: Union[lihzahrd.tileentities.targetdummy.TargetDummy, lihzahrd.tileentities.itemframe.ItemFrame, lihzahrd.tileentities.logicsensor.LogicSensor]</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.TileEntity" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tileentities.</code><code class="sig-name descname">TileEntity</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">id_</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">position</span><span class="p">:</span> <span class="n">lihzahrd.fileutils.coordinates.Coordinates</span></em>, <em class="sig-param"><span class="n">extra</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>lihzahrd.tileentities.targetdummy.TargetDummy<span class="p">, </span>lihzahrd.tileentities.itemframe.ItemFrame<span class="p">, </span>lihzahrd.tileentities.logicsensor.LogicSensor<span class="p">]</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.TileEntity" title="Permalink to this definition"></a></dt>
<dd><p>A TileEntity, such as a Training Dummy, an Item Frame or a Logic Sensor.</p>
<dl class="attribute">
<dl class="py attribute">
<dt id="lihzahrd.tileentities.TileEntity.data">
<code class="sig-name descname">data</code><a class="headerlink" href="#lihzahrd.tileentities.TileEntity.data" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dl class="py attribute">
<dt id="lihzahrd.tileentities.TileEntity.id">
<code class="sig-name descname">id</code><a class="headerlink" href="#lihzahrd.tileentities.TileEntity.id" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dl class="py attribute">
<dt id="lihzahrd.tileentities.TileEntity.position">
<code class="sig-name descname">position</code><a class="headerlink" href="#lihzahrd.tileentities.TileEntity.position" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dl class="py 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>
<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"><span class="n">item</span><span class="p">:</span> <span class="n">lihzahrd.chests.itemstack.ItemStack</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.ItemFrame" title="Permalink to this definition"></a></dt>
<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">
<dl class="py 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>
</dd></dl>
<dl class="class">
<dl class="py class">
<dt id="lihzahrd.tileentities.LogicSensor">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tileentities.</code><code class="sig-name descname">LogicSensor</code><span class="sig-paren">(</span><em class="sig-param">logic_check: int</em>, <em class="sig-param">enabled: bool</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.LogicSensor" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tileentities.</code><code class="sig-name descname">LogicSensor</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">logic_check</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em>, <em class="sig-param"><span class="n">enabled</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)">bool</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.LogicSensor" title="Permalink to this definition"></a></dt>
<dd><p>Data pertaining to a Logic Sensor (<a class="reference external" href="https://terraria.gamepedia.com/Sensors">https://terraria.gamepedia.com/Sensors</a>).</p>
<dl class="attribute">
<dl class="py attribute">
<dt id="lihzahrd.tileentities.LogicSensor.enabled">
<code class="sig-name descname">enabled</code><a class="headerlink" href="#lihzahrd.tileentities.LogicSensor.enabled" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dl class="py attribute">
<dt id="lihzahrd.tileentities.LogicSensor.logic_check">
<code class="sig-name descname">logic_check</code><a class="headerlink" href="#lihzahrd.tileentities.LogicSensor.logic_check" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dl class="py class">
<dt id="lihzahrd.tileentities.TargetDummy">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tileentities.</code><code class="sig-name descname">TargetDummy</code><span class="sig-paren">(</span><em class="sig-param">npc: int</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.TargetDummy" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.tileentities.</code><code class="sig-name descname">TargetDummy</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">npc</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#int" title="(in Python v3.7)">int</a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.tileentities.TargetDummy" title="Permalink to this definition"></a></dt>
<dd><p>Data pertaining to a Target Dummy (<a class="reference external" href="https://terraria.gamepedia.com/Target_Dummy">https://terraria.gamepedia.com/Target_Dummy</a>)</p>
</dd></dl>

File diff suppressed because it is too large Load diff

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -169,21 +169,21 @@
<h1>lihzahrd.timer<a class="headerlink" href="#lihzahrd-timer" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-lihzahrd.timer"></span><dl class="class">
<span class="target" id="module-lihzahrd.timer"></span><dl class="py class">
<dt id="lihzahrd.timer.Timer">
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.timer.</code><code class="sig-name descname">Timer</code><span class="sig-paren">(</span><em class="sig-param">name: str</em>, <em class="sig-param">display: bool = True</em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.timer.Timer" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">lihzahrd.timer.</code><code class="sig-name descname">Timer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/stdtypes.html#str" title="(in Python v3.7)">str</a></span></em>, <em class="sig-param"><span class="n">display</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3.7/library/functions.html#bool" title="(in Python v3.7)">bool</a></span> <span class="o">=</span> <span class="default_value">True</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.timer.Timer" title="Permalink to this definition"></a></dt>
<dd><p>An object to track and print the time required to perform a section of code.</p>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.timer.Timer._result">
<em class="property">property </em><code class="sig-name descname">_result</code><a class="headerlink" href="#lihzahrd.timer.Timer._result" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.timer.Timer.start">
<code class="sig-name descname">start</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.timer.Timer.start" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dl class="py method">
<dt id="lihzahrd.timer.Timer.stop">
<code class="sig-name descname">stop</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.timer.Timer.stop" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -170,15 +170,15 @@
<h1>lihzahrd.townmanager<a class="headerlink" href="#lihzahrd-townmanager" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-lihzahrd.townmanager"></span><dl class="class">
<span class="target" id="module-lihzahrd.townmanager"></span><dl class="py 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">
<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"><span class="n">npc</span><span class="p">:</span> <span class="n">lihzahrd.npcs.npctype.EntityType</span></em>, <em class="sig-param"><span class="n">position</span><span class="p">:</span> <span class="n">lihzahrd.fileutils.coordinates.Coordinates</span></em><span class="sig-paren">)</span><a class="headerlink" href="#lihzahrd.townmanager.Room" title="Permalink to this definition"></a></dt>
<dd><dl class="py 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">
<dl class="py 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>

View file

@ -21,10 +21,10 @@
<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 src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -216,7 +216,7 @@ attribute.</p>
</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"># &lt;Tile &gt;</span>
<span class="c1"># &lt;Tile&gt;</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>
@ -229,7 +229,7 @@ attribute.</p>
</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"># &lt;Tile &gt;</span>
<span class="c1"># &lt;Tile&gt;</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>

File diff suppressed because one or more lines are too long

View file

@ -66,7 +66,7 @@ attribute. ::
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 >
# <Tile>
You can also use :py:class:`fileutils.Coordinates` instead of a :py:class:`tuple` to fetch a specific tile: ::
@ -79,7 +79,7 @@ You can also use :py:class:`fileutils.Coordinates` instead of a :py:class:`tuple
Counting tiles from the bottom-right is possible too: ::
print(world.tiles[-1, -1])
# <Tile >
# <Tile>
A single :py:class:`tiles.Tile` has five attributes that you can access:

View file

@ -32,4 +32,9 @@ class Tile:
"""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 ''}>"
tile_status = f"{'B' if self.block else ''}" \
f"{'W' if self.wall else ''}" \
f"{'L' if self.liquid else ''}" \
f"{'W' if self.wiring else ''}" \
f"{'E' if self.extra else ''}"
return f"<Tile{' ' if tile_status else ''}{tile_status}>"