-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Recipes and Producers to 1.0 game-data
- Loading branch information
Showing
8 changed files
with
7,248 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
include src/production_planner/*.json | ||
include src/production_planner/gamedata/*.json | ||
include src/production_planner/*.tcss | ||
include src/production_planner/cells/*.tcss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- coding:utf-8 -*- | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
"""__init__.py | ||
Usage: | ||
__init__.py <docs.json-path> | ||
__init__.py (-h | --help) | ||
Options: | ||
-h --help Show this screen. | ||
""" | ||
|
||
from docopt import docopt | ||
|
||
from production_planner.core import ProducerEncoder | ||
|
||
import parse | ||
|
||
import json | ||
from pathlib import Path | ||
from collections import OrderedDict | ||
|
||
|
||
def main(): | ||
arguments = docopt(__doc__) | ||
production_buildings = OrderedDict() | ||
data = parse.docs_json(Path(arguments['<docs.json-path>'])) | ||
if data: | ||
for prod in data: | ||
p = json.dumps(prod, cls=ProducerEncoder, indent=2) | ||
production_buildings.update(json.loads(p)) | ||
print(json.dumps(production_buildings, cls=ProducerEncoder, indent=2)) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.