Mercurial > mamba
changeset 558:73c4985bf726
Only attempt to place a sprite if there is a sprite class selected.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sun, 25 Sep 2011 23:32:56 +0200 |
parents | fda360905a1e |
children | 4c30776673c6 |
files | mamba/habitats/editor.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mamba/habitats/editor.py Thu Sep 22 17:38:44 2011 +0200 +++ b/mamba/habitats/editor.py Sun Sep 25 23:32:56 2011 +0200 @@ -507,7 +507,8 @@ self.level.restart() elif self.sprite_mode == 'Edit' and sprite: self.edit_sprite(tile_pos, sprite) - elif self.sprite_mode == 'Add' and sprite is None: + elif (self.sprite_mode == 'Add' and sprite is None + and self.sprite_cls is not None): self.edit_sprite(tile_pos, (self.sprite_cls_name, self.sprite_cls, None, [])) return True