Skip to content

Commit

Permalink
missing file
Browse files Browse the repository at this point in the history
fix test
living room image for tea party
  • Loading branch information
neph1 committed Jan 1, 2024
1 parent c7fbe47 commit 29108cf
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
Binary file added stories/teaparty/resources/living_room.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions stories/teaparty/story_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"context": "The player is having tea in the Mad Hatter's house, as Alice. The guests are all mad in their own way, and making sense of anything is difficult.",
"type": "A whimsical and humoristic tale of tea and madness. Guests are so busy with their own problems that it's difficult to make yourself heard.",
"world_info": "",
"world_mood": 0
}
"world_mood": 0,
"custom_resources" : "True"
}
7 changes: 7 additions & 0 deletions tale/resources_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

import os
from tale.image_gen.base_gen import ImageGeneratorBase

def pad_text_for_avatar(text: str, npc_name: str) -> str:
"""Pad text for NPC output."""
return npc_name + ' <:> ' + text if npc_name else text

def check_file_exists_in_resources(file_name) -> str:
file_path = os.path.join(os.path.dirname('tale/web/resources/'), file_name + '.jpg')
if os.path.exists(file_path):
return file_name
return None
Binary file added tale/web/unknown_location.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion tests/test_mudobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from tale.shop import Shopkeeper
from tale.tio.iobase import strip_text_styles
from tale.util import Context, MoneyFormatter
from tale.zone import Zone
from tests.supportstuff import FakeDriver, MsgTraceNPC, Wiretap


Expand Down Expand Up @@ -414,9 +415,14 @@ def test_exits(self):

def test_go_through_exit(self):
driver = FakeDriver()
driver.story = DynamicStory()
story = DynamicStory()
zone = Zone("zone")
hall = Location("hall")
attic = Location("attic")
story.add_zone(zone)
story.add_location(hall, zone.name)
story.add_location(attic, zone.name)
driver.story = story
exit1 = Exit("ladder1", attic, "exit 1 to attic", enter_msg="entering the attic via exit 1")
exit2 = Exit("ladder2", attic, "exit 2 to attic")
door = Door("door1", attic, "Door to attic", enter_msg="entering the attic via door", opened=True)
Expand Down

0 comments on commit 29108cf

Please sign in to comment.