ogamejs 2.1.2 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +5 -5
- package/build/buildings/infocompte.js +11 -2
- package/build/buildings/infocompte.test.js +3 -1
- package/package.json +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.1.3](https://github.com/rolljee/ogamejs/compare/v2.1.2...v2.1.3) (2020-04-16)
|
|
6
|
+
|
|
5
7
|
### [2.1.2](https://github.com/rolljee/ogamejs/compare/v2.1.1...v2.1.2) (2020-04-12)
|
|
6
8
|
|
|
7
9
|
### [2.1.1](https://github.com/rolljee/ogamejs/compare/v2.1.0...v2.1.1) (2020-04-12)
|
package/README.md
CHANGED
|
@@ -136,11 +136,11 @@ function getFusionReactor(reactor, targetLevel, energyTech, universeSpeed = 1) {
|
|
|
136
136
|
*/
|
|
137
137
|
function parseInfoCompteData(data) {
|
|
138
138
|
@return {
|
|
139
|
-
planet:
|
|
140
|
-
metal:
|
|
141
|
-
crystal:
|
|
142
|
-
deut:
|
|
143
|
-
temperature: Number
|
|
139
|
+
planet: String,
|
|
140
|
+
metal: String,
|
|
141
|
+
crystal: String,
|
|
142
|
+
deut: String,
|
|
143
|
+
temperature: Number,
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
```
|
|
@@ -32,7 +32,14 @@ function toNumber() {
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
function parseInfoCompteData(data) {
|
|
35
|
-
|
|
35
|
+
var universeDataRe = new RegExp('([0-9]{3}-[a-z]{2})');
|
|
36
|
+
|
|
37
|
+
var _data$match$1$split = data.match(universeDataRe)[1].split('-'),
|
|
38
|
+
_data$match$1$split2 = _slicedToArray(_data$match$1$split, 2),
|
|
39
|
+
universe = _data$match$1$split2[0],
|
|
40
|
+
lang = _data$match$1$split2[1]; // eslint-disable-next-line security/detect-unsafe-regex
|
|
41
|
+
|
|
42
|
+
|
|
36
43
|
var planetsRe = new RegExp('(?:Planète [0-9]+(.+))(?:s+(?:Planète [0-9]+))*', 'g');
|
|
37
44
|
var planets = data.matchAll(planetsRe);
|
|
38
45
|
var metalPointRe = new RegExp('Points dans les mines de métal : (.+)');
|
|
@@ -94,7 +101,9 @@ function parseInfoCompteData(data) {
|
|
|
94
101
|
deut: deutPoint,
|
|
95
102
|
total: metalPoint + crystalPoint + deutPoint
|
|
96
103
|
},
|
|
97
|
-
plasma: plasmaTechLevel
|
|
104
|
+
plasma: plasmaTechLevel,
|
|
105
|
+
universe: Number(universe),
|
|
106
|
+
lang: lang
|
|
98
107
|
}; // eslint-disable-next-line no-restricted-syntax
|
|
99
108
|
|
|
100
109
|
var _iterator = _createForOfIteratorHelper(planets),
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ogamejs",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "babel-node index.js",
|
|
8
8
|
"commit": "git-cz",
|
|
9
|
-
"
|
|
10
|
-
"release": "standard-version",
|
|
11
|
-
"release:beta": "standard-version -p beta",
|
|
9
|
+
"build": "babel src -d build",
|
|
12
10
|
"lint": "eslint .",
|
|
13
11
|
"test": "jest"
|
|
14
12
|
},
|
|
@@ -49,7 +47,7 @@
|
|
|
49
47
|
"git-cz": "^4.3.1",
|
|
50
48
|
"jest": "^25.3.0",
|
|
51
49
|
"regenerator-runtime": "^0.13.5",
|
|
52
|
-
"standard-version": "^
|
|
50
|
+
"standard-version": "^8.0.1"
|
|
53
51
|
},
|
|
54
52
|
"dependencies": {
|
|
55
53
|
"lodash": "^4.17.15"
|