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) burnables = lighter.search(item, location=lighter, quiet=True)
if burnables and len(burnables) > 0: if burnables and len(burnables) > 0:
try: try:
burnables[0].do_light() burnables[0].do_light(self.caller)
except Exception: except Exception:
lighter.msg(f"The {burnables[0].key} isn't flammable.") lighter.msg(f"The {burnables[0].key} isn't flammable.")
else: else:

View file

@ -73,16 +73,15 @@ class LightSource(Object):
pass pass
self.delete() self.delete()
def do_light(self): def do_light(self, owner):
""" """
Light this object - this is called by Light command. Light this object - this is called by Light command.
""" """
owner = self.location
if self.db.is_giving_light: if self.db.is_giving_light:
owner.msg(f"The {self.key} is already lit.") owner.msg(f"The {self.key} is already lit.")
return False 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 self.db.is_giving_light = True
if self.db.desc_lit: if self.db.desc_lit:

View file

@ -268,8 +268,9 @@ class Pipe(Object):
self.cmdset.add_default(CmdSetSmoke) self.cmdset.add_default(CmdSetSmoke)
def do_light(self, lighter): 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) lighter.announce_action(msg)
self.db.is_giving_light = True
def do_smoke(self, smoker): def do_smoke(self, smoker):
msg = choices(self.db.smoke_msg or "$You() << $conj(lean) back and ^ >> << $conj(puff) ^ $conj(smoke) >> $pron(your) pipe.") msg = choices(self.db.smoke_msg or "$You() << $conj(lean) back and ^ >> << $conj(puff) ^ $conj(smoke) >> $pron(your) pipe.")