Allow Dabbler's Room to incorporate the Fire status.
This commit is contained in:
parent
a408169bcc
commit
056162d820
3 changed files with 18 additions and 19 deletions
|
|
@ -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):
|
def hunger(self):
|
||||||
if self.db.hunger_level < Hunger.RAVENOUS.value:
|
if self.db.hunger_level < Hunger.RAVENOUS.value:
|
||||||
return Hunger.RAVENOUS
|
return Hunger.RAVENOUS
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ from evennia.prototypes.spawner import spawn
|
||||||
|
|
||||||
from .objects import LightSource
|
from .objects import LightSource
|
||||||
from .drinkables import TEACUP_DESCS
|
from .drinkables import TEACUP_DESCS
|
||||||
|
from .pets import Hunger
|
||||||
from commands.drinkables import CmdSetTrolley
|
from commands.drinkables import CmdSetTrolley
|
||||||
from utils.word_list import routput, character_has, Token
|
from utils.word_list import routput, character_has, Token
|
||||||
|
|
||||||
|
|
@ -313,3 +314,18 @@ class DabblersRoom(Room):
|
||||||
cup = spawn(cuptype)[0]
|
cup = spawn(cuptype)[0]
|
||||||
cup.location = caller
|
cup.location = caller
|
||||||
caller.msg("You pick up a teacup.")
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import random
|
import random
|
||||||
from .rooms import DefaultRoom
|
from .rooms import Room
|
||||||
|
|
||||||
from evennia import (
|
from evennia import (
|
||||||
TICKER_HANDLER,
|
TICKER_HANDLER,
|
||||||
|
|
@ -111,7 +111,7 @@ def watches(now=None):
|
||||||
def choose_weather_message():
|
def choose_weather_message():
|
||||||
return random.choice(TIMEBASE_WEATHER_MSGS[watches()])
|
return random.choice(TIMEBASE_WEATHER_MSGS[watches()])
|
||||||
|
|
||||||
class TimeWeatherRoom(DefaultRoom):
|
class TimeWeatherRoom(Room):
|
||||||
"""
|
"""
|
||||||
This sets up an outdoor room typeclass. At irregular intervals,
|
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.
|
the effects of weather will show in the room based on the time of day.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue