File tree Expand file tree Collapse file tree 4 files changed +331
-18
lines changed
Expand file tree Collapse file tree 4 files changed +331
-18
lines changed Original file line number Diff line number Diff line change 186186 " imageio" ,
187187 " INCOL" ,
188188 " INROW" ,
189+ " interactable" ,
189190 " intersphinx" ,
190191 " isinstance" ,
191192 " isort" ,
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ The next step is to change state based on user input.
140140Like ``tcod `` you'll need to install ``attrs `` with Pip, such as with :shell: `pip install attrs `.
141141
142142Start by adding an ``attrs `` class called ``ExampleState ``.
143- This a normal class with the :python: `@attrs.define(eq=False ) ` decorator added.
143+ This a normal class with the :python: `@attrs.define() ` decorator added.
144144
145145This class should hold coordinates for the player.
146146It should also have a ``on_draw `` method which takes :any: `tcod.console.Console ` as a parameter and marks the player position on it.
@@ -162,7 +162,7 @@ Call this method using the players current coordinates and the :python:`"@"` cha
162162 import tcod.tileset
163163
164164
165- @attrs.define (eq = False )
165+ @attrs.define ()
166166 class ExampleState :
167167 """ Example state with a hard-coded player position."""
168168
@@ -242,7 +242,7 @@ The full script so far is:
242242 import tcod.tileset
243243
244244
245- @attrs.define (eq = False )
245+ @attrs.define ()
246246 class ExampleState :
247247 """ Example state with a hard-coded player position."""
248248
Original file line number Diff line number Diff line change @@ -358,12 +358,12 @@ Then add the following:
358358 KeySym.n: (1 , 1 ),
359359 }
360360
361- Create a new :python: `class InGame: ` decorated with :python: `@attrs.define(eq=False ) `.
361+ Create a new :python: `class InGame: ` decorated with :python: `@attrs.define() `.
362362States will always use ``g.world `` to access the ECS registry.
363363
364364.. code-block :: python
365365
366- @attrs.define (eq = False )
366+ @attrs.define ()
367367 class InGame :
368368 """ Primary in-game state."""
369369 ...
@@ -515,7 +515,7 @@ It should be at the same level as the ``for`` loop and not inside of it.
515515 }
516516
517517
518- @attrs.define (eq = False )
518+ @attrs.define ()
519519 class InGame :
520520 """ Primary in-game state."""
521521
You can’t perform that action at this time.
0 commit comments