2 # Copyright (C) 2018 rubenwardy
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
18 import os, sys, datetime
20 if not "FLASK_CONFIG" in os.environ:
21 os.environ["FLASK_CONFIG"] = "../config.cfg"
23 delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d"
24 create_db = not (len(sys.argv) >= 2 and sys.argv[1].strip() == "-o")
25 test_data = len(sys.argv) >= 2 and sys.argv[1].strip() == "-t" or not create_db
27 from app.models import *
28 from app.utils import make_flask_user_password
30 def defineDummyData(licenses, tags, ruben):
32 ez.github_username = "Ezhh"
33 ez.forums_username = "Shara"
34 ez.rank = UserRank.EDITOR
37 not1 = Notification(ruben, ez, "Awards approved", "/packages/rubenwardy/awards/")
41 jeija.github_username = "Jeija"
42 jeija.forums_username = "Jeija"
49 mod.title = "Alpha Test"
50 mod.license = licenses["MIT"]
51 mod.type = PackageType.MOD
53 mod.tags.append(tags["mapgen"])
54 mod.tags.append(tags["environment"])
55 mod.repo = "https://github.com/ezhh/other_worlds"
56 mod.issueTracker = "https://github.com/ezhh/other_worlds/issues"
58 mod.shortDesc = "The content library should not be used yet as it is still in alpha"
59 mod.desc = "This is the long desc"
62 rel = PackageRelease()
65 rel.url = "https://github.com/ezhh/handholds/archive/master.zip"
73 mod1.license = licenses["LGPLv2.1"]
74 mod1.type = PackageType.MOD
76 mod1.tags.append(tags["player_effects"])
77 mod1.repo = "https://github.com/rubenwardy/awards"
78 mod1.issueTracker = "https://github.com/rubenwardy/awards/issues"
80 mod1.shortDesc = "Adds achievements and an API to register new ones."
82 Majority of awards are back ported from Calinou's old fork in Carbone, under same license.
85 awards.register_achievement("award_mesefind",{
86 title = "First Mese Find",
87 description = "Found some Mese!",
89 type = "dig", -- award is given when
90 node = "default:mese", -- this type of node has been dug
91 target = 1, -- this number of times
97 rel = PackageRelease()
100 rel.url = "https://github.com/rubenwardy/awards/archive/master.zip"
106 mod2.name = "mesecons"
107 mod2.title = "Mesecons"
108 mod2.tags.append(tags["tools"])
109 mod2.type = PackageType.MOD
110 mod2.license = licenses["LGPLv3"]
112 mod2.repo = "https://github.com/minetest-mods/mesecons/"
113 mod2.issueTracker = "https://github.com/minetest-mods/mesecons/issues"
115 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."
117 ########################################################################
118 ## __ __ _____ _____ _____ _____ _____ _ _ _____ ##
119 ## | \ / | | ___| | ___| | ___| | ___| | _ | | \ | | | ___| ##
120 ## | \/ | | |___ | |___ | |___ | | | | | | | \| | | |___ ##
121 ## | |\__/| | | ___| |___ | | ___| | | | | | | | | |___ | ##
122 ## | | | | | |___ ___| | | |___ | |___ | |_| | | |\ | ___| | ##
123 ## |_| |_| |_____| |_____| |_____| |_____| |_____| |_| \_| |_____| ##
125 ########################################################################
127 MESECONS by Jeija and contributors
131 [Mesecons](http://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Minetest's gameplay.
133 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.
135 Mesecons has a similar goal to Redstone in Minecraft, but works in its own way, with different rules and mechanics.
141 [DOWNLOAD IT NOW](https://github.com/minetest-mods/mesecons/archive/master.zip)
143 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:
145 1. If Mesecons is still in a ZIP file, extract the folder inside to somewhere on the computer.
146 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.
147 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.
148 4. Copy the Mesecons folder into the mods folder.
150 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.
152 There are no dependencies - it will work right after installing!
154 How do I use this thing?
155 ------------------------
156 How about a [quick overview video](https://www.youtube.com/watch?v=6kmeQj6iW5k)?
158 Or maybe a [comprehensive reference](http://mesecons.net/items.html) is your style?
160 An overview for the very newest of new beginners? How does [this one](http://uberi.mesecons.net/projects/MeseconsBasics/index.html) look?
162 Want to get more into building? Why not check out the [Mesecons Laboratory](http://uberi.mesecons.net/), a website dedicated to advanced Mesecons builders?
164 Want to contribute to Mesecons itself? Check out the [source code](https://github.com/minetest-mods/mesecons)!
166 Who wrote it anyways?
167 ---------------------
168 These awesome people made Mesecons possible!
170 | Contributor | Contribution |
171 | --------------- | -------------------------------- |
172 | Hawk777 | Code for VoxelManip caching |
173 | Jat15 | Various tweaks. |
174 | Jeija | **Main developer! Everything.** |
175 | Jordach | Noteblock sounds. |
176 | khonkhortistan | Code, recipes, textures. |
177 | Kotolegokot | Nodeboxes for items. |
178 | minerd247 | Textures. |
179 | Nore/Novatux | Code. |
180 | RealBadAngel | Fixes, improvements. |
181 | sfan5 | Code, recipes, textures. |
182 | suzenako | Piston sounds. |
183 | Uberi/Temperest | Code, textures, documentation. |
184 | VanessaE | Code, recipes, textures, design. |
185 | Whiskers75 | Logic gates implementation. |
187 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!
189 Alright, how can I use it?
190 --------------------------
191 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.
193 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.
195 No warranty is provided, express or implied, for any part of the project.
204 mod.name = "handholds"
205 mod.title = "Handholds"
206 mod.license = licenses["MIT"]
207 mod.type = PackageType.MOD
209 mod.tags.append(tags["player_effects"])
210 mod.repo = "https://github.com/ezhh/handholds"
211 mod.issueTracker = "https://github.com/ezhh/handholds/issues"
213 mod.shortDesc = "Adds hand holds and climbing thingies"
214 mod.desc = "This is the long desc"
217 rel = PackageRelease()
220 rel.url = "https://github.com/ezhh/handholds/archive/master.zip"
226 mod.name = "other_worlds"
227 mod.title = "Other Worlds"
228 mod.license = licenses["MIT"]
229 mod.type = PackageType.MOD
231 mod.tags.append(tags["mapgen"])
232 mod.tags.append(tags["environment"])
233 mod.repo = "https://github.com/ezhh/other_worlds"
234 mod.issueTracker = "https://github.com/ezhh/other_worlds/issues"
236 mod.shortDesc = "Adds space with asteroids and comets"
237 mod.desc = "This is the long desc"
244 mod.license = licenses["LGPLv2.1"]
245 mod.type = PackageType.MOD
247 mod.tags.append(tags["player_effects"])
248 mod.repo = "https://github.com/rubenwardy/food/"
249 mod.issueTracker = "https://github.com/rubenwardy/food/issues/"
251 mod.shortDesc = "Adds lots of food and an API to manage ingredients"
252 mod.desc = "This is the long desc"
258 mod.name = "food_sweet"
259 mod.title = "Sweet Foods"
260 mod.license = licenses["CC0"]
261 mod.type = PackageType.MOD
263 mod.tags.append(tags["player_effects"])
264 mod.repo = "https://github.com/rubenwardy/food_sweet/"
265 mod.issueTracker = "https://github.com/rubenwardy/food_sweet/issues/"
267 mod.shortDesc = "Adds sweet food"
268 mod.desc = "This is the long desc"
273 game1.approved = True
274 game1.name = "capturetheflag"
275 game1.title = "Capture The Flag"
276 game1.type = PackageType.GAME
277 game1.license = licenses["LGPLv2.1"]
279 game1.tags.append(tags["pvp"])
280 game1.tags.append(tags["survival"])
281 game1.tags.append(tags["multiplayer"])
282 game1.repo = "https://github.com/rubenwardy/capturetheflag"
283 game1.issueTracker = "https://github.com/rubenwardy/capturetheflag/issues"
285 game1.shortDesc = "Two teams battle to snatch and return the enemy's flag, before the enemy takes their own!"
287 As seen on the Capture the Flag server (minetest.rubenwardy.com:30000)
289 Uses the CTF PvP Engine.
292 db.session.add(game1)
294 rel = PackageRelease()
297 rel.url = "https://github.com/rubenwardy/capturetheflag/archive/master.zip"
304 mod.name = "pixelbox"
305 mod.title = "PixelBOX Reloaded"
306 mod.license = licenses["CC0"]
307 mod.type = PackageType.TXP
310 mod.shortDesc = "This is an update of the original PixelBOX texture pack by the brillant artist Gambit"
311 mod.desc = "This is the long desc"
314 rel = PackageRelease()
317 rel.url = "http://mamadou3.free.fr/Minetest/PixelBOX.zip"
324 for package in Package.query.filter_by(type=PackageType.MOD).all():
327 meta = metas[package.name]
329 meta = MetaPackage(package.name)
331 metas[package.name] = meta
332 package.provides.append(meta)
334 dep = Dependency(food_sweet, meta=metas["food"])
338 if delete_db and os.path.isfile("db.sqlite"):
339 os.remove("db.sqlite")
343 print("Creating database tables...")
346 print("Filling database...")
348 ruben = User("rubenwardy")
350 ruben.password = make_flask_user_password("tuckfrump")
351 ruben.github_username = "rubenwardy"
352 ruben.forums_username = "rubenwardy"
353 ruben.rank = UserRank.ADMIN
354 db.session.add(ruben)
357 for tag in ["Inventory", "Mapgen", "Building", \
358 "Mobs and NPCs", "Tools", "Player effects", \
359 "Environment", "Transport", "Maintenance", "Plants and farming", \
360 "PvP", "PvE", "Survival", "Creative", "Puzzle", "Multiplayer", "Singleplayer"]:
366 for license in ["GPLv2.1", "GPLv3", "LGPLv2.1", "LGPLv3", "AGPLv2.1", "AGPLv3",
367 "Apache", "BSD 3-Clause", "BSD 2-Clause", "CC0", "CC-BY-SA",
368 "CC-BY", "MIT", "ZLib", "Other (Free)"]:
369 row = License(license)
370 licenses[row.name] = row
373 for license in ["CC-BY-NC-SA", "Other (Non-free)"]:
374 row = License(license, False)
375 licenses[row.name] = row
379 defineDummyData(licenses, tags, ruben)