Show the plant you're visiting

pull/11/head
Ensis 2018-05-31 11:11:19 +02:00
parent 869c0f1a06
commit 34d46bd7c9
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import random
import getpass import getpass
import json import json
import sqlite3 import sqlite3
from data_manager import DataManager
class CursedMenu(object): class CursedMenu(object):
#TODO: name your plant #TODO: name your plant
@ -621,10 +622,14 @@ class CursedMenu(object):
if os.path.isfile(guest_visitor_file): if os.path.isfile(guest_visitor_file):
self.water_on_visit(guest_visitor_file) self.water_on_visit(guest_visitor_file)
self.screen.addstr(16, 2, "...you watered ~{}'s {}...".format(str(guest_garden), guest_plant_description)) self.screen.addstr(16, 2, "...you watered ~{}'s {}...".format(str(guest_garden), guest_plant_description))
guest_dm = DataManager(guest_garden)
guest_plant = guest_dm.load_plant()
self.draw_plant_ascii(guest_plant)
else: else:
self.screen.addstr(16, 2, "i can't seem to find directions to {}...".format(guest_garden)) self.screen.addstr(16, 2, "i can't seem to find directions to {}...".format(guest_garden))
self.screen.getch() self.screen.getch()
self.clear_info_pane() self.clear_info_pane()
self.draw_plant_ascii(self.this_plant)
def water_on_visit(self, guest_visitor_file): def water_on_visit(self, guest_visitor_file):
visitor_data = {} visitor_data = {}