Refactor code for readability and compatibility.

This commit is contained in:
Griatch 2017-01-27 00:19:27 +01:00
parent a09835049b
commit c6d9c0619e
43 changed files with 129 additions and 112 deletions

View file

@ -344,6 +344,7 @@ class LightSource(TutorialObject):
self.location.msg_contents("A %s on the floor flickers and dies." % self.key)
self.location.location.check_light_state()
except AttributeError:
# Mainly happens if we happen to be in a None location
pass
self.delete()
@ -364,6 +365,7 @@ class LightSource(TutorialObject):
# maybe we are directly in the room
self.location.check_light_state()
except AttributeError:
# we are in a None location
pass
finally:
# start the burn timer. When it runs out, self._burnout