Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent assigning to immutable attributes like .layer #50

Open
lordmauve opened this issue Jun 19, 2020 · 0 comments
Open

Prevent assigning to immutable attributes like .layer #50

lordmauve opened this issue Jun 19, 2020 · 0 comments

Comments

@lordmauve
Copy link
Owner

Assigning to layer succeeds but produces a layer failure:

Traceback (most recent call last):
  File "c:/Bookworm Adventures Monster Maker/MonsterMakerArcade.py", line 77, in <module>
    run()
  File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\wasabi2d\game.py", line 175, in run
    updated |= self.dispatch_event(event)
  File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\wasabi2d\game.py", line 158, in dispatch_event
    handler(event)
  File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\wasabi2d\game.py", line 136, in new_handler
    return handler(**prepped)
  File "c:/Bookworm Adventures Monster Maker/MonsterMakerArcade.py", line 30, in on_mouse_move
    limb.checkIfSelected(position = pos, rel = rel)
  File "c:\Bookworm Adventures Monster Maker\Limb.py", line 13, in checkIfSelected
    self.selectionbox.pos += rel
  File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\wasabi2d\primitives\base.py", line 61, in pos
    self._set_dirty()
  File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\wasabi2d\primitives\base.py", line 174, in _set_dirty
    self.layer._dirty.add(self)
AttributeError: 'int' object has no attribute '_dirty'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant