Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Fixed utterly broken new file creation.
Browse files Browse the repository at this point in the history
Good thing NO ONE FUCKING USES THIS PROGRAM! 👎
  • Loading branch information
digiwombat committed Dec 22, 2016
1 parent 8ecd7cd commit 3f18fd2
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 57 deletions.
55 changes: 0 additions & 55 deletions dbproto.json

This file was deleted.

58 changes: 57 additions & 1 deletion lib/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function newWorld(newWorld = true)

if(newWorld == true)
{
zip.file('userDB.json', fs.readFileSync('dbproto.json')); zip.generateNodeStream({type:'nodebuffer',compression:"DEFLATE",streamFiles:true}).pipe(fs.createWriteStream(worldDBLocation));
zip.file('userDB.json', JSON.stringify(newDB)); zip.generateNodeStream({type:'nodebuffer',compression:"DEFLATE",streamFiles:true}).pipe(fs.createWriteStream(worldDBLocation));
}
loadWorld();

Expand Down Expand Up @@ -1065,4 +1065,60 @@ function saveZip()
{
zip.file('userDB.json', JSON.stringify(worlddb)); zip.generateNodeStream({type:'nodebuffer',compression:"DEFLATE",streamFiles:true}).pipe(fs.createWriteStream(worldDBLocation));
}

var newDB = {
"people": [
{
"person_id": 1,
"person_name": "New Person",
"person_age": "Unknown",
"person_gender": "Unknown",
"person_height": "",
"person_weight": "",
"person_hair_color": "",
"person_eye_color": "",
"person_from_place": "",
"person_current_place": "",
"person_information": "",
"person_personality": "",
"person_background": "",
"person_status": "",
"person_first_appearance": "",
"person_last_appearance": "",
"person_picture": ""
}
],
"places": [
{
"place_id": 1,
"place_name": "New Place",
"place_description": "",
"place_map": "",
"place_parent": "",
"place_ruler": ""
}
],
"things": [
{
"thing_id": 1,
"thing_name": "New Thing",
"thing_description": ""
}
],
"notes": [
{
"note_id": 1,
"note_name": "New Note",
"note_description": ""
}
],
"settings": [
{
"setting_id": 1,
"option": "",
"value": ""
}
],
"dbversion": "0.5.0"
}
//#endregion
2 changes: 1 addition & 1 deletion styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ hr.separator

#list-holder .list-active
{
background: #2B303B;
background: #2B303B !important;
}

#list-holder .person-image, #list-holder .place-image, #list-holder .thing-image, #list-holder .note-image
Expand Down

0 comments on commit 3f18fd2

Please sign in to comment.