Skip to content

Commit

Permalink
Rename commands "muffin" to "bakery"
Browse files Browse the repository at this point in the history
  • Loading branch information
skybaks committed Jun 14, 2024
1 parent 802f0cf commit e4a999d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ python -m pip install --upgrade pyplanet-muffins
Add the following to you pyplanet apps.py

```
'skybaks.muffins',
'skybaks.muffins',
```

## Commands

|Command|Description|
|---|---|
| //muffin <login or nickname> | Bakes a brand new muffin and gives it to the player specified by login or nickname. Only available to admins. |
| /muffin eat | Eat one of your muffins. Available to all players |
| /muffin brag | Show off one of your rarest muffins. Available to all players |
| /muffin give <login or nickname> | Give one of your muffins to the player specified by login or nickname. Available to all players. |
| //bakery <login or nickname> | Bakes a brand new muffin and gives it to the player specified by login or nickname. Only available to admins. |
| /bakery eat | Eat one of your muffins. Available to all players |
| /bakery brag | Show off one of your rarest muffins. Available to all players |
| /bakery give <login or nickname> | Give one of your muffins to the player specified by login or nickname. Available to all players. |
12 changes: 6 additions & 6 deletions skybaks/muffins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def __init__(self, *args, **kwargs):
async def on_start(self):
await self.instance.permission_manager.register('baking', 'Allowed to bake muffins in the bakery', app=self, min_level=2, namespace='muffin')
await self.instance.command_manager.register(
Command(command='muffin', aliases=[], target=self.bake_muffin, admin=True, perms='muffin:baking', description='Bake a muffin for a player')
Command(command='bakery', aliases=[], target=self.bake_muffin, admin=True, perms='muffin:baking', description='Bake a muffin for a player')
.add_param(name='player', nargs='*', type=str, required=True),
Command(command='eat', aliases=[], target=self.eat_muffin, namespace='muffin', description='Eat one of your muffins... yummy!'),
Command(command='brag', aliases=[], target=self.brag_muffin, namespace='muffin', description='Show off one of your rarest muffins. Guaranteed to make everyone jealous!'),
Command(command='give', aliases=[], target=self.give_muffin, namespace='muffin', description='Give one of your muffins to another player. How magnanimous of you!')
Command(command='eat', aliases=[], target=self.eat_muffin, namespace='bakery', description='Eat one of your muffins... yummy!'),
Command(command='brag', aliases=[], target=self.brag_muffin, namespace='bakery', description='Show off one of your rarest muffins. Guaranteed to make everyone jealous!'),
Command(command='give', aliases=[], target=self.give_muffin, namespace='bakery', description='Give one of your muffins to another player. How magnanimous of you!')
.add_param(name='player', nargs='*', type=str, required=True),
)

Expand All @@ -41,7 +41,7 @@ async def bake_muffin(self, player: Player, data, **kwargs) -> None:
muffin = roll_muffin()
muffin_text = await self._get_muffin_text(muffin)
await self.instance.chat(f'$ff0$<$fff{player.nickname}$> » {muffin_text} for $<$fff{target_player.nickname}$>')
await self.instance.chat(f'$0cfYou received a muffin! Use $<$fff/muffin eat$> to eat it, $<$fff/muffin brag$> to show off, or $<$fff/muffin give$> to give it to another player', target_player.login)
await self.instance.chat(f'$0cfYou received a muffin! Use $<$fff/bakery eat$> to eat it, $<$fff/bakery brag$> to show off, or $<$fff/bakery give$> to give it to another player', target_player.login)

logger.debug('Create new entry for muffin')
try:
Expand All @@ -65,7 +65,7 @@ async def give_muffin(self, player: Player, data, **kwargs) -> None:
muffin = Muffin.from_playermuffin(player_muffin)
muffin_text = await self._get_muffin_text(muffin)
await self.instance.chat(f'$ff0$<$fff{player.nickname}$> gives their $<$fff{muffin_text}$> to $<$fff{target_player.nickname}$>')
await self.instance.chat(f'$0cfYou received a muffin! Use $<$fff/muffin eat$> to eat it, $<$fff/muffin brag$> to show off, or $<$fff/muffin give$> to give it to another player', target_player.login)
await self.instance.chat(f'$0cfYou received a muffin! Use $<$fff/bakery eat$> to eat it, $<$fff/bakery brag$> to show off, or $<$fff/bakery give$> to give it to another player', target_player.login)

logger.debug('Updating the login of muffin with id ' + str(player_muffin.id))
try:
Expand Down

0 comments on commit e4a999d

Please sign in to comment.