moss-n-puddles/commands/feedables.py
Howard Abrams 245a1bb389 Refactored code
Cleaned up flake8 warnings
2025-03-05 21:54:41 -08:00

26 lines
575 B
Python
Executable file

#!/usr/bin/env python
from commands.command import Command
from evennia import CmdSet
class CmdFeed(Command):
"""
Feed or give something to an object that can eat.
Typically this is used to feed wood to a fire, or
berries to a beast.
"""
key = "feed"
def func(self):
args = self.args.strip()
if not args:
self.caller.msg("Feed what?")
return
print(self.obj.key)
self.obj.feed(self.caller, self.args)
class CmdFeedSet(CmdSet):
def at_cmdset_creation(self):
self.add(CmdFeed)