diff --git a/commands/misc.py b/commands/misc.py index 65fa256..5439a95 100755 --- a/commands/misc.py +++ b/commands/misc.py @@ -97,7 +97,7 @@ class CmdLight(Command): burnables = lighter.search(item, location=lighter, quiet=True) if burnables and len(burnables) > 0: try: - burnables[0].do_light() + burnables[0].do_light(self.caller) except Exception: lighter.msg(f"The {burnables[0].key} isn't flammable.") else: diff --git a/typeclasses/lightables.py b/typeclasses/lightables.py index 11bc73b..5366714 100755 --- a/typeclasses/lightables.py +++ b/typeclasses/lightables.py @@ -73,16 +73,15 @@ class LightSource(Object): pass self.delete() - def do_light(self): + def do_light(self, owner): """ Light this object - this is called by Light command. """ - owner = self.location if self.db.is_giving_light: owner.msg(f"The {self.key} is already lit.") return False - else: - owner.announce_action(f"$You() $conj(light) $pron(your) {self.key}.") + + owner.announce_action(f"$You() $conj(light) $pron(your) {self.key}.") self.db.is_giving_light = True if self.db.desc_lit: diff --git a/typeclasses/things.py b/typeclasses/things.py index 5534012..23c8902 100755 --- a/typeclasses/things.py +++ b/typeclasses/things.py @@ -268,8 +268,9 @@ class Pipe(Object): self.cmdset.add_default(CmdSetSmoke) def do_light(self, lighter): - msg = choices(self.db.light_msg or "$You() $conj(pack) and $conj(light) $pron(your) pipe. You can now |Glook|n around.") + msg = choices(self.db.light_msg or "$You() $conj(pack) and $conj(light) $pron(your) pipe.") lighter.announce_action(msg) + self.db.is_giving_light = True def do_smoke(self, smoker): msg = choices(self.db.smoke_msg or "$You() << $conj(lean) back and ^ >> << $conj(puff) ^ $conj(smoke) >> $pron(your) pipe.")