fix tests after The Big Entity Refactor
This commit is contained in:
parent
5a304245f1
commit
412cf15097
4 changed files with 398 additions and 132 deletions
|
|
@ -25,12 +25,19 @@ class PrototypesTest : BehaviorSpec({
|
|||
"prototypes": [
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "tile-unknown",
|
||||
"order": "z-a",
|
||||
"layer": 0,
|
||||
"collisionMasks": {},
|
||||
"mapColour": [0, 0, 0, 255],
|
||||
"canBeMined": false
|
||||
"protoId": "tile/stone-path",
|
||||
"order": "a[artificial]-a[tier-1]-a[stone-path]",
|
||||
"layer": 60,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [
|
||||
86,
|
||||
82,
|
||||
74,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -48,432 +55,619 @@ class PrototypesTest : BehaviorSpec({
|
|||
// language=JSON
|
||||
val raw = """
|
||||
{
|
||||
"modVersion": "0.3.2",
|
||||
"tick": 534,
|
||||
"data": {
|
||||
"type": "kafkatorio.packet.instant.PrototypesUpdate",
|
||||
"prototypes": [
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "stone-path",
|
||||
"protoId": "tile/stone-path",
|
||||
"order": "a[artificial]-a[tier-1]-a[stone-path]",
|
||||
"layer": 60,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [86, 82, 74, 255],
|
||||
"mapColour": [
|
||||
86,
|
||||
82,
|
||||
74,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "concrete",
|
||||
"protoId": "tile/concrete",
|
||||
"order": "a[artificial]-b[tier-2]-a[concrete]",
|
||||
"layer": 61,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [63, 61, 59, 255],
|
||||
"mapColour": [
|
||||
63,
|
||||
61,
|
||||
59,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "hazard-concrete-left",
|
||||
"protoId": "tile/hazard-concrete-left",
|
||||
"order": "a[artificial]-b[tier-2]-b[hazard-concrete-left]",
|
||||
"layer": 62,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [176, 142, 39, 255],
|
||||
"mapColour": [
|
||||
176,
|
||||
142,
|
||||
39,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "hazard-concrete-right",
|
||||
"protoId": "tile/hazard-concrete-right",
|
||||
"order": "a[artificial]-b[tier-2]-c[hazard-concrete-right]",
|
||||
"layer": 62,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [176, 142, 39, 255],
|
||||
"mapColour": [
|
||||
176,
|
||||
142,
|
||||
39,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "refined-concrete",
|
||||
"protoId": "tile/refined-concrete",
|
||||
"order": "a[artificial]-c[tier-3]-a[refined-concrete]",
|
||||
"layer": 64,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [49, 48, 45, 255],
|
||||
"mapColour": [
|
||||
49,
|
||||
48,
|
||||
45,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "refined-hazard-concrete-left",
|
||||
"protoId": "tile/refined-hazard-concrete-left",
|
||||
"order": "a[artificial]-c[tier-3]-b[refined-hazard-concrete-left]",
|
||||
"layer": 65,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [116, 94, 26, 255],
|
||||
"mapColour": [
|
||||
116,
|
||||
94,
|
||||
26,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "refined-hazard-concrete-right",
|
||||
"protoId": "tile/refined-hazard-concrete-right",
|
||||
"order": "a[artificial]-c[tier-3]-c[refined-hazard-concrete-right]",
|
||||
"layer": 65,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [116, 94, 26, 255],
|
||||
"mapColour": [
|
||||
116,
|
||||
94,
|
||||
26,
|
||||
255
|
||||
],
|
||||
"canBeMined": true
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "landfill",
|
||||
"protoId": "tile/landfill",
|
||||
"order": "a[artificial]-d[utility]-a[landfill]",
|
||||
"layer": 57,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [57, 39, 26, 255],
|
||||
"mapColour": [
|
||||
57,
|
||||
39,
|
||||
26,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "acid-refined-concrete",
|
||||
"protoId": "tile/acid-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-acid",
|
||||
"layer": 97,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [142, 194, 40, 127],
|
||||
"mapColour": [
|
||||
142,
|
||||
194,
|
||||
40,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "black-refined-concrete",
|
||||
"protoId": "tile/black-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-black",
|
||||
"layer": 88,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [25, 25, 25, 127],
|
||||
"mapColour": [
|
||||
25,
|
||||
25,
|
||||
25,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "blue-refined-concrete",
|
||||
"protoId": "tile/blue-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-blue",
|
||||
"layer": 73,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [39, 137, 228, 127],
|
||||
"mapColour": [
|
||||
39,
|
||||
137,
|
||||
228,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "brown-refined-concrete",
|
||||
"protoId": "tile/brown-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-brown",
|
||||
"layer": 91,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [76, 29, 0, 127],
|
||||
"mapColour": [
|
||||
76,
|
||||
29,
|
||||
0,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "cyan-refined-concrete",
|
||||
"protoId": "tile/cyan-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-cyan",
|
||||
"layer": 94,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [70, 192, 181, 127],
|
||||
"mapColour": [
|
||||
70,
|
||||
192,
|
||||
181,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "green-refined-concrete",
|
||||
"protoId": "tile/green-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-green",
|
||||
"layer": 70,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [23, 195, 43, 127],
|
||||
"mapColour": [
|
||||
23,
|
||||
195,
|
||||
43,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "orange-refined-concrete",
|
||||
"protoId": "tile/orange-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-orange",
|
||||
"layer": 76,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [221, 127, 33, 127],
|
||||
"mapColour": [
|
||||
221,
|
||||
127,
|
||||
33,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "pink-refined-concrete",
|
||||
"protoId": "tile/pink-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-pink",
|
||||
"layer": 82,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [236, 98, 131, 127],
|
||||
"mapColour": [
|
||||
236,
|
||||
98,
|
||||
131,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "purple-refined-concrete",
|
||||
"protoId": "tile/purple-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-purple",
|
||||
"layer": 85,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [123, 28, 168, 127],
|
||||
"mapColour": [
|
||||
123,
|
||||
28,
|
||||
168,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "red-refined-concrete",
|
||||
"protoId": "tile/red-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-red",
|
||||
"layer": 67,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [207, 6, 0, 127],
|
||||
"mapColour": [
|
||||
207,
|
||||
6,
|
||||
0,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "yellow-refined-concrete",
|
||||
"protoId": "tile/yellow-refined-concrete",
|
||||
"order": "a[artificial]-e[color-concrete]-yellow",
|
||||
"layer": 79,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [212, 169, 19, 127],
|
||||
"mapColour": [
|
||||
212,
|
||||
169,
|
||||
19,
|
||||
127
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "grass-1",
|
||||
"protoId": "tile/grass-1",
|
||||
"order": "b[natural]-a[grass]-a[grass-1]",
|
||||
"layer": 26,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [55, 53, 11, 255],
|
||||
"mapColour": [
|
||||
55,
|
||||
53,
|
||||
11,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "grass-2",
|
||||
"protoId": "tile/grass-2",
|
||||
"order": "b[natural]-a[grass]-b[grass-2]",
|
||||
"layer": 28,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [66, 57, 15, 255],
|
||||
"mapColour": [
|
||||
66,
|
||||
57,
|
||||
15,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "grass-3",
|
||||
"protoId": "tile/grass-3",
|
||||
"order": "b[natural]-a[grass]-c[grass-3]",
|
||||
"layer": 29,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [65, 52, 28, 255],
|
||||
"mapColour": [
|
||||
65,
|
||||
52,
|
||||
28,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "grass-4",
|
||||
"protoId": "tile/grass-4",
|
||||
"order": "b[natural]-a[grass]-d[grass-4]",
|
||||
"layer": 30,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [59, 40, 18, 255],
|
||||
"mapColour": [
|
||||
59,
|
||||
40,
|
||||
18,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dry-dirt",
|
||||
"protoId": "tile/dry-dirt",
|
||||
"order": "b[natural]-b[dirt]-a[dry-dirt]",
|
||||
"layer": 18,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [94, 66, 37, 255],
|
||||
"mapColour": [
|
||||
94,
|
||||
66,
|
||||
37,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dirt-1",
|
||||
"protoId": "tile/dirt-1",
|
||||
"order": "b[natural]-b[dirt]-b[dirt-1]",
|
||||
"layer": 19,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [141, 104, 60, 255],
|
||||
"mapColour": [
|
||||
141,
|
||||
104,
|
||||
60,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dirt-2",
|
||||
"protoId": "tile/dirt-2",
|
||||
"order": "b[natural]-b[dirt]-c[dirt-2]",
|
||||
"layer": 20,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [136, 96, 59, 255],
|
||||
"mapColour": [
|
||||
136,
|
||||
96,
|
||||
59,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dirt-3",
|
||||
"protoId": "tile/dirt-3",
|
||||
"order": "b[natural]-b[dirt]-d[dirt-3]",
|
||||
"layer": 21,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [133, 92, 53, 255],
|
||||
"mapColour": [
|
||||
133,
|
||||
92,
|
||||
53,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dirt-4",
|
||||
"protoId": "tile/dirt-4",
|
||||
"order": "b[natural]-b[dirt]-e[dirt-4]",
|
||||
"layer": 22,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [103, 72, 43, 255],
|
||||
"mapColour": [
|
||||
103,
|
||||
72,
|
||||
43,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dirt-5",
|
||||
"protoId": "tile/dirt-5",
|
||||
"order": "b[natural]-b[dirt]-f[dirt-5]",
|
||||
"layer": 23,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [91, 63, 38, 255],
|
||||
"mapColour": [
|
||||
91,
|
||||
63,
|
||||
38,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dirt-6",
|
||||
"protoId": "tile/dirt-6",
|
||||
"order": "b[natural]-b[dirt]-g[dirt-6]",
|
||||
"layer": 24,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [80, 55, 31, 255],
|
||||
"mapColour": [
|
||||
80,
|
||||
55,
|
||||
31,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "dirt-7",
|
||||
"protoId": "tile/dirt-7",
|
||||
"order": "b[natural]-b[dirt]-h[dirt-7]",
|
||||
"layer": 25,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [80, 54, 28, 255],
|
||||
"mapColour": [
|
||||
80,
|
||||
54,
|
||||
28,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "sand-1",
|
||||
"protoId": "tile/sand-1",
|
||||
"order": "b[natural]-c[sand]-a[sand-1]",
|
||||
"layer": 8,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [138, 103, 58, 255],
|
||||
"mapColour": [
|
||||
138,
|
||||
103,
|
||||
58,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "sand-2",
|
||||
"protoId": "tile/sand-2",
|
||||
"order": "b[natural]-c[sand]-b[sand-2]",
|
||||
"layer": 9,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [128, 93, 52, 255],
|
||||
"mapColour": [
|
||||
128,
|
||||
93,
|
||||
52,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "sand-3",
|
||||
"protoId": "tile/sand-3",
|
||||
"order": "b[natural]-c[sand]-c[sand-3]",
|
||||
"layer": 10,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [115, 83, 47, 255],
|
||||
"mapColour": [
|
||||
115,
|
||||
83,
|
||||
47,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "red-desert-0",
|
||||
"protoId": "tile/red-desert-0",
|
||||
"order": "b[natural]-d[red-desert]-a[red-desert-0]",
|
||||
"layer": 31,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [103, 70, 32, 255],
|
||||
"mapColour": [
|
||||
103,
|
||||
70,
|
||||
32,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "red-desert-1",
|
||||
"protoId": "tile/red-desert-1",
|
||||
"order": "b[natural]-d[red-desert]-b[red-desert-1]",
|
||||
"layer": 14,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [116, 81, 39, 255],
|
||||
"mapColour": [
|
||||
116,
|
||||
81,
|
||||
39,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "red-desert-2",
|
||||
"protoId": "tile/red-desert-2",
|
||||
"order": "b[natural]-d[red-desert]-c[red-desert-2]",
|
||||
"layer": 15,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [116, 84, 43, 255],
|
||||
"mapColour": [
|
||||
116,
|
||||
84,
|
||||
43,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "red-desert-3",
|
||||
"protoId": "tile/red-desert-3",
|
||||
"order": "b[natural]-d[red-desert]-d[red-desert-3]",
|
||||
"layer": 16,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [128, 93, 52, 255],
|
||||
"mapColour": [
|
||||
128,
|
||||
93,
|
||||
52,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "water",
|
||||
"protoId": "tile/water",
|
||||
"order": "c[water]-a[water]",
|
||||
"layer": 3,
|
||||
"collisionMasks": [
|
||||
|
|
@ -483,12 +677,17 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [51, 83, 95, 255],
|
||||
"mapColour": [
|
||||
51,
|
||||
83,
|
||||
95,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "deepwater",
|
||||
"protoId": "tile/deepwater",
|
||||
"order": "c[water]-b[deep-water]",
|
||||
"layer": 3,
|
||||
"collisionMasks": [
|
||||
|
|
@ -498,12 +697,17 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [38, 64, 73, 255],
|
||||
"mapColour": [
|
||||
38,
|
||||
64,
|
||||
73,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "water-green",
|
||||
"protoId": "tile/water-green",
|
||||
"order": "c[water]-c[water-green]",
|
||||
"layer": 3,
|
||||
"collisionMasks": [
|
||||
|
|
@ -513,12 +717,17 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [31, 48, 18, 255],
|
||||
"mapColour": [
|
||||
31,
|
||||
48,
|
||||
18,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "deepwater-green",
|
||||
"protoId": "tile/deepwater-green",
|
||||
"order": "c[water]-d[deepwater-green]",
|
||||
"layer": 3,
|
||||
"collisionMasks": [
|
||||
|
|
@ -528,12 +737,17 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [23, 37, 16, 255],
|
||||
"mapColour": [
|
||||
23,
|
||||
37,
|
||||
16,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "water-shallow",
|
||||
"protoId": "tile/water-shallow",
|
||||
"order": "c[water]-e[water-shallow]",
|
||||
"layer": 6,
|
||||
"collisionMasks": [
|
||||
|
|
@ -542,12 +756,17 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [82, 98, 92, 255],
|
||||
"mapColour": [
|
||||
82,
|
||||
98,
|
||||
92,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "water-mud",
|
||||
"protoId": "tile/water-mud",
|
||||
"order": "c[water]-g[water-mud]",
|
||||
"layer": 7,
|
||||
"collisionMasks": [
|
||||
|
|
@ -556,23 +775,33 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [65, 89, 90, 255],
|
||||
"mapColour": [
|
||||
65,
|
||||
89,
|
||||
90,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "nuclear-ground",
|
||||
"protoId": "tile/nuclear-ground",
|
||||
"order": "d[destruction]-a[nuclear]-a[nuclear-ground]",
|
||||
"layer": 33,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [48, 40, 35, 255],
|
||||
"mapColour": [
|
||||
48,
|
||||
40,
|
||||
35,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "water-wube",
|
||||
"protoId": "tile/water-wube",
|
||||
"order": "x[wube]-a[water-wube]",
|
||||
"layer": 2,
|
||||
"collisionMasks": [
|
||||
|
|
@ -582,22 +811,31 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [0, 0, 0, 255],
|
||||
"mapColour": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "tile-unknown",
|
||||
"protoId": "tile/tile-unknown",
|
||||
"order": "z-a",
|
||||
"layer": 0,
|
||||
"collisionMasks": {
|
||||
},
|
||||
"mapColour": [0, 0, 0, 255],
|
||||
"collisionMasks": {},
|
||||
"mapColour": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "out-of-map",
|
||||
"protoId": "tile/out-of-map",
|
||||
"order": "z[other]-a[out-of-map]",
|
||||
"layer": 0,
|
||||
"collisionMasks": [
|
||||
|
|
@ -610,55 +848,83 @@ class PrototypesTest : BehaviorSpec({
|
|||
"resource-layer",
|
||||
"water-tile"
|
||||
],
|
||||
"mapColour": [0, 0, 0, 255],
|
||||
"mapColour": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "lab-dark-1",
|
||||
"protoId": "tile/lab-dark-1",
|
||||
"order": "z[other]-b[lab]-a[lab-dark-1]",
|
||||
"layer": 70,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [49, 49, 49, 255],
|
||||
"mapColour": [
|
||||
49,
|
||||
49,
|
||||
49,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "lab-dark-2",
|
||||
"protoId": "tile/lab-dark-2",
|
||||
"order": "z[other]-b[lab]-b[lab-dark-2]",
|
||||
"layer": 70,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [0, 0, 0, 255],
|
||||
"mapColour": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "lab-white",
|
||||
"protoId": "tile/lab-white",
|
||||
"order": "z[other]-b[lab]-c[lab-white]",
|
||||
"layer": 70,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [255, 255, 255, 255],
|
||||
"mapColour": [
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
},
|
||||
{
|
||||
"type": "kafkatorio.prototype.MapTile",
|
||||
"name": "tutorial-grid",
|
||||
"protoId": "tile/tutorial-grid",
|
||||
"order": "z[other]-c[tutorial]-a[tutorial-grid]",
|
||||
"layer": 55,
|
||||
"collisionMasks": [
|
||||
"ground-tile"
|
||||
],
|
||||
"mapColour": [122, 122, 122, 255],
|
||||
"mapColour": [
|
||||
122,
|
||||
122,
|
||||
122,
|
||||
255
|
||||
],
|
||||
"canBeMined": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "kafkatorio.packet.instant.PrototypesUpdate"
|
||||
},
|
||||
"modVersion": "0.6.1",
|
||||
"tick": 58468
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
|
|
@ -670,7 +936,7 @@ class PrototypesTest : BehaviorSpec({
|
|||
.prototypes
|
||||
.forOne {
|
||||
it.shouldBeInstanceOf<FactorioPrototype.MapTile>()
|
||||
it.protoId shouldBe PrototypeId.MapTile("tutorial-grid")
|
||||
it.protoId shouldBe PrototypeId("tile", "tutorial-grid")
|
||||
it.order shouldBe "z[other]-c[tutorial]-a[tutorial-grid]"
|
||||
it.layer shouldBe 55u
|
||||
it.collisionMasks shouldBe listOf("ground-tile")
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ class UpdatePacketsTest : FunSpec({
|
|||
colour = null,
|
||||
diedCause = EntityIdentifiersData(
|
||||
unitNumber = UnitNumber(66u),
|
||||
protoId = PrototypeId("unit/small-biter"),
|
||||
protoId = PrototypeId("unit", "small-biter"),
|
||||
),
|
||||
disconnectReason = null,
|
||||
events = mapOf(
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ class MapChunkPositionBoundsTest : FunSpec({
|
|||
"44" to mapOf("1" to MapTileDictionary.PrototypeKey(44)),
|
||||
),
|
||||
protos = mapOf(
|
||||
PrototypeName("water") to MapTileDictionary.PrototypeKey(1),
|
||||
PrototypeName("grass-4") to MapTileDictionary.PrototypeKey(2),
|
||||
PrototypeName("grass-3") to MapTileDictionary.PrototypeKey(32),
|
||||
PrototypeId("tile", "water") to MapTileDictionary.PrototypeKey(1),
|
||||
PrototypeId("tile", "grass-4") to MapTileDictionary.PrototypeKey(2),
|
||||
PrototypeId("tile", "grass-3") to MapTileDictionary.PrototypeKey(32),
|
||||
|
||||
PrototypeName("not-used") to MapTileDictionary.PrototypeKey(99),
|
||||
PrototypeId("tile", "not-used") to MapTileDictionary.PrototypeKey(99),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@ class MapTileDictionaryTest : FunSpec({
|
|||
"44" to mapOf("1" to MapTileDictionary.PrototypeKey(44)),
|
||||
),
|
||||
protos = mapOf(
|
||||
PrototypeId.MapTile("water") to MapTileDictionary.PrototypeKey(1),
|
||||
PrototypeId.MapTile("grass-4") to MapTileDictionary.PrototypeKey(2),
|
||||
PrototypeId.MapTile("grass-3") to MapTileDictionary.PrototypeKey(32),
|
||||
PrototypeId("tile", "water") to MapTileDictionary.PrototypeKey(1),
|
||||
PrototypeId("tile", "grass-4") to MapTileDictionary.PrototypeKey(2),
|
||||
PrototypeId("tile", "grass-3") to MapTileDictionary.PrototypeKey(32),
|
||||
|
||||
PrototypeId.MapTile("not-used") to MapTileDictionary.PrototypeKey(99),
|
||||
PrototypeId("tile", "not-used") to MapTileDictionary.PrototypeKey(99),
|
||||
)
|
||||
)
|
||||
|
||||
test("toMapTileList") {
|
||||
actual.toMapTileList() shouldContainAll listOf(
|
||||
MapTile(-192, -65, PrototypeId.MapTile("grass-4")),
|
||||
MapTile(-192, -65, PrototypeId("tile", "grass-4")),
|
||||
|
||||
MapTile(161, -96, PrototypeId.MapTile("water")),
|
||||
MapTile(161, -95, PrototypeId.MapTile("grass-4")),
|
||||
MapTile(161, 94, PrototypeId.MapTile("grass-4")),
|
||||
MapTile(161, 93, PrototypeId.MapTile("grass-3")),
|
||||
MapTile(161, -96, PrototypeId("tile", "water")),
|
||||
MapTile(161, -95, PrototypeId("tile", "grass-4")),
|
||||
MapTile(161, 94, PrototypeId("tile", "grass-4")),
|
||||
MapTile(161, 93, PrototypeId("tile", "grass-3")),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue