Removed debugging and added clear weekly users cronjob

pull/8/head
Jake Funke 2018-03-11 14:23:00 -07:00
parent d22b7d4b33
commit 2644370a40
3 changed files with 14 additions and 3 deletions

View File

@ -123,8 +123,8 @@ class Plant(object):
def __init__(self, this_filename, generation=1): def __init__(self, this_filename, generation=1):
# Constructor # Constructor
self.plant_id = str(uuid.uuid4()) self.plant_id = str(uuid.uuid4())
# self.life_stages = (3600*24, (3600*24)*3, (3600*24)*10, (3600*24)*20, (3600*24)*30) self.life_stages = (3600*24, (3600*24)*3, (3600*24)*10, (3600*24)*20, (3600*24)*30)
self.life_stages = (2, 4, 6, 8, 10) # self.life_stages = (2, 4, 6, 8, 10)
self.stage = 0 self.stage = 0
self.mutation = 0 self.mutation = 0
self.species = random.randint(0,len(self.species_list)-1) self.species = random.randint(0,len(self.species_list)-1)

View File

@ -0,0 +1,11 @@
import os
import sqlite3
game_dir = os.path.dirname(os.path.realpath(__file__))
garden_db_path = os.path.join(game_dir, 'sqlite/garden_db.sqlite')
conn = sqlite3.connect(garden_db_path)
c = conn.cursor()
c.execute("DELETE FROM visitors")
print "Cleared weekly users"
conn.commit()
conn.close()

View File

@ -130,7 +130,7 @@ class CursedMenu(object):
# self.screen.refresh() # self.screen.refresh()
def draw_plant_ascii(self, this_plant): def draw_plant_ascii(self, this_plant):
ypos = 1 ypos = 0
xpos = int((self.maxx-37)/2 + 25) xpos = int((self.maxx-37)/2 + 25)
plant_art_list = this_plant.species_list plant_art_list = this_plant.species_list
if this_plant.dead == True: if this_plant.dead == True: