From 2d593809d7022b8c405968d05ac819f5fcfd5684 Mon Sep 17 00:00:00 2001 From: Dominik Madarasz Date: Wed, 29 May 2024 17:50:42 +0200 Subject: [PATCH] move queries --- art/queries/{ => eco2d}/blocks.sql | 0 art/queries/{ => eco2d}/items.sql | 0 art/queries/eco2d/readme.txt | 1 + art/queries/{ => eco2d}/recipes.sql | 0 art/queries/{ => eco2d}/resources.sql | 0 art/queries/{ => eco2d}/tables.sql | 0 code/foundation/src/models/database.c | 10 +++++----- 7 files changed, 6 insertions(+), 5 deletions(-) rename art/queries/{ => eco2d}/blocks.sql (100%) rename art/queries/{ => eco2d}/items.sql (100%) create mode 100644 art/queries/eco2d/readme.txt rename art/queries/{ => eco2d}/recipes.sql (100%) rename art/queries/{ => eco2d}/resources.sql (100%) rename art/queries/{ => eco2d}/tables.sql (100%) diff --git a/art/queries/blocks.sql b/art/queries/eco2d/blocks.sql similarity index 100% rename from art/queries/blocks.sql rename to art/queries/eco2d/blocks.sql diff --git a/art/queries/items.sql b/art/queries/eco2d/items.sql similarity index 100% rename from art/queries/items.sql rename to art/queries/eco2d/items.sql diff --git a/art/queries/eco2d/readme.txt b/art/queries/eco2d/readme.txt new file mode 100644 index 0000000..de1375a --- /dev/null +++ b/art/queries/eco2d/readme.txt @@ -0,0 +1 @@ +Only modify these for eco2d game specifically! diff --git a/art/queries/recipes.sql b/art/queries/eco2d/recipes.sql similarity index 100% rename from art/queries/recipes.sql rename to art/queries/eco2d/recipes.sql diff --git a/art/queries/resources.sql b/art/queries/eco2d/resources.sql similarity index 100% rename from art/queries/resources.sql rename to art/queries/eco2d/resources.sql diff --git a/art/queries/tables.sql b/art/queries/eco2d/tables.sql similarity index 100% rename from art/queries/tables.sql rename to art/queries/eco2d/tables.sql diff --git a/code/foundation/src/models/database.c b/code/foundation/src/models/database.c index f6fa60b..c40a812 100644 --- a/code/foundation/src/models/database.c +++ b/code/foundation/src/models/database.c @@ -38,13 +38,13 @@ bool db_init() { if (new_db) { zpl_printf("[INFO] Creating new database...\n"); - db_exec_file("art/queries/tables.sql"); + db_exec_file("art/queries/eco2d/tables.sql"); assets_db_init(); - db_exec_file("art/queries/resources.sql"); - db_exec_file("art/queries/blocks.sql"); - db_exec_file("art/queries/recipes.sql"); - db_exec_file("art/queries/items.sql"); + db_exec_file("art/queries/eco2d/resources.sql"); + db_exec_file("art/queries/eco2d/blocks.sql"); + db_exec_file("art/queries/eco2d/recipes.sql"); + db_exec_file("art/queries/eco2d/items.sql"); } // initialise models db