aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-03-26 11:28:34 +0100
committerrubenwardy <rw@rubenwardy.com>2018-03-26 11:28:34 +0100
commit05444e8018763def07e034513ec8f232d26bedd4 (patch)
tree1d7e1afd58f642dadae50ef30ee430bd2cc1d4dc /setup.py
parentc19f93e36db24303b77757d5cfe6c9ec2aaee30e (diff)
downloadcheatdb-05444e8018763def07e034513ec8f232d26bedd4.tar.xz
Add tags
Fixes #4
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index a6a5568..e5a4240 100644
--- a/setup.py
+++ b/setup.py
@@ -34,12 +34,23 @@ if not os.path.isfile("db.sqlite"):
sam.rank = UserRank.EDITOR
db.session.add(sam)
+ tags = {}
+ for tag in ["Inventory", "Mapgen", "Building", \
+ "Animals, monsters and NPCs", "Tools", "Player effects", \
+ "Environment", "Transport", "Maintenance", "Plants and farming", \
+ "Player vs Player", "Survival", "Creative", "Puzzle", "Multiplayer focused"]:
+ row = Tag(tag)
+ tags[row.getName()] = row
+ db.session.add(row)
+
+
mod1 = Package()
mod1.approved = True
mod1.name = "awards"
mod1.title = "Awards"
mod1.type = PackageType.MOD
mod1.author = ruben
+ mod1.tags.append(tags["player_effects"])
mod1.repo = "https://github.com/rubenwardy/awards"
mod1.issueTracker = "https://github.com/rubenwardy/awards/issues"
mod1.forums = 4870
@@ -70,6 +81,7 @@ awards.register_achievement("award_mesefind",{
mod2.approved = True
mod2.name = "mesecons"
mod2.title = "Mesecons"
+ mod2.tags.append(tags["tools"])
mod2.type = PackageType.MOD
mod2.author = jeija
mod2.repo = "https://github.com/minetest-mods/mesecons/"
@@ -169,6 +181,9 @@ No warranty is provided, express or implied, for any part of the project.
game1.title = "Capture The Flag"
game1.type = PackageType.GAME
game1.author = ruben
+ game1.tags.append(tags["player_vs_player"])
+ game1.tags.append(tags["survival"])
+ game1.tags.append(tags["multiplayer_focused"])
game1.repo = "https://github.com/rubenwardy/capturetheflag"
game1.issueTracker = "https://github.com/rubenwardy/capturetheflag/issues"
game1.forums = 12835
@@ -182,7 +197,6 @@ Uses the CTF PvP Engine.
db.session.add(game1)
-
db.session.commit()
else:
print("Database already exists")