Add images to the beginnning of rooms
This commit is contained in:
parent
cef7bab8a2
commit
303c78f3be
2 changed files with 15 additions and 1 deletions
|
|
@ -83,6 +83,13 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom, Listener):
|
||||||
self.get_time_of_day(), self.get_season())
|
self.get_time_of_day(), self.get_season())
|
||||||
|
|
||||||
def get_display_header(self, looker, **kwargs):
|
def get_display_header(self, looker, **kwargs):
|
||||||
|
"""
|
||||||
|
Possibly send an image to webclients.
|
||||||
|
"""
|
||||||
|
image = self.db.title_image
|
||||||
|
if image:
|
||||||
|
looker.msg(image=(f"https://www.howardabrams.com/cozy-players-guide/{image}",
|
||||||
|
{"type": "background-pane"}))
|
||||||
return "|n"
|
return "|n"
|
||||||
|
|
||||||
def get_display_footer(self, looker, **kwargs):
|
def get_display_footer(self, looker, **kwargs):
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ from evennia import (
|
||||||
CmdSet,
|
CmdSet,
|
||||||
TICKER_HANDLER,
|
TICKER_HANDLER,
|
||||||
)
|
)
|
||||||
|
from evennia.utils import delay
|
||||||
from evennia.prototypes.spawner import spawn
|
from evennia.prototypes.spawner import spawn
|
||||||
|
|
||||||
from typeclasses.npcs import CarriableNPC
|
from typeclasses.npcs import CarriableNPC
|
||||||
|
|
@ -158,7 +159,6 @@ class TutorBird(CarriableNPC):
|
||||||
"""
|
"""
|
||||||
Spawn the bird and attach it to character.
|
Spawn the bird and attach it to character.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
bird = spawn({
|
bird = spawn({
|
||||||
"typeclass": "typeclasses.tutorial.TutorBird",
|
"typeclass": "typeclasses.tutorial.TutorBird",
|
||||||
"key": "bird",
|
"key": "bird",
|
||||||
|
|
@ -166,6 +166,13 @@ class TutorBird(CarriableNPC):
|
||||||
"desc": "Gray feathered bird perched on your shoulder. It's large black eyes looks at you quizically. Its yellow cheeks are adorable, making it seem overly helpful.",
|
"desc": "Gray feathered bird perched on your shoulder. It's large black eyes looks at you quizically. Its yellow cheeks are adorable, making it seem overly helpful.",
|
||||||
})[0]
|
})[0]
|
||||||
bird.location = character
|
bird.location = character
|
||||||
|
delay(1, bird.display_image)
|
||||||
|
|
||||||
|
def display_image(self):
|
||||||
|
"""
|
||||||
|
Displays an image for the tutorial for the webclient.
|
||||||
|
"""
|
||||||
|
self.location.msg(image=("https://www.howardabrams.com/cozy-players-guide/bubba.jpg"))
|
||||||
|
|
||||||
def do_speak(self):
|
def do_speak(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue