We can now light a pipe.

Just an introduced bug.
This commit is contained in:
Howard Abrams 2025-07-22 22:32:50 -07:00
parent 25b38c4b3b
commit f7d5ed5418
3 changed files with 6 additions and 6 deletions

View file

@ -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:

View file

@ -73,15 +73,14 @@ 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}.")
self.db.is_giving_light = True

View file

@ -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.")