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.forums_username = "rubenwardy"
21 ruben.rank = UserRank.ADMIN
26 ez.github_username = "Ezhh"
27 ez.forums_username = "Shara"
28 ez.rank = UserRank.EDITOR
31 not1 = Notification(ruben, ez, "Awards approved", "/packages/rubenwardy/awards/")
35 jeija.github_username = "Jeija"
38 sam = User("fillthisinlater")
39 sam.github_username = "fillthisinlater"
40 sam.rank = UserRank.EDITOR
44 for tag in ["Inventory", "Mapgen", "Building", \
45 "Mobs and NPCs", "Tools", "Player effects", \
46 "Environment", "Transport", "Maintenance", "Plants and farming", \
47 "PvP", "PvE", "Survival", "Creative", "Puzzle", "Multiplayer", "Singleplayer"]:
54 for license in ["GPLv2.1", "GPLv3", "LGPLv2.1", "LGPLv3", "AGPLv2.1", "AGPLv3",
55 "Apache", "BSD 3-Clause", "BSD 2-Clause", "CC0", "CC-BY-SA",
56 "CC-BY", "CC-BY-NC-SA", "MIT", "ZLib"]:
57 row = License(license)
58 licenses[row.name] = row
65 mod.title = "Alpha Test"
66 mod.license = licenses["MIT"]
67 mod.type = PackageType.MOD
69 mod.tags.append(tags["mapgen"])
70 mod.tags.append(tags["environment"])
71 mod.repo = "https://github.com/ezhh/other_worlds"
72 mod.issueTracker = "https://github.com/ezhh/other_worlds/issues"
74 mod.shortDesc = "The content library should not be used yet as it is still in alpha"
75 mod.desc = "This is the long desc"
78 rel = PackageRelease()
81 rel.url = "https://github.com/ezhh/handholds/archive/master.zip"
89 mod1.license = licenses["LGPLv2.1"]
90 mod1.type = PackageType.MOD
92 mod1.tags.append(tags["player_effects"])
93 mod1.repo = "https://github.com/rubenwardy/awards"
94 mod1.issueTracker = "https://github.com/rubenwardy/awards/issues"
96 mod1.shortDesc = "Adds achievements and an API to register new ones."
98 Majority of awards are back ported from Calinou's old fork in Carbone, under same license.
101 awards.register_achievement("award_mesefind",{
102 title = "First Mese Find",
103 description = "Found some Mese!",
105 type = "dig", -- award is given when
106 node = "default:mese", -- this type of node has been dug
107 target = 1, -- this number of times
113 rel = PackageRelease()
116 rel.url = "https://github.com/rubenwardy/awards/archive/master.zip"
122 mod2.name = "mesecons"
123 mod2.title = "Mesecons"
124 mod2.tags.append(tags["tools"])
125 mod2.type = PackageType.MOD
126 mod2.license = licenses["LGPLv3"]
128 mod2.repo = "https://github.com/minetest-mods/mesecons/"
129 mod2.issueTracker = "https://github.com/minetest-mods/mesecons/issues"
131 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."
133 ########################################################################
134 ## __ __ _____ _____ _____ _____ _____ _ _ _____ ##
135 ## | \ / | | ___| | ___| | ___| | ___| | _ | | \ | | | ___| ##
136 ## | \/ | | |___ | |___ | |___ | | | | | | | \| | | |___ ##
137 ## | |\__/| | | ___| |___ | | ___| | | | | | | | | |___ | ##
138 ## | | | | | |___ ___| | | |___ | |___ | |_| | | |\ | ___| | ##
139 ## |_| |_| |_____| |_____| |_____| |_____| |_____| |_| \_| |_____| ##
141 ########################################################################
143 MESECONS by Jeija and contributors
147 [Mesecons](http://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Minetest's gameplay.
149 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.
151 Mesecons has a similar goal to Redstone in Minecraft, but works in its own way, with different rules and mechanics.
157 [DOWNLOAD IT NOW](https://github.com/minetest-mods/mesecons/archive/master.zip)
159 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:
161 1. If Mesecons is still in a ZIP file, extract the folder inside to somewhere on the computer.
162 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.
163 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.
164 4. Copy the Mesecons folder into the mods folder.
166 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.
168 There are no dependencies - it will work right after installing!
170 How do I use this thing?
171 ------------------------
172 How about a [quick overview video](https://www.youtube.com/watch?v=6kmeQj6iW5k)?
174 Or maybe a [comprehensive reference](http://mesecons.net/items.html) is your style?
176 An overview for the very newest of new beginners? How does [this one](http://uberi.mesecons.net/projects/MeseconsBasics/index.html) look?
178 Want to get more into building? Why not check out the [Mesecons Laboratory](http://uberi.mesecons.net/), a website dedicated to advanced Mesecons builders?
180 Want to contribute to Mesecons itself? Check out the [source code](https://github.com/minetest-mods/mesecons)!
182 Who wrote it anyways?
183 ---------------------
184 These awesome people made Mesecons possible!
186 | Contributor | Contribution |
187 | --------------- | -------------------------------- |
188 | Hawk777 | Code for VoxelManip caching |
189 | Jat15 | Various tweaks. |
190 | Jeija | **Main developer! Everything.** |
191 | Jordach | Noteblock sounds. |
192 | khonkhortistan | Code, recipes, textures. |
193 | Kotolegokot | Nodeboxes for items. |
194 | minerd247 | Textures. |
195 | Nore/Novatux | Code. |
196 | RealBadAngel | Fixes, improvements. |
197 | sfan5 | Code, recipes, textures. |
198 | suzenako | Piston sounds. |
199 | Uberi/Temperest | Code, textures, documentation. |
200 | VanessaE | Code, recipes, textures, design. |
201 | Whiskers75 | Logic gates implementation. |
203 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!
205 Alright, how can I use it?
206 --------------------------
207 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.
209 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.
211 No warranty is provided, express or implied, for any part of the project.
220 mod.name = "handholds"
221 mod.title = "Mountain Climbing"
222 mod.license = licenses["MIT"]
223 mod.type = PackageType.MOD
225 mod.tags.append(tags["player_effects"])
226 mod.repo = "https://github.com/ezhh/handholds"
227 mod.issueTracker = "https://github.com/ezhh/handholds/issues"
229 mod.shortDesc = "Adds hand holds and climbing thingies"
230 mod.desc = "This is the long desc"
233 rel = PackageRelease()
236 rel.url = "https://github.com/ezhh/handholds/archive/master.zip"
242 mod.name = "other_worlds"
243 mod.title = "Other Worlds"
244 mod.license = licenses["MIT"]
245 mod.type = PackageType.MOD
247 mod.tags.append(tags["mapgen"])
248 mod.tags.append(tags["environment"])
249 mod.repo = "https://github.com/ezhh/other_worlds"
250 mod.issueTracker = "https://github.com/ezhh/other_worlds/issues"
252 mod.shortDesc = "Adds space with asteroids and comets"
253 mod.desc = "This is the long desc"
260 mod.license = licenses["LGPLv2.1"]
261 mod.type = PackageType.MOD
263 mod.tags.append(tags["player_effects"])
264 mod.repo = "https://github.com/rubenwardy/food/"
265 mod.issueTracker = "https://github.com/rubenwardy/food/issues/"
267 mod.shortDesc = "Adds lots of food and an API to manage ingredients"
268 mod.desc = "This is the long desc"
273 mod.name = "food_sweet"
274 mod.title = "Sweet Foods"
275 mod.license = licenses["CC0"]
276 mod.type = PackageType.MOD
278 mod.tags.append(tags["player_effects"])
279 mod.repo = "https://github.com/rubenwardy/food_sweet/"
280 mod.issueTracker = "https://github.com/rubenwardy/food_sweet/issues/"
282 mod.shortDesc = "Adds sweet food"
283 mod.desc = "This is the long desc"
287 game1.approved = True
288 game1.name = "capturetheflag"
289 game1.title = "Capture The Flag"
290 game1.type = PackageType.GAME
291 game1.license = licenses["LGPLv2.1"]
293 game1.tags.append(tags["pvp"])
294 game1.tags.append(tags["survival"])
295 game1.tags.append(tags["multiplayer"])
296 game1.repo = "https://github.com/rubenwardy/capturetheflag"
297 game1.issueTracker = "https://github.com/rubenwardy/capturetheflag/issues"
299 game1.shortDesc = "Two teams battle to snatch and return the enemy's flag, before the enemy takes their own!"
301 As seen on the Capture the Flag server (minetest.rubenwardy.com:30000)
303 Uses the CTF PvP Engine.
306 db.session.add(game1)
308 rel = PackageRelease()
311 rel.url = "https://github.com/rubenwardy/capturetheflag/archive/master.zip"
318 mod.name = "pixelbox"
319 mod.title = "PixelBOX Reloaded"
320 mod.license = licenses["CC0"]
321 mod.type = PackageType.TXP
324 mod.shortDesc = "This is an update of the original PixelBOX texture pack by the brillant artist Gambit"
325 mod.desc = "This is the long desc"
328 rel = PackageRelease()
331 rel.url = "http://mamadou3.free.fr/Minetest/PixelBOX.zip"
337 print("Database already exists")