1 import os, sys, datetime
3 if not "FLASK_CONFIG" in os.environ:
4 os.environ["FLASK_CONFIG"] = "../config.cfg"
6 delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d"
8 if delete_db and os.path.isfile("db.sqlite"):
11 if not os.path.isfile("db.sqlite"):
12 from app.models import *
14 print("Creating database tables...")
16 print("Filling database...")
18 ruben = User("rubenwardy")
19 ruben.github_username = "rubenwardy"
20 ruben.rank = UserRank.ADMIN
24 ez.github_username = "Ezhh"
25 ez.rank = UserRank.EDITOR
29 jeija.github_username = "Jeija"
32 sam = User("fillthisinlater")
33 sam.github_username = "fillthisinlater"
34 sam.rank = UserRank.EDITOR
38 for tag in ["Inventory", "Mapgen", "Building", \
39 "Mobs and NPCs", "Tools", "Player effects", \
40 "Environment", "Transport", "Maintenance", "Plants and farming", \
41 "PvP", "PvE", "Survival", "Creative", "Puzzle", "Multiplayer", "Singleplayer"]:
49 for license in ["LGPLv2.1", "LGPLv3", "GPLv2.1", "GPLv3", "AGPLv2.1", "AGPLv3",
50 "MIT", "Apache", "BSD", "ZLib", "CC0", "CC-BY-SA", "CC-BY", "CC-BY-NC-SA"]:
51 row = License(license)
52 licenses[row.name] = row
59 mod1.license = licenses["LGPLv2.1"]
60 mod1.type = PackageType.MOD
62 mod1.tags.append(tags["player_effects"])
63 mod1.repo = "https://github.com/rubenwardy/awards"
64 mod1.issueTracker = "https://github.com/rubenwardy/awards/issues"
66 mod1.shortDesc = "Adds achievements and an API to register new ones."
68 Majority of awards are back ported from Calinou's old fork in Carbone, under same license.
71 awards.register_achievement("award_mesefind",{
72 title = "First Mese Find",
73 description = "Found some Mese!",
75 type = "dig", -- award is given when
76 node = "default:mese", -- this type of node has been dug
77 target = 1, -- this number of times
83 rel = PackageRelease()
86 rel.url = "https://github.com/rubenwardy/awards/archive/master.zip"
92 mod2.name = "mesecons"
93 mod2.title = "Mesecons"
94 mod2.tags.append(tags["tools"])
95 mod2.type = PackageType.MOD
96 mod2.license = licenses["LGPLv3"]
98 mod2.repo = "https://github.com/minetest-mods/mesecons/"
99 mod2.issueTracker = "https://github.com/minetest-mods/mesecons/issues"
101 mod2.shortDesc = "Mesecons adds everything digital, from all kinds of sensors, switches, solar panels, detectors, pistons, lamps, sound blocks to advanced digital circuitry like logic gates and programmable blocks."
103 ########################################################################
104 ## __ __ _____ _____ _____ _____ _____ _ _ _____ ##
105 ## | \ / | | ___| | ___| | ___| | ___| | _ | | \ | | | ___| ##
106 ## | \/ | | |___ | |___ | |___ | | | | | | | \| | | |___ ##
107 ## | |\__/| | | ___| |___ | | ___| | | | | | | | | |___ | ##
108 ## | | | | | |___ ___| | | |___ | |___ | |_| | | |\ | ___| | ##
109 ## |_| |_| |_____| |_____| |_____| |_____| |_____| |_| \_| |_____| ##
111 ########################################################################
113 MESECONS by Jeija and contributors
117 [Mesecons](http://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Minetest's gameplay.
119 Mesecons is a mod for [Minetest](http://minetest.net/) that implements a ton of items related to digital circuitry, such as wires, buttons, lights, and even programmable controllers. Among other things, there are also pistons, solar panels, pressure plates, and note blocks.
121 Mesecons has a similar goal to Redstone in Minecraft, but works in its own way, with different rules and mechanics.
127 [DOWNLOAD IT NOW](https://github.com/minetest-mods/mesecons/archive/master.zip)
129 Now go ahead and install it like any other Minetest mod. Don't know how? Check out [the wonderful page about it](http://wiki.minetest.com/wiki/Mods) over at the Minetest Wiki. For your convenience, here's a quick summary:
131 1. If Mesecons is still in a ZIP file, extract the folder inside to somewhere on the computer.
132 2. Make sure that when you open the folder, you can directly find `README.md` in the listing. If you just see another folder, move that folder up one level and delete the old one.
133 3. Open up the Minetest mods folder - usually `/mods/`. If you see the `minetest` or folder inside of that, that is your mod folder instead.
134 4. Copy the Mesecons folder into the mods folder.
136 Don't like some parts of Mesecons? Open up the Mesecons folder and delete the subfolder containing the mod you don't want. If you didn't want movestones, for example, all you have to do is delete the `mesecons_movestones` folder and they will no longer be available.
138 There are no dependencies - it will work right after installing!
140 How do I use this thing?
141 ------------------------
142 How about a [quick overview video](https://www.youtube.com/watch?v=6kmeQj6iW5k)?
144 Or maybe a [comprehensive reference](http://mesecons.net/items.html) is your style?
146 An overview for the very newest of new beginners? How does [this one](http://uberi.mesecons.net/projects/MeseconsBasics/index.html) look?
148 Want to get more into building? Why not check out the [Mesecons Laboratory](http://uberi.mesecons.net/), a website dedicated to advanced Mesecons builders?
150 Want to contribute to Mesecons itself? Check out the [source code](https://github.com/minetest-mods/mesecons)!
152 Who wrote it anyways?
153 ---------------------
154 These awesome people made Mesecons possible!
156 | Contributor | Contribution |
157 | --------------- | -------------------------------- |
158 | Hawk777 | Code for VoxelManip caching |
159 | Jat15 | Various tweaks. |
160 | Jeija | **Main developer! Everything.** |
161 | Jordach | Noteblock sounds. |
162 | khonkhortistan | Code, recipes, textures. |
163 | Kotolegokot | Nodeboxes for items. |
164 | minerd247 | Textures. |
165 | Nore/Novatux | Code. |
166 | RealBadAngel | Fixes, improvements. |
167 | sfan5 | Code, recipes, textures. |
168 | suzenako | Piston sounds. |
169 | Uberi/Temperest | Code, textures, documentation. |
170 | VanessaE | Code, recipes, textures, design. |
171 | Whiskers75 | Logic gates implementation. |
173 There are also a whole bunch of other people helping with everything from code to testing and feedback. Mesecons would also not be possible without their help!
175 Alright, how can I use it?
176 --------------------------
177 All textures in this project are licensed under the CC-BY-SA 3.0 (Creative Commons Attribution-ShareAlike 3.0 Generic). That means you can distribute and remix them as much as you want to, under the condition that you give credit to the authors and the project, and that if you remix and release them, they must be under the same or similar license to this one.
179 All code in this project is licensed under the LGPL version 3 or later. That means you have unlimited freedom to distribute and modify the work however you see fit, provided that if you decide to distribute it or any modified versions of it, you must also use the same license. The LGPL also grants the additional freedom to write extensions for the software and distribute them without the extensions being subject to the terms of the LGPL, although the software itself retains its license.
181 No warranty is provided, express or implied, for any part of the project.
190 mod.name = "handholds"
191 mod.title = "Mountain Climbing"
192 mod.license = licenses["MIT"]
193 mod.type = PackageType.MOD
195 mod.tags.append(tags["player_effects"])
196 mod.repo = "https://github.com/ezhh/handholds"
197 mod.issueTracker = "https://github.com/ezhh/handholds/issues"
199 mod.shortDesc = "Adds hand holds and climbing thingies"
200 mod.desc = "This is the long desc"
203 rel = PackageRelease()
206 rel.url = "https://github.com/ezhh/handholds/archive/master.zip"
212 mod.name = "other_worlds"
213 mod.title = "Other Worlds"
214 mod.license = licenses["MIT"]
215 mod.type = PackageType.MOD
217 mod.tags.append(tags["mapgen"])
218 mod.tags.append(tags["environment"])
219 mod.repo = "https://github.com/ezhh/other_worlds"
220 mod.issueTracker = "https://github.com/ezhh/other_worlds/issues"
222 mod.shortDesc = "Adds space with asteroids and comets"
223 mod.desc = "This is the long desc"
230 mod.license = licenses["LGPLv2.1"]
231 mod.type = PackageType.MOD
233 mod.tags.append(tags["player_effects"])
234 mod.repo = "https://github.com/rubenwardy/food/"
235 mod.issueTracker = "https://github.com/rubenwardy/food/issues/"
237 mod.shortDesc = "Adds lots of food and an API to manage ingredients"
238 mod.desc = "This is the long desc"
243 mod.name = "food_sweet"
244 mod.title = "Sweet Foods"
245 mod.license = licenses["CC0"]
246 mod.type = PackageType.MOD
248 mod.tags.append(tags["player_effects"])
249 mod.repo = "https://github.com/rubenwardy/food_sweet/"
250 mod.issueTracker = "https://github.com/rubenwardy/food_sweet/issues/"
252 mod.shortDesc = "Adds sweet food"
253 mod.desc = "This is the long desc"
257 game1.approved = True
258 game1.name = "capturetheflag"
259 game1.title = "Capture The Flag"
260 game1.type = PackageType.GAME
261 game1.license = licenses["LGPLv2.1"]
263 game1.tags.append(tags["pvp"])
264 game1.tags.append(tags["survival"])
265 game1.tags.append(tags["multiplayer"])
266 game1.repo = "https://github.com/rubenwardy/capturetheflag"
267 game1.issueTracker = "https://github.com/rubenwardy/capturetheflag/issues"
269 game1.shortDesc = "Two teams battle to snatch and return the enemy's flag, before the enemy takes their own!"
271 As seen on the Capture the Flag server (minetest.rubenwardy.com:30000)
273 Uses the CTF PvP Engine.
276 db.session.add(game1)
278 rel = PackageRelease()
281 rel.url = "https://github.com/rubenwardy/capturetheflag/archive/master.zip"
287 print("Database already exists")