Add ISC license and code cleanup
This commit is contained in:
		
							parent
							
								
									3b4f2ddd1a
								
							
						
					
					
						commit
						471720b56e
					
				
							
								
								
									
										15
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					ISC License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2017, Jacob Funke
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
@ -189,7 +189,7 @@ class CursedMenu(object):
 | 
				
			|||||||
        # don't allow negative value
 | 
					        # don't allow negative value
 | 
				
			||||||
        water_left_pct = max(0, water_left_pct)
 | 
					        water_left_pct = max(0, water_left_pct)
 | 
				
			||||||
        water_left = int(math.ceil(water_left_pct * 10))
 | 
					        water_left = int(math.ceil(water_left_pct * 10))
 | 
				
			||||||
        water_string = "(" + (")" * water_left) + ("." * (10 - water_left)) + ") " + str(int(water_left_pct * 100)) + "%"
 | 
					        water_string = "(" + (")" * water_left) + ("." * (10 - water_left)) + ") " + str(int(water_left_pct * 100)) + "% "
 | 
				
			||||||
        return water_string
 | 
					        return water_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -441,14 +441,15 @@ class CursedMenu(object):
 | 
				
			|||||||
        # Draw instructions on screen
 | 
					        # Draw instructions on screen
 | 
				
			||||||
        self.clear_info_pane()
 | 
					        self.clear_info_pane()
 | 
				
			||||||
        if self.infotoggle != 4:
 | 
					        if self.infotoggle != 4:
 | 
				
			||||||
            instructions_txt = """welcome to botany. you've been given a seed
 | 
					            instructions_txt = ("welcome to botany. you've been given a seed\n"
 | 
				
			||||||
that will grow into a beautiful plant. check
 | 
					                                "that will grow into a beautiful plant. check\n"
 | 
				
			||||||
in and water your plant every 24h to keep it
 | 
					                                "in and water your plant every 24h to keep it\n"
 | 
				
			||||||
growing. 5 days without water = death. your
 | 
					                                "growing. 5 days without water = death. your\n"
 | 
				
			||||||
plant depends on you to live! more info is
 | 
					                                "plant depends on you to live! more info is\n"
 | 
				
			||||||
available in the readme :)
 | 
					                                "available in the readme :)\n"
 | 
				
			||||||
                               cheers,
 | 
					                                "                               cheers,\n"
 | 
				
			||||||
                               curio"""
 | 
					                                "                               curio\n"
 | 
				
			||||||
 | 
					                                )
 | 
				
			||||||
            self.draw_info_text(instructions_txt)
 | 
					            self.draw_info_text(instructions_txt)
 | 
				
			||||||
            self.infotoggle = 4
 | 
					            self.infotoggle = 4
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user