From 67c8f3dfc81b85d5f77c756910dcffef2378f761 Mon Sep 17 00:00:00 2001 From: Jake Funke Date: Fri, 17 Mar 2017 22:03:32 +0000 Subject: [PATCH] ASCII art for plants now shown --- README.md | 12 +++++++----- art/agave1.txt | 10 ++++++++++ art/aloe1.txt | 10 ++++++++++ art/baobab1.txt | 10 ++++++++++ art/bee.txt | 12 ++++++++++++ art/brugmansia1.txt | 10 ++++++++++ art/cactus1.txt | 10 ++++++++++ art/cannabis1.txt | 10 ++++++++++ art/columbine1.txt | 10 ++++++++++ art/columbine3.txt | 10 ++++++++++ art/daffodil1.txt | 10 ++++++++++ art/fern1.txt | 10 ++++++++++ art/ficus1.txt | 10 ++++++++++ art/ficus2.txt | 10 ++++++++++ art/flytrap1.txt | 10 ++++++++++ art/iris1.txt | 10 ++++++++++ art/jadeplant1.txt | 10 ++++++++++ art/lithops1.txt | 10 ++++++++++ art/moon.txt | 7 +++++++ art/moss1.txt | 10 ++++++++++ art/moss2.txt | 10 ++++++++++ art/palm1.txt | 10 ++++++++++ art/pansy1.txt | 10 ++++++++++ art/poppy1.txt | 10 ++++++++++ art/sage1.txt | 10 ++++++++++ art/seed.txt | 10 ++++++++++ art/seedling.txt | 10 ++++++++++ art/snapdragon1.txt | 10 ++++++++++ art/sunflower1.txt | 10 ++++++++++ menu_screen.py | 39 ++++++++++++++++++++++++++++++++++++++- 30 files changed, 324 insertions(+), 6 deletions(-) create mode 100644 art/agave1.txt create mode 100644 art/aloe1.txt create mode 100644 art/baobab1.txt create mode 100644 art/bee.txt create mode 100644 art/brugmansia1.txt create mode 100644 art/cactus1.txt create mode 100644 art/cannabis1.txt create mode 100644 art/columbine1.txt create mode 100644 art/columbine3.txt create mode 100644 art/daffodil1.txt create mode 100644 art/fern1.txt create mode 100644 art/ficus1.txt create mode 100644 art/ficus2.txt create mode 100644 art/flytrap1.txt create mode 100644 art/iris1.txt create mode 100644 art/jadeplant1.txt create mode 100644 art/lithops1.txt create mode 100644 art/moon.txt create mode 100644 art/moss1.txt create mode 100644 art/moss2.txt create mode 100644 art/palm1.txt create mode 100644 art/pansy1.txt create mode 100644 art/poppy1.txt create mode 100644 art/sage1.txt create mode 100644 art/seed.txt create mode 100644 art/seedling.txt create mode 100644 art/snapdragon1.txt create mode 100644 art/sunflower1.txt diff --git a/README.md b/README.md index fd53382..f6f0312 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # botany -![Screencap](http://tilde.town/~curiouser/botanybeta.png) +![Screencap](http://tilde.town/~curiouser/botanybeta2.png) by Jake Funke - jifunks@gmail.com - tilde.town/~curiouser - http://jakefunke.online/ @@ -11,9 +11,9 @@ Check in and water your plant every 24h to keep it growing. 5 days without water *(work in progress)* ## getting started -botany is designed for unix-based systems. Clone into a local directory using `git clone https://github.com/jifunks/botany.git`. +botany is designed for unix-based systems. Clone into a local directory using `$ git clone https://github.com/jifunks/botany.git`. -Run with `python botany.py`. +Run with `$ python botany.py`. *Note - botany.py must initially be run by the user who cloned/unzipped botany.py - this initalizes the shared data file permissions.* @@ -25,7 +25,8 @@ If your plant goes 5 days without water, it will die! ## features -* Curses-based menu system +* Curses-based menu system, optimized for 80x24 terminal +* ASCII art display of plant * Persistent aging system that allows your plant to grow even when app is closed * Community leaderboard (for shared unix servers) created in program directory `garden_file.json` * Data file is created in the user's home (~) directory, along with a JSON file that can be used in other apps. @@ -46,7 +47,7 @@ If your plant goes 5 days without water, it will die! * *Plant mutation happens more frequently than it will in final version.* ### to-dos -* Add ASCII plant display +* Add day/night ASCII art * Finish garden display ('garden' function) * Allows you to water neighbor's plants * Plant end of life (seeding/pollination) @@ -60,6 +61,7 @@ If your plant goes 5 days without water, it will die! ## requirements * Unix-based OS (Mac, Linux) * Python 2.x +* Recommended: 80x24 minimum terminal, fixed-width font ## credits * thank you tilde.town for inspiration! diff --git a/art/agave1.txt b/art/agave1.txt new file mode 100644 index 0000000..fd07ef2 --- /dev/null +++ b/art/agave1.txt @@ -0,0 +1,10 @@ + + + + . , , . + |\ |`, || /| ., + |\v| \v /|v/| |/ | + \| \\\/ /| / V / + \_| \ / / ,/ +. , _ .\ \ |,/_/., _ . + ^ ' ` ' diff --git a/art/aloe1.txt b/art/aloe1.txt new file mode 100644 index 0000000..e423c08 --- /dev/null +++ b/art/aloe1.txt @@ -0,0 +1,10 @@ + + + + + . . . + |\.,n/|./| + \\\/ /| / + '| \ / / +. , _ . .\ |,/_ ., _ . + ^ ' ` ' diff --git a/art/baobab1.txt b/art/baobab1.txt new file mode 100644 index 0000000..838e548 --- /dev/null +++ b/art/baobab1.txt @@ -0,0 +1,10 @@ + + + && & & & && + ^ \ | ^ | ^/ + ^|^ |^ ^|^/ + | * | + |. ; `| + | . | +. , _ .(. ) _ . + ^ ' ` ' diff --git a/art/bee.txt b/art/bee.txt new file mode 100644 index 0000000..f95ac18 --- /dev/null +++ b/art/bee.txt @@ -0,0 +1,12 @@ + _ + /_) +(8_))}- . + \_) '. + .--. . + : '. .' + '---'`; + . + _.' + .' + ' _ + '._. , ' `, . diff --git a/art/brugmansia1.txt b/art/brugmansia1.txt new file mode 100644 index 0000000..4d838c4 --- /dev/null +++ b/art/brugmansia1.txt @@ -0,0 +1,10 @@ + + + _. + //\\ //\ + } }\\ // \\ + \V/{ + || + ||{ +. , _ . ., || _ ., _ . + ^ ' ` ' diff --git a/art/cactus1.txt b/art/cactus1.txt new file mode 100644 index 0000000..bb8c0cd --- /dev/null +++ b/art/cactus1.txt @@ -0,0 +1,10 @@ + + + + + + _\_\/ + -( / )- + \_/ +. , _ . .,@@@ _ ., _ . + ^ ' ` ' diff --git a/art/cannabis1.txt b/art/cannabis1.txt new file mode 100644 index 0000000..6718fb0 --- /dev/null +++ b/art/cannabis1.txt @@ -0,0 +1,10 @@ + + + + ^ + l% + %\| _ + |/ % + %\| /% +. , _ . ., l/ _ ., _ . + ^ ' ` ' diff --git a/art/columbine1.txt b/art/columbine1.txt new file mode 100644 index 0000000..d8b6569 --- /dev/null +++ b/art/columbine1.txt @@ -0,0 +1,10 @@ + + + + + + \ | | / + | \|&| + &\/&/ +. , _ . ., &/ _ ., _ . + ^ ' ` ' diff --git a/art/columbine3.txt b/art/columbine3.txt new file mode 100644 index 0000000..bed357b --- /dev/null +++ b/art/columbine3.txt @@ -0,0 +1,10 @@ + + + + + + \ % / + | |% % + %\/ /% +. , _ . ., l/ _ ., _ . + ^ ' ` ' diff --git a/art/daffodil1.txt b/art/daffodil1.txt new file mode 100644 index 0000000..ee6f177 --- /dev/null +++ b/art/daffodil1.txt @@ -0,0 +1,10 @@ + + + + + \ + |/> + < | + \| +. , _ . ., l, _ ., _ . + ^ ' ` ' diff --git a/art/fern1.txt b/art/fern1.txt new file mode 100644 index 0000000..3941b0a --- /dev/null +++ b/art/fern1.txt @@ -0,0 +1,10 @@ + + + + + + \|/, + .\|/ |/ + \|/ l/ +. , _ . ., l /_ ., _ . + ^ ' ` ' diff --git a/art/ficus1.txt b/art/ficus1.txt new file mode 100644 index 0000000..9e57086 --- /dev/null +++ b/art/ficus1.txt @@ -0,0 +1,10 @@ + & \ & & + &\|,/ |/& && + &|/& / & & + \ { |___/_& + { {/ / & + `, \{______/_& + } }{ \_& + }{{ +. , , -=-~{ .-^- _ _ . + ^ ' diff --git a/art/ficus2.txt b/art/ficus2.txt new file mode 100644 index 0000000..01035d0 --- /dev/null +++ b/art/ficus2.txt @@ -0,0 +1,10 @@ + &&&\/& &&& + &\|,/ |/& && + &&/ / /_& && + \ { |_____/_& + { / / &&& + `, \{___________/_&& + } }{ \____& + }{{ `&\&& + {}{ && +. , , -=-~{ .-^- _ _ . diff --git a/art/flytrap1.txt b/art/flytrap1.txt new file mode 100644 index 0000000..7a7c243 --- /dev/null +++ b/art/flytrap1.txt @@ -0,0 +1,10 @@ + + + + + + + C % c + (\C/ +. , _ . ., l, _ ., _ . + ^ ' ` ' diff --git a/art/iris1.txt b/art/iris1.txt new file mode 100644 index 0000000..a47c26d --- /dev/null +++ b/art/iris1.txt @@ -0,0 +1,10 @@ + + + + _, . , + / \ \V / /\ + |\ \\v/ |` + /\ v ||/ \ + \\v// +. , _ . .,\V/ _ ., _ . + ^ ' ` ' diff --git a/art/jadeplant1.txt b/art/jadeplant1.txt new file mode 100644 index 0000000..1cc1239 --- /dev/null +++ b/art/jadeplant1.txt @@ -0,0 +1,10 @@ + + + + + + . , + o%O %,o + \%o' +. , _ . ., l, _ ., _ . + ^ ' ` ' diff --git a/art/lithops1.txt b/art/lithops1.txt new file mode 100644 index 0000000..a67f0a5 --- /dev/null +++ b/art/lithops1.txt @@ -0,0 +1,10 @@ + + + + + + + + __ __ +. , _ . ( | ) ., _ . + ^ ' ` ' diff --git a/art/moon.txt b/art/moon.txt new file mode 100644 index 0000000..c493b4b --- /dev/null +++ b/art/moon.txt @@ -0,0 +1,7 @@ + _.._ + .' .-'` + / / + | | + \ '.___.; + '._ _.' + `` diff --git a/art/moss1.txt b/art/moss1.txt new file mode 100644 index 0000000..947ce65 --- /dev/null +++ b/art/moss1.txt @@ -0,0 +1,10 @@ + + + + /\ __ + _/ / \ + _/ / / `--. + __/ ' _ \_ \ + / / _/ ##- \ \ \ +._ / _ . .#### _|., _ .| + ^ ' ` ' diff --git a/art/moss2.txt b/art/moss2.txt new file mode 100644 index 0000000..f44714d --- /dev/null +++ b/art/moss2.txt @@ -0,0 +1,10 @@ + + + + /\ __ + _/##/ \ + _/ /##/####`--. + __/ ' _###\_ ### \ + / / #_/###-#\####\ \ +._ / _#########_|#,#_ .| + ^ ' ` ' diff --git a/art/palm1.txt b/art/palm1.txt new file mode 100644 index 0000000..8572e06 --- /dev/null +++ b/art/palm1.txt @@ -0,0 +1,10 @@ + + + + _ , . _ + / \`\ / /^\ + | /\ ||/ \ | + | /\||\ | + || +. , _ . .,|_| _ ., _ . + ^ ' ` ' diff --git a/art/pansy1.txt b/art/pansy1.txt new file mode 100644 index 0000000..73c87eb --- /dev/null +++ b/art/pansy1.txt @@ -0,0 +1,10 @@ + + + + + + \ o / + o| |o o + \/ / +. , _ . ., l/ _ ., _ . + ^ ' ` ' diff --git a/art/poppy1.txt b/art/poppy1.txt new file mode 100644 index 0000000..48c1a6e --- /dev/null +++ b/art/poppy1.txt @@ -0,0 +1,10 @@ + + + + O + | + \o + |o + \/ +. , _ . ., l, _ ., _ . + ^ ' ` ' diff --git a/art/sage1.txt b/art/sage1.txt new file mode 100644 index 0000000..b9cd9f1 --- /dev/null +++ b/art/sage1.txt @@ -0,0 +1,10 @@ + + + + + + '\+/` /` + '\|/`|/` + \|/ |/` +. , _ . . ,l-/`,., _ . + ^ ' ` ' diff --git a/art/seed.txt b/art/seed.txt new file mode 100644 index 0000000..4fb4b5c --- /dev/null +++ b/art/seed.txt @@ -0,0 +1,10 @@ + + + + + + + + +. , _ . . _ , _ ., _ . + ^ ' o ` ' diff --git a/art/seedling.txt b/art/seedling.txt new file mode 100644 index 0000000..3c4b3dd --- /dev/null +++ b/art/seedling.txt @@ -0,0 +1,10 @@ + + + + + + + . ; + \| +. , _ . ., l, _ ., _ . + ^ ' ` ' diff --git a/art/snapdragon1.txt b/art/snapdragon1.txt new file mode 100644 index 0000000..8ed5193 --- /dev/null +++ b/art/snapdragon1.txt @@ -0,0 +1,10 @@ + + + + + + |/ + \| + |/ + \| +. , _ . ., l, _ ., _ . + ^ ' ` ' diff --git a/art/sunflower1.txt b/art/sunflower1.txt new file mode 100644 index 0000000..cbe4ade --- /dev/null +++ b/art/sunflower1.txt @@ -0,0 +1,10 @@ + + + + O + \// + || + ||/ + \|| +. , _ . ., || _ ., _ . + ^ ' ` ' diff --git a/menu_screen.py b/menu_screen.py index e24fe65..388666a 100644 --- a/menu_screen.py +++ b/menu_screen.py @@ -106,6 +106,42 @@ class CursedMenu(object): self.screen.addstr(ypos+y,xpos,line, curses.A_NORMAL) # self.screen.refresh() + def draw_plant_ascii(self, this_plant): + ypos = 1 + xpos = int((self.maxx-37)/2 + 25) + plant_art_dict = { + 0: 'poppy', + 1: 'cactus', + 2: 'aloe', + 3: 'flytrap', + 4: 'jadeplant', + 5: 'fern', + 6: 'daffodil', + 7: 'sunflower', + 8: 'baobab', + 9: 'lithops', + 10: 'cannabis', + 11: 'pansy', + 12: 'iris', + 13: 'agave', + 14: 'ficus', + 15: 'moss', + 16: 'sage', + 17: 'snapdragon', + 18: 'columbine', + 19: 'brugmansia', + 20: 'palm', + } + + if this_plant.stage == 0: + self.ascii_render('seed.txt', ypos, xpos) + elif this_plant.stage == 1: + self.ascii_render('seedling.txt', ypos, xpos) + elif this_plant.stage >= 2: + # this_filename = plant_art_dict[this_plant.species]+str(this_plant.stage)+'.txt' + this_filename = plant_art_dict[this_plant.species]+'1.txt' + self.ascii_render(this_filename, ypos, xpos) + def draw_default(self): # draws default menu clear_bar = " " * (int(self.maxx*2/3)) @@ -140,7 +176,8 @@ class CursedMenu(object): self.screen.addstr(5,13, " - you can't water a dead plant :(", curses.A_NORMAL) # This draws cute ascii from files - self.ascii_render("bee.txt",-1,self.maxx-23) + self.draw_plant_ascii(self.plant) + # self.ascii_render("sun.txt",-2,self.maxx-14) def update_plant_live(self): # updates plant data on menu screen, live!