This should get us back on track (tested on ARCH Linux)

This commit is contained in:
Cedric
2023-07-27 18:07:02 +02:00
parent 5c158cf8a8
commit e4586a5834
23 changed files with 836 additions and 76 deletions
+9 -6
View File
@@ -23,16 +23,19 @@ class RecipeController:
self.items_controller = registry.get_instance("items_controller")
self.command_alias_service = registry.get_instance("command_alias_service")
def pre_start(self):
self.db.shared.exec("CREATE TABLE IF NOT EXISTS recipe ("
"id INT NOT NULL PRIMARY KEY, "
"name VARCHAR(50) NOT NULL, "
"author VARCHAR(50) NOT NULL, "
"recipe TEXT NOT NULL, "
"dt INT NOT NULL DEFAULT 0)")
def start(self):
self.command_alias_service.add_alias("r", "recipe")
self.command_alias_service.add_alias("tradeskill", "recipe")
self.db.exec("CREATE TABLE IF NOT EXISTS recipe ("
"id INT NOT NULL PRIMARY KEY, "
"name VARCHAR(50) NOT NULL, "
"author VARCHAR(50) NOT NULL, "
"recipe TEXT NOT NULL, "
"dt INT NOT NULL DEFAULT 0)")
self.db.create_view("recipe")
recipe_dir = os.path.dirname(os.path.realpath(__file__)) + "/recipes/"
recipes = self.db.query("SELECT id, dt FROM recipe")