Allow Dabbler's Room to incorporate the Fire status.

This commit is contained in:
Howard Abrams 2025-02-05 21:01:18 -08:00
parent a408169bcc
commit 056162d820
3 changed files with 18 additions and 19 deletions

View file

@ -61,23 +61,6 @@ class Pet(Object):
]
}
hungry_rate = -1
hunger_states = {
Hunger.RAVENOUS: [
"looks crazy with hunger",
],
Hunger.HUNGRY: [
"looks hungry",
"seems hungry",
],
Hunger.FED: "looks well",
Hunger.FULL: [
"looks content",
"looks sated",
]
}
def hunger(self):
if self.db.hunger_level < Hunger.RAVENOUS.value:
return Hunger.RAVENOUS

View file

@ -11,6 +11,7 @@ from evennia.prototypes.spawner import spawn
from .objects import LightSource
from .drinkables import TEACUP_DESCS
from .pets import Hunger
from commands.drinkables import CmdSetTrolley
from utils.word_list import routput, character_has, Token
@ -313,3 +314,18 @@ class DabblersRoom(Room):
cup = spawn(cuptype)[0]
cup.location = caller
caller.msg("You pick up a teacup.")
def get_display_desc(self, looker):
fire = self.search("fire")
full_desc = self.db.initial_desc
if fire.hunger() == Hunger.RAVENOUS:
full_desc += " " + self.db.fire_out
elif fire.hunger() == Hunger.HUNGRY:
full_desc += " " + self.db.fire_dim
elif fire.hunger() == Hunger.FULL:
full_desc += " " + self.db.fire_full
else:
full_desc += " " + self.db.fire_on
full_desc += " " + self.db.final_desc
return full_desc

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python
import random
from .rooms import DefaultRoom
from .rooms import Room
from evennia import (
TICKER_HANDLER,
@ -111,7 +111,7 @@ def watches(now=None):
def choose_weather_message():
return random.choice(TIMEBASE_WEATHER_MSGS[watches()])
class TimeWeatherRoom(DefaultRoom):
class TimeWeatherRoom(Room):
"""
This sets up an outdoor room typeclass. At irregular intervals,
the effects of weather will show in the room based on the time of day.