Skip to content

Commit 4045cd8

Browse files
committed
Merge pull request #1 from LordRatte/master
Add constructor headers and create a tech resource file
2 parents 16d229a + f45ad36 commit 4045cd8

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*~

TechType.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include <vector>
4+
#include <string>
45
using namespace std;
56

67
//added this just so I could make some vague progress
@@ -9,4 +10,8 @@ class TechType
910
{
1011
int ID; //int is probably fine
1112
vector<int> prerequisites, dependants; //these refer to other TechType items
12-
};
13+
string description
14+
public:
15+
TechType();
16+
TechType(int id); //instatiates from resource file
17+
};

rec/TechTypes.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"0" : {
3+
"name" : "default_tech",
4+
"description" : "default_description",
5+
"effects" : [],
6+
"prereqs" : []
7+
}
8+
}

0 commit comments

Comments
 (0)