diff --git a/artwork/twitch/box-image.jpg b/artwork/twitch/box-image.jpg new file mode 100644 index 00000000..90526447 Binary files /dev/null and b/artwork/twitch/box-image.jpg differ diff --git a/artwork/twitch/box-image.psd b/artwork/twitch/box-image.psd new file mode 100644 index 00000000..ea3443fe --- /dev/null +++ b/artwork/twitch/box-image.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0cd2d82917e470202d38d32277f7519ccfd1821cb21791266539ddf07486d1b +size 7314327 diff --git a/res_built/atlas/atlas0_10.json b/res_built/atlas/atlas0_10.json index 52fb27cc..d7ffa8bc 100644 --- a/res_built/atlas/atlas0_10.json +++ b/res_built/atlas/atlas0_10.json @@ -568,6 +568,14 @@ "spriteSourceSize": {"x":0,"y":0,"w":10,"h":10}, "sourceSize": {"w":10,"h":10} }, +"sprites/misc/hub_direction_indicator.png": +{ + "frame": {"x":123,"y":72,"w":3,"h":3}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":3,"h":3}, + "sourceSize": {"w":3,"h":3} +}, "sprites/misc/slot_bad_arrow.png": { "frame": {"x":187,"y":114,"w":10,"h":10}, @@ -594,7 +602,7 @@ }, "sprites/misc/waypoint.png": { - "frame": {"x":123,"y":72,"w":3,"h":3}, + "frame": {"x":130,"y":72,"w":3,"h":3}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":3,"h":3}, @@ -607,6 +615,6 @@ "format": "RGBA8888", "size": {"w":407,"h":128}, "scale": "0.1", - "smartupdate": "$TexturePacker:SmartUpdate:3dd7a89f30024dd4787ad4af6b14588a:9ba11f8b02134c4376ab4e0a44f8b850:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:c588acae6c7c29ddcfb639fd48325e9a:613119f38acf12c0214ab0259858da18:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_10.png b/res_built/atlas/atlas0_10.png index 35d9ea6e..c9260919 100644 Binary files a/res_built/atlas/atlas0_10.png and b/res_built/atlas/atlas0_10.png differ diff --git a/res_built/atlas/atlas0_100.json b/res_built/atlas/atlas0_100.json index ed6e5338..831a4767 100644 --- a/res_built/atlas/atlas0_100.json +++ b/res_built/atlas/atlas0_100.json @@ -2,7 +2,7 @@ "sprites/belt/forward_0.png": { - "frame": {"x":1871,"y":1504,"w":100,"h":126}, + "frame": {"x":1341,"y":1646,"w":100,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":100,"h":126}, @@ -10,7 +10,7 @@ }, "sprites/belt/forward_1.png": { - "frame": {"x":1871,"y":240,"w":100,"h":126}, + "frame": {"x":1390,"y":1776,"w":100,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":100,"h":126}, @@ -18,7 +18,7 @@ }, "sprites/belt/forward_2.png": { - "frame": {"x":1844,"y":394,"w":100,"h":126}, + "frame": {"x":1380,"y":1448,"w":100,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":100,"h":126}, @@ -26,7 +26,7 @@ }, "sprites/belt/forward_3.png": { - "frame": {"x":1871,"y":1634,"w":100,"h":126}, + "frame": {"x":1446,"y":1279,"w":100,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":100,"h":126}, @@ -34,7 +34,7 @@ }, "sprites/belt/forward_4.png": { - "frame": {"x":1433,"y":785,"w":100,"h":126}, + "frame": {"x":1517,"y":1126,"w":100,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":100,"h":126}, @@ -42,7 +42,7 @@ }, "sprites/belt/forward_5.png": { - "frame": {"x":917,"y":1564,"w":100,"h":126}, + "frame": {"x":1445,"y":1578,"w":100,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":100,"h":126}, @@ -50,7 +50,7 @@ }, "sprites/belt/left_0.png": { - "frame": {"x":1021,"y":1563,"w":113,"h":113}, + "frame": {"x":1156,"y":1836,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":13,"w":113,"h":113}, @@ -58,7 +58,7 @@ }, "sprites/belt/left_1.png": { - "frame": {"x":1138,"y":1563,"w":113,"h":113}, + "frame": {"x":1273,"y":1836,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":13,"w":113,"h":113}, @@ -66,7 +66,7 @@ }, "sprites/belt/left_2.png": { - "frame": {"x":1255,"y":1563,"w":113,"h":113}, + "frame": {"x":1668,"y":1216,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":13,"w":113,"h":113}, @@ -74,7 +74,7 @@ }, "sprites/belt/left_3.png": { - "frame": {"x":1372,"y":1562,"w":113,"h":113}, + "frame": {"x":1668,"y":1333,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":13,"w":113,"h":113}, @@ -82,7 +82,7 @@ }, "sprites/belt/left_4.png": { - "frame": {"x":1489,"y":1562,"w":113,"h":113}, + "frame": {"x":1602,"y":1450,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":13,"w":113,"h":113}, @@ -90,7 +90,7 @@ }, "sprites/belt/left_5.png": { - "frame": {"x":1021,"y":1680,"w":113,"h":113}, + "frame": {"x":1719,"y":1450,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":13,"w":113,"h":113}, @@ -98,7 +98,7 @@ }, "sprites/belt/right_0.png": { - "frame": {"x":1138,"y":1680,"w":113,"h":113}, + "frame": {"x":1494,"y":1708,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":13,"w":113,"h":113}, @@ -106,7 +106,7 @@ }, "sprites/belt/right_1.png": { - "frame": {"x":1255,"y":1680,"w":113,"h":113}, + "frame": {"x":1494,"y":1825,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":13,"w":113,"h":113}, @@ -114,7 +114,7 @@ }, "sprites/belt/right_2.png": { - "frame": {"x":1372,"y":1679,"w":113,"h":113}, + "frame": {"x":1549,"y":1567,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":13,"w":113,"h":113}, @@ -122,7 +122,7 @@ }, "sprites/belt/right_3.png": { - "frame": {"x":1489,"y":1679,"w":113,"h":113}, + "frame": {"x":1666,"y":1567,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":13,"w":113,"h":113}, @@ -130,7 +130,7 @@ }, "sprites/belt/right_4.png": { - "frame": {"x":1606,"y":1676,"w":113,"h":113}, + "frame": {"x":1611,"y":1684,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":13,"w":113,"h":113}, @@ -138,7 +138,7 @@ }, "sprites/belt/right_5.png": { - "frame": {"x":1723,"y":1676,"w":113,"h":113}, + "frame": {"x":1611,"y":1801,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":13,"w":113,"h":113}, @@ -146,7 +146,7 @@ }, "sprites/blueprints/belt_left.png": { - "frame": {"x":1873,"y":122,"w":114,"h":114}, + "frame": {"x":1550,"y":1256,"w":114,"h":114}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":12,"w":114,"h":114}, @@ -154,7 +154,7 @@ }, "sprites/blueprints/belt_right.png": { - "frame": {"x":1873,"y":3,"w":114,"h":115}, + "frame": {"x":1484,"y":1409,"w":114,"h":115}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":12,"y":11,"w":114,"h":115}, @@ -162,7 +162,7 @@ }, "sprites/blueprints/belt_top.png": { - "frame": {"x":1871,"y":1374,"w":102,"h":126}, + "frame": {"x":1274,"y":1516,"w":102,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":12,"y":0,"w":102,"h":126}, @@ -170,7 +170,7 @@ }, "sprites/blueprints/cutter-quad.png": { - "frame": {"x":735,"y":395,"w":730,"h":191}, + "frame": {"x":3,"y":199,"w":730,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":23,"y":0,"w":730,"h":191}, @@ -178,7 +178,7 @@ }, "sprites/blueprints/cutter.png": { - "frame": {"x":726,"y":979,"w":341,"h":191}, + "frame": {"x":391,"y":588,"w":341,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":23,"y":0,"w":341,"h":191}, @@ -186,7 +186,7 @@ }, "sprites/blueprints/miner-chainable.png": { - "frame": {"x":1500,"y":1368,"w":182,"h":190}, + "frame": {"x":970,"y":1745,"w":182,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":182,"h":190}, @@ -194,7 +194,7 @@ }, "sprites/blueprints/miner.png": { - "frame": {"x":1437,"y":590,"w":182,"h":190}, + "frame": {"x":1074,"y":1339,"w":182,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":182,"h":190}, @@ -202,7 +202,7 @@ }, "sprites/blueprints/mixer.png": { - "frame": {"x":735,"y":590,"w":347,"h":191}, + "frame": {"x":1469,"y":391,"w":347,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":18,"y":0,"w":347,"h":191}, @@ -210,7 +210,7 @@ }, "sprites/blueprints/painter-double.png": { - "frame": {"x":3,"y":931,"w":384,"h":382}, + "frame": {"x":3,"y":588,"w":384,"h":382}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":0,"w":384,"h":382}, @@ -218,7 +218,7 @@ }, "sprites/blueprints/painter-quad.png": { - "frame": {"x":735,"y":3,"w":746,"h":192}, + "frame": {"x":3,"y":3,"w":746,"h":192}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":0,"w":746,"h":192}, @@ -226,7 +226,7 @@ }, "sprites/blueprints/painter.png": { - "frame": {"x":1485,"y":3,"w":384,"h":192}, + "frame": {"x":3,"y":1747,"w":384,"h":192}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":384,"h":192}, @@ -234,7 +234,7 @@ }, "sprites/blueprints/rotater-ccw.png": { - "frame": {"x":1116,"y":1368,"w":189,"h":191}, + "frame": {"x":532,"y":1359,"w":189,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":189,"h":191}, @@ -242,7 +242,7 @@ }, "sprites/blueprints/rotater.png": { - "frame": {"x":724,"y":1564,"w":189,"h":191}, + "frame": {"x":587,"y":978,"w":189,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":189,"h":191}, @@ -250,7 +250,7 @@ }, "sprites/blueprints/splitter-compact-inverse.png": { - "frame": {"x":1652,"y":394,"w":188,"h":182}, + "frame": {"x":519,"y":1555,"w":188,"h":182}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":188,"h":182}, @@ -258,7 +258,7 @@ }, "sprites/blueprints/splitter-compact.png": { - "frame": {"x":1623,"y":587,"w":185,"h":182}, + "frame": {"x":391,"y":1173,"w":185,"h":182}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":4,"w":185,"h":182}, @@ -266,7 +266,7 @@ }, "sprites/blueprints/splitter.png": { - "frame": {"x":1071,"y":979,"w":340,"h":191}, + "frame": {"x":391,"y":783,"w":340,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":23,"y":0,"w":340,"h":191}, @@ -274,7 +274,7 @@ }, "sprites/blueprints/stacker.png": { - "frame": {"x":1086,"y":590,"w":347,"h":191}, + "frame": {"x":1469,"y":586,"w":347,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":18,"y":0,"w":347,"h":191}, @@ -282,7 +282,7 @@ }, "sprites/blueprints/trash-storage.png": { - "frame": {"x":391,"y":931,"w":331,"h":384}, + "frame": {"x":1501,"y":3,"w":331,"h":384}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":29,"y":0,"w":331,"h":384}, @@ -290,7 +290,7 @@ }, "sprites/blueprints/trash.png": { - "frame": {"x":724,"y":1368,"w":192,"h":192}, + "frame": {"x":336,"y":1359,"w":192,"h":192}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":192,"h":192}, @@ -298,7 +298,7 @@ }, "sprites/blueprints/underground_belt_entry-tier2.png": { - "frame": {"x":1791,"y":1035,"w":183,"h":166}, + "frame": {"x":959,"y":1169,"w":183,"h":166}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":26,"w":183,"h":166}, @@ -306,7 +306,7 @@ }, "sprites/blueprints/underground_belt_entry.png": { - "frame": {"x":1812,"y":580,"w":182,"h":148}, + "frame": {"x":1260,"y":1296,"w":182,"h":148}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":44,"w":182,"h":148}, @@ -314,7 +314,7 @@ }, "sprites/blueprints/underground_belt_exit-tier2.png": { - "frame": {"x":1623,"y":773,"w":185,"h":148}, + "frame": {"x":1085,"y":1533,"w":185,"h":148}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":185,"h":148}, @@ -322,7 +322,7 @@ }, "sprites/blueprints/underground_belt_exit.png": { - "frame": {"x":1812,"y":732,"w":182,"h":148}, + "frame": {"x":1331,"y":1127,"w":182,"h":148}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":182,"h":148}, @@ -330,7 +330,7 @@ }, "sprites/buildings/belt_left.png": { - "frame": {"x":1021,"y":1563,"w":113,"h":113}, + "frame": {"x":1156,"y":1836,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":13,"w":113,"h":113}, @@ -338,7 +338,7 @@ }, "sprites/buildings/belt_right.png": { - "frame": {"x":1138,"y":1680,"w":113,"h":113}, + "frame": {"x":1494,"y":1708,"w":113,"h":113}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":13,"w":113,"h":113}, @@ -346,7 +346,7 @@ }, "sprites/buildings/belt_top.png": { - "frame": {"x":1871,"y":1504,"w":100,"h":126}, + "frame": {"x":1341,"y":1646,"w":100,"h":126}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":100,"h":126}, @@ -354,7 +354,7 @@ }, "sprites/buildings/cutter-quad.png": { - "frame": {"x":3,"y":737,"w":728,"h":190}, + "frame": {"x":3,"y":394,"w":728,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":24,"y":0,"w":728,"h":190}, @@ -362,7 +362,7 @@ }, "sprites/buildings/cutter.png": { - "frame": {"x":726,"y":1174,"w":339,"h":190}, + "frame": {"x":780,"y":975,"w":339,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":24,"y":0,"w":339,"h":190}, @@ -370,7 +370,7 @@ }, "sprites/buildings/hub.png": { - "frame": {"x":3,"y":3,"w":728,"h":730}, + "frame": {"x":737,"y":199,"w":728,"h":730}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":20,"y":22,"w":728,"h":730}, @@ -378,7 +378,7 @@ }, "sprites/buildings/miner-chainable.png": { - "frame": {"x":1469,"y":395,"w":179,"h":188}, + "frame": {"x":336,"y":1555,"w":179,"h":188}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":1,"w":179,"h":188}, @@ -386,7 +386,7 @@ }, "sprites/buildings/miner.png": { - "frame": {"x":1415,"y":979,"w":179,"h":189}, + "frame": {"x":711,"y":1554,"w":179,"h":189}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":0,"w":179,"h":189}, @@ -394,7 +394,7 @@ }, "sprites/buildings/mixer.png": { - "frame": {"x":735,"y":785,"w":345,"h":190}, + "frame": {"x":1469,"y":781,"w":345,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":19,"y":0,"w":345,"h":190}, @@ -402,7 +402,7 @@ }, "sprites/buildings/painter-double.png": { - "frame": {"x":3,"y":1317,"w":384,"h":381}, + "frame": {"x":3,"y":974,"w":384,"h":381}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":0,"w":384,"h":381}, @@ -410,7 +410,7 @@ }, "sprites/buildings/painter-quad.png": { - "frame": {"x":735,"y":199,"w":744,"h":192}, + "frame": {"x":753,"y":3,"w":744,"h":192}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":0,"w":744,"h":192}, @@ -418,7 +418,7 @@ }, "sprites/buildings/painter.png": { - "frame": {"x":1483,"y":199,"w":384,"h":191}, + "frame": {"x":391,"y":1747,"w":384,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":0,"w":384,"h":191}, @@ -426,7 +426,7 @@ }, "sprites/buildings/rotater-ccw.png": { - "frame": {"x":1309,"y":1368,"w":187,"h":190}, + "frame": {"x":779,"y":1747,"w":187,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":187,"h":190}, @@ -434,7 +434,7 @@ }, "sprites/buildings/rotater.png": { - "frame": {"x":1412,"y":1174,"w":187,"h":190}, + "frame": {"x":894,"y":1551,"w":187,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":187,"h":190}, @@ -442,7 +442,7 @@ }, "sprites/buildings/splitter-compact-inverse.png": { - "frame": {"x":1598,"y":925,"w":187,"h":180}, + "frame": {"x":580,"y":1173,"w":187,"h":180}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":5,"w":187,"h":180}, @@ -450,7 +450,7 @@ }, "sprites/buildings/splitter-compact.png": { - "frame": {"x":1603,"y":1109,"w":184,"h":180}, + "frame": {"x":771,"y":1173,"w":184,"h":180}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":5,"w":184,"h":180}, @@ -458,7 +458,7 @@ }, "sprites/buildings/splitter.png": { - "frame": {"x":1069,"y":1174,"w":339,"h":190}, + "frame": {"x":1123,"y":933,"w":339,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":24,"y":0,"w":339,"h":190}, @@ -466,7 +466,7 @@ }, "sprites/buildings/stacker.png": { - "frame": {"x":1084,"y":785,"w":345,"h":190}, + "frame": {"x":725,"y":1357,"w":345,"h":190}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":19,"y":0,"w":345,"h":190}, @@ -474,7 +474,7 @@ }, "sprites/buildings/trash-storage.png": { - "frame": {"x":391,"y":1319,"w":329,"h":384}, + "frame": {"x":3,"y":1359,"w":329,"h":384}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":30,"y":0,"w":329,"h":384}, @@ -482,7 +482,7 @@ }, "sprites/buildings/trash.png": { - "frame": {"x":920,"y":1368,"w":192,"h":191}, + "frame": {"x":391,"y":978,"w":192,"h":191}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":1,"w":192,"h":191}, @@ -490,7 +490,7 @@ }, "sprites/buildings/underground_belt_entry-tier2.png": { - "frame": {"x":1791,"y":1205,"w":181,"h":165}, + "frame": {"x":1146,"y":1127,"w":181,"h":165}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":27,"w":181,"h":165}, @@ -498,7 +498,7 @@ }, "sprites/buildings/underground_belt_entry.png": { - "frame": {"x":1686,"y":1374,"w":181,"h":147}, + "frame": {"x":1652,"y":975,"w":181,"h":147}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":45,"w":181,"h":147}, @@ -506,7 +506,7 @@ }, "sprites/buildings/underground_belt_exit-tier2.png": { - "frame": {"x":1812,"y":884,"w":182,"h":147}, + "frame": {"x":1466,"y":975,"w":182,"h":147}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":0,"w":182,"h":147}, @@ -514,7 +514,7 @@ }, "sprites/buildings/underground_belt_exit.png": { - "frame": {"x":1686,"y":1525,"w":181,"h":147}, + "frame": {"x":1156,"y":1685,"w":181,"h":147}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":0,"w":181,"h":147}, @@ -522,7 +522,7 @@ }, "sprites/debug/acceptor_slot.png": { - "frame": {"x":1603,"y":1293,"w":50,"h":64}, + "frame": {"x":1260,"y":1448,"w":50,"h":64}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":0,"w":50,"h":64}, @@ -530,7 +530,7 @@ }, "sprites/debug/ejector_slot.png": { - "frame": {"x":1606,"y":1562,"w":50,"h":64}, + "frame": {"x":1314,"y":1448,"w":50,"h":64}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":0,"w":50,"h":64}, @@ -538,7 +538,7 @@ }, "sprites/map_overview/belt_forward.png": { - "frame": {"x":353,"y":1702,"w":24,"h":32}, + "frame": {"x":1469,"y":263,"w":24,"h":32}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":0,"w":24,"h":32}, @@ -546,7 +546,7 @@ }, "sprites/map_overview/belt_left.png": { - "frame": {"x":1433,"y":915,"w":28,"h":28}, + "frame": {"x":1469,"y":199,"w":28,"h":28}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":28,"h":28}, @@ -554,7 +554,7 @@ }, "sprites/map_overview/belt_right.png": { - "frame": {"x":1433,"y":947,"w":28,"h":28}, + "frame": {"x":1469,"y":231,"w":28,"h":28}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":4,"w":28,"h":28}, @@ -562,15 +562,23 @@ }, "sprites/misc/deletion_marker.png": { - "frame": {"x":267,"y":1702,"w":82,"h":82}, + "frame": {"x":1728,"y":1684,"w":82,"h":82}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":7,"w":82,"h":82}, "sourceSize": {"w":96,"h":96} }, +"sprites/misc/hub_direction_indicator.png": +{ + "frame": {"x":735,"y":933,"w":32,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":32}, + "sourceSize": {"w":32,"h":32} +}, "sprites/misc/slot_bad_arrow.png": { - "frame": {"x":267,"y":1702,"w":82,"h":82}, + "frame": {"x":1728,"y":1684,"w":82,"h":82}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":7,"y":7,"w":82,"h":82}, @@ -578,7 +586,7 @@ }, "sprites/misc/slot_good_arrow.png": { - "frame": {"x":183,"y":1702,"w":80,"h":96}, + "frame": {"x":1728,"y":1770,"w":80,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":0,"w":80,"h":96}, @@ -586,7 +594,7 @@ }, "sprites/misc/storage_overlay.png": { - "frame": {"x":3,"y":1702,"w":176,"h":86}, + "frame": {"x":1621,"y":1126,"w":176,"h":86}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":4,"w":176,"h":86}, @@ -594,7 +602,7 @@ }, "sprites/misc/waypoint.png": { - "frame": {"x":1844,"y":524,"w":24,"h":32}, + "frame": {"x":1469,"y":299,"w":24,"h":32}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":0,"w":24,"h":32}, @@ -605,8 +613,8 @@ "version": "1.0", "image": "atlas0_100.png", "format": "RGBA8888", - "size": {"w":1997,"h":1801}, + "size": {"w":1836,"h":1952}, "scale": "1", - "smartupdate": "$TexturePacker:SmartUpdate:3dd7a89f30024dd4787ad4af6b14588a:9ba11f8b02134c4376ab4e0a44f8b850:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:c588acae6c7c29ddcfb639fd48325e9a:613119f38acf12c0214ab0259858da18:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_100.png b/res_built/atlas/atlas0_100.png index 570464fe..c79e8b8f 100644 Binary files a/res_built/atlas/atlas0_100.png and b/res_built/atlas/atlas0_100.png differ diff --git a/res_built/atlas/atlas0_25.json b/res_built/atlas/atlas0_25.json index 2969f3de..7e9fff95 100644 --- a/res_built/atlas/atlas0_25.json +++ b/res_built/atlas/atlas0_25.json @@ -568,6 +568,14 @@ "spriteSourceSize": {"x":1,"y":1,"w":22,"h":22}, "sourceSize": {"w":24,"h":24} }, +"sprites/misc/hub_direction_indicator.png": +{ + "frame": {"x":499,"y":55,"w":8,"h":8}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":8,"h":8}, + "sourceSize": {"w":8,"h":8} +}, "sprites/misc/slot_bad_arrow.png": { "frame": {"x":181,"y":365,"w":22,"h":22}, @@ -594,7 +602,7 @@ }, "sprites/misc/waypoint.png": { - "frame": {"x":499,"y":55,"w":8,"h":8}, + "frame": {"x":487,"y":67,"w":8,"h":8}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":8,"h":8}, @@ -607,6 +615,6 @@ "format": "RGBA8888", "size": {"w":510,"h":512}, "scale": "0.25", - "smartupdate": "$TexturePacker:SmartUpdate:3dd7a89f30024dd4787ad4af6b14588a:9ba11f8b02134c4376ab4e0a44f8b850:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:c588acae6c7c29ddcfb639fd48325e9a:613119f38acf12c0214ab0259858da18:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_25.png b/res_built/atlas/atlas0_25.png index c7c7041e..583415a4 100644 Binary files a/res_built/atlas/atlas0_25.png and b/res_built/atlas/atlas0_25.png differ diff --git a/res_built/atlas/atlas0_50.json b/res_built/atlas/atlas0_50.json index 8fd9b5ba..73ecf002 100644 --- a/res_built/atlas/atlas0_50.json +++ b/res_built/atlas/atlas0_50.json @@ -2,7 +2,7 @@ "sprites/belt/forward_0.png": { - "frame": {"x":49,"y":1765,"w":51,"h":63}, + "frame": {"x":98,"y":1854,"w":51,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":51,"h":63}, @@ -10,7 +10,7 @@ }, "sprites/belt/forward_1.png": { - "frame": {"x":3,"y":1902,"w":51,"h":63}, + "frame": {"x":153,"y":1854,"w":51,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":51,"h":63}, @@ -18,7 +18,7 @@ }, "sprites/belt/forward_2.png": { - "frame": {"x":58,"y":1902,"w":51,"h":63}, + "frame": {"x":155,"y":1787,"w":51,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":51,"h":63}, @@ -26,7 +26,7 @@ }, "sprites/belt/forward_3.png": { - "frame": {"x":113,"y":1887,"w":51,"h":63}, + "frame": {"x":208,"y":1854,"w":51,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":51,"h":63}, @@ -34,7 +34,7 @@ }, "sprites/belt/forward_4.png": { - "frame": {"x":168,"y":1830,"w":51,"h":63}, + "frame": {"x":210,"y":1785,"w":51,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":51,"h":63}, @@ -42,7 +42,7 @@ }, "sprites/belt/forward_5.png": { - "frame": {"x":168,"y":1897,"w":51,"h":63}, + "frame": {"x":263,"y":1852,"w":51,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":51,"h":63}, @@ -50,7 +50,7 @@ }, "sprites/belt/left_0.png": { - "frame": {"x":104,"y":1765,"w":57,"h":57}, + "frame": {"x":381,"y":175,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":6,"w":57,"h":57}, @@ -58,7 +58,7 @@ }, "sprites/belt/left_1.png": { - "frame": {"x":165,"y":1769,"w":57,"h":57}, + "frame": {"x":99,"y":1665,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":6,"w":57,"h":57}, @@ -66,7 +66,7 @@ }, "sprites/belt/left_2.png": { - "frame": {"x":104,"y":1826,"w":57,"h":57}, + "frame": {"x":99,"y":1726,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":6,"w":57,"h":57}, @@ -74,7 +74,7 @@ }, "sprites/belt/left_3.png": { - "frame": {"x":226,"y":1782,"w":57,"h":57}, + "frame": {"x":98,"y":1921,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":6,"w":57,"h":57}, @@ -82,7 +82,7 @@ }, "sprites/belt/left_4.png": { - "frame": {"x":287,"y":1782,"w":57,"h":57}, + "frame": {"x":159,"y":1921,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":6,"w":57,"h":57}, @@ -90,7 +90,7 @@ }, "sprites/belt/left_5.png": { - "frame": {"x":348,"y":1835,"w":57,"h":57}, + "frame": {"x":220,"y":1921,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":6,"w":57,"h":57}, @@ -98,7 +98,7 @@ }, "sprites/belt/right_0.png": { - "frame": {"x":409,"y":1835,"w":57,"h":57}, + "frame": {"x":281,"y":1919,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":6,"w":57,"h":57}, @@ -106,7 +106,7 @@ }, "sprites/belt/right_1.png": { - "frame": {"x":223,"y":1896,"w":57,"h":57}, + "frame": {"x":265,"y":1782,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":6,"w":57,"h":57}, @@ -114,7 +114,7 @@ }, "sprites/belt/right_2.png": { - "frame": {"x":284,"y":1843,"w":57,"h":57}, + "frame": {"x":318,"y":1843,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":6,"w":57,"h":57}, @@ -122,7 +122,7 @@ }, "sprites/belt/right_3.png": { - "frame": {"x":284,"y":1904,"w":57,"h":57}, + "frame": {"x":326,"y":1782,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":6,"w":57,"h":57}, @@ -130,7 +130,7 @@ }, "sprites/belt/right_4.png": { - "frame": {"x":345,"y":1896,"w":57,"h":57}, + "frame": {"x":342,"y":1904,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":6,"w":57,"h":57}, @@ -138,7 +138,7 @@ }, "sprites/belt/right_5.png": { - "frame": {"x":406,"y":1896,"w":57,"h":57}, + "frame": {"x":379,"y":1843,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":6,"w":57,"h":57}, @@ -146,7 +146,7 @@ }, "sprites/blueprints/belt_left.png": { - "frame": {"x":178,"y":1707,"w":58,"h":58}, + "frame": {"x":381,"y":51,"w":58,"h":58}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":5,"w":58,"h":58}, @@ -154,7 +154,7 @@ }, "sprites/blueprints/belt_right.png": { - "frame": {"x":370,"y":1773,"w":58,"h":58}, + "frame": {"x":381,"y":113,"w":58,"h":58}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":5,"w":58,"h":58}, @@ -162,7 +162,7 @@ }, "sprites/blueprints/belt_top.png": { - "frame": {"x":3,"y":1835,"w":53,"h":63}, + "frame": {"x":98,"y":1787,"w":53,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":53,"h":63}, @@ -178,7 +178,7 @@ }, "sprites/blueprints/cutter.png": { - "frame": {"x":3,"y":1465,"w":172,"h":96}, + "frame": {"x":296,"y":1404,"w":172,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":0,"w":172,"h":96}, @@ -186,7 +186,7 @@ }, "sprites/blueprints/miner-chainable.png": { - "frame": {"x":179,"y":1507,"w":92,"h":96}, + "frame": {"x":182,"y":1507,"w":92,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":92,"h":96}, @@ -202,7 +202,7 @@ }, "sprites/blueprints/mixer.png": { - "frame": {"x":296,"y":1217,"w":175,"h":96}, + "frame": {"x":3,"y":1365,"w":175,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":0,"w":175,"h":96}, @@ -234,7 +234,7 @@ }, "sprites/blueprints/rotater-ccw.png": { - "frame": {"x":373,"y":249,"w":96,"h":96}, + "frame": {"x":373,"y":236,"w":96,"h":96}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":96,"h":96}, @@ -242,7 +242,7 @@ }, "sprites/blueprints/rotater.png": { - "frame": {"x":373,"y":349,"w":96,"h":96}, + "frame": {"x":373,"y":336,"w":96,"h":96}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":96,"h":96}, @@ -250,7 +250,7 @@ }, "sprites/blueprints/splitter-compact-inverse.png": { - "frame": {"x":370,"y":849,"w":95,"h":93}, + "frame": {"x":370,"y":836,"w":95,"h":93}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":1,"w":95,"h":93}, @@ -258,7 +258,7 @@ }, "sprites/blueprints/splitter-compact.png": { - "frame": {"x":369,"y":1120,"w":93,"h":93}, + "frame": {"x":369,"y":1107,"w":93,"h":93}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":1,"w":93,"h":93}, @@ -266,7 +266,7 @@ }, "sprites/blueprints/splitter.png": { - "frame": {"x":3,"y":1565,"w":171,"h":96}, + "frame": {"x":279,"y":1504,"w":171,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":0,"w":171,"h":96}, @@ -274,7 +274,7 @@ }, "sprites/blueprints/stacker.png": { - "frame": {"x":296,"y":1317,"w":175,"h":96}, + "frame": {"x":3,"y":1465,"w":175,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":0,"w":175,"h":96}, @@ -290,7 +290,7 @@ }, "sprites/blueprints/trash.png": { - "frame": {"x":373,"y":449,"w":96,"h":96}, + "frame": {"x":373,"y":436,"w":96,"h":96}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":96,"h":96}, @@ -314,7 +314,7 @@ }, "sprites/blueprints/underground_belt_exit-tier2.png": { - "frame": {"x":369,"y":1041,"w":94,"h":75}, + "frame": {"x":369,"y":1028,"w":94,"h":75}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":94,"h":75}, @@ -322,7 +322,7 @@ }, "sprites/blueprints/underground_belt_exit.png": { - "frame": {"x":181,"y":1428,"w":93,"h":75}, + "frame": {"x":182,"y":1428,"w":93,"h":75}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":93,"h":75}, @@ -330,7 +330,7 @@ }, "sprites/buildings/belt_left.png": { - "frame": {"x":104,"y":1765,"w":57,"h":57}, + "frame": {"x":381,"y":175,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":6,"w":57,"h":57}, @@ -338,7 +338,7 @@ }, "sprites/buildings/belt_right.png": { - "frame": {"x":409,"y":1835,"w":57,"h":57}, + "frame": {"x":281,"y":1919,"w":57,"h":57}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":6,"w":57,"h":57}, @@ -346,7 +346,7 @@ }, "sprites/buildings/belt_top.png": { - "frame": {"x":49,"y":1765,"w":51,"h":63}, + "frame": {"x":98,"y":1854,"w":51,"h":63}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":6,"y":0,"w":51,"h":63}, @@ -362,7 +362,7 @@ }, "sprites/buildings/cutter.png": { - "frame": {"x":275,"y":1517,"w":171,"h":96}, + "frame": {"x":3,"y":1565,"w":171,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":0,"w":171,"h":96}, @@ -378,7 +378,7 @@ }, "sprites/buildings/miner-chainable.png": { - "frame": {"x":381,"y":3,"w":91,"h":95}, + "frame": {"x":3,"y":1752,"w":91,"h":95}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":91,"h":95}, @@ -386,7 +386,7 @@ }, "sprites/buildings/miner.png": { - "frame": {"x":381,"y":102,"w":91,"h":95}, + "frame": {"x":3,"y":1851,"w":91,"h":95}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":91,"h":95}, @@ -394,7 +394,7 @@ }, "sprites/buildings/mixer.png": { - "frame": {"x":296,"y":1417,"w":174,"h":96}, + "frame": {"x":296,"y":1204,"w":174,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":9,"y":0,"w":174,"h":96}, @@ -426,7 +426,7 @@ }, "sprites/buildings/rotater-ccw.png": { - "frame": {"x":373,"y":649,"w":95,"h":96}, + "frame": {"x":373,"y":636,"w":95,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":95,"h":96}, @@ -434,7 +434,7 @@ }, "sprites/buildings/rotater.png": { - "frame": {"x":373,"y":749,"w":95,"h":96}, + "frame": {"x":373,"y":736,"w":95,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":95,"h":96}, @@ -442,7 +442,7 @@ }, "sprites/buildings/splitter-compact-inverse.png": { - "frame": {"x":370,"y":946,"w":94,"h":91}, + "frame": {"x":370,"y":933,"w":94,"h":91}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":2,"w":94,"h":91}, @@ -458,7 +458,7 @@ }, "sprites/buildings/splitter.png": { - "frame": {"x":3,"y":1665,"w":171,"h":96}, + "frame": {"x":278,"y":1604,"w":171,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":0,"w":171,"h":96}, @@ -466,7 +466,7 @@ }, "sprites/buildings/stacker.png": { - "frame": {"x":3,"y":1365,"w":174,"h":96}, + "frame": {"x":296,"y":1304,"w":174,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":9,"y":0,"w":174,"h":96}, @@ -482,7 +482,7 @@ }, "sprites/buildings/trash.png": { - "frame": {"x":373,"y":549,"w":96,"h":96}, + "frame": {"x":373,"y":536,"w":96,"h":96}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":96,"h":96}, @@ -490,7 +490,7 @@ }, "sprites/buildings/underground_belt_entry-tier2.png": { - "frame": {"x":274,"y":1617,"w":92,"h":83}, + "frame": {"x":3,"y":1665,"w":92,"h":83}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":13,"w":92,"h":83}, @@ -498,7 +498,7 @@ }, "sprites/buildings/underground_belt_entry.png": { - "frame": {"x":370,"y":1617,"w":92,"h":74}, + "frame": {"x":274,"y":1704,"w":92,"h":74}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":22,"w":92,"h":74}, @@ -506,7 +506,7 @@ }, "sprites/buildings/underground_belt_exit-tier2.png": { - "frame": {"x":370,"y":1695,"w":92,"h":74}, + "frame": {"x":370,"y":1704,"w":92,"h":74}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":92,"h":74}, @@ -514,7 +514,7 @@ }, "sprites/buildings/underground_belt_exit.png": { - "frame": {"x":274,"y":1704,"w":92,"h":74}, + "frame": {"x":160,"y":1707,"w":92,"h":74}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":92,"h":74}, @@ -522,7 +522,7 @@ }, "sprites/debug/acceptor_slot.png": { - "frame": {"x":240,"y":1707,"w":26,"h":32}, + "frame": {"x":443,"y":51,"w":26,"h":32}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":26,"h":32}, @@ -530,7 +530,7 @@ }, "sprites/debug/ejector_slot.png": { - "frame": {"x":240,"y":1743,"w":26,"h":32}, + "frame": {"x":443,"y":87,"w":26,"h":32}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":26,"h":32}, @@ -538,7 +538,7 @@ }, "sprites/map_overview/belt_forward.png": { - "frame": {"x":181,"y":1365,"w":14,"h":16}, + "frame": {"x":442,"y":181,"w":14,"h":16}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":14,"h":16}, @@ -546,7 +546,7 @@ }, "sprites/map_overview/belt_left.png": { - "frame": {"x":342,"y":1166,"w":15,"h":15}, + "frame": {"x":443,"y":143,"w":15,"h":15}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":1,"w":15,"h":15}, @@ -554,7 +554,7 @@ }, "sprites/map_overview/belt_right.png": { - "frame": {"x":342,"y":1185,"w":15,"h":15}, + "frame": {"x":443,"y":162,"w":15,"h":15}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":15,"h":15}, @@ -562,15 +562,23 @@ }, "sprites/misc/deletion_marker.png": { - "frame": {"x":296,"y":1166,"w":42,"h":42}, + "frame": {"x":403,"y":1904,"w":42,"h":42}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":3,"w":42,"h":42}, "sourceSize": {"w":48,"h":48} }, +"sprites/misc/hub_direction_indicator.png": +{ + "frame": {"x":443,"y":123,"w":16,"h":16}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":16,"h":16}, + "sourceSize": {"w":16,"h":16} +}, "sprites/misc/slot_bad_arrow.png": { - "frame": {"x":296,"y":1166,"w":42,"h":42}, + "frame": {"x":403,"y":1904,"w":42,"h":42}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":3,"w":42,"h":42}, @@ -578,7 +586,7 @@ }, "sprites/misc/slot_good_arrow.png": { - "frame": {"x":3,"y":1782,"w":42,"h":48}, + "frame": {"x":387,"y":1782,"w":42,"h":48}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":3,"y":0,"w":42,"h":48}, @@ -586,7 +594,7 @@ }, "sprites/misc/storage_overlay.png": { - "frame": {"x":381,"y":201,"w":89,"h":44}, + "frame": {"x":381,"y":3,"w":89,"h":44}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":89,"h":44}, @@ -594,7 +602,7 @@ }, "sprites/misc/waypoint.png": { - "frame": {"x":181,"y":1385,"w":14,"h":16}, + "frame": {"x":442,"y":201,"w":14,"h":16}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":14,"h":16}, @@ -605,8 +613,8 @@ "version": "1.0", "image": "atlas0_50.png", "format": "RGBA8888", - "size": {"w":475,"h":1968}, + "size": {"w":473,"h":1981}, "scale": "0.5", - "smartupdate": "$TexturePacker:SmartUpdate:3dd7a89f30024dd4787ad4af6b14588a:9ba11f8b02134c4376ab4e0a44f8b850:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:c588acae6c7c29ddcfb639fd48325e9a:613119f38acf12c0214ab0259858da18:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_50.png b/res_built/atlas/atlas0_50.png index ea864923..fb99b325 100644 Binary files a/res_built/atlas/atlas0_50.png and b/res_built/atlas/atlas0_50.png differ diff --git a/res_built/atlas/atlas0_75.json b/res_built/atlas/atlas0_75.json index 23042b66..fa6ed475 100644 --- a/res_built/atlas/atlas0_75.json +++ b/res_built/atlas/atlas0_75.json @@ -538,7 +538,7 @@ }, "sprites/map_overview/belt_forward.png": { - "frame": {"x":1625,"y":997,"w":20,"h":24}, + "frame": {"x":1653,"y":997,"w":20,"h":24}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":20,"h":24}, @@ -568,6 +568,14 @@ "spriteSourceSize": {"x":5,"y":5,"w":62,"h":62}, "sourceSize": {"w":72,"h":72} }, +"sprites/misc/hub_direction_indicator.png": +{ + "frame": {"x":1625,"y":997,"w":24,"h":24}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":24,"h":24}, + "sourceSize": {"w":24,"h":24} +}, "sprites/misc/slot_bad_arrow.png": { "frame": {"x":1716,"y":953,"w":62,"h":62}, @@ -594,7 +602,7 @@ }, "sprites/misc/waypoint.png": { - "frame": {"x":1649,"y":997,"w":20,"h":24}, + "frame": {"x":1677,"y":997,"w":20,"h":24}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":20,"h":24}, @@ -607,6 +615,6 @@ "format": "RGBA8888", "size": {"w":2016,"h":1024}, "scale": "0.75", - "smartupdate": "$TexturePacker:SmartUpdate:3dd7a89f30024dd4787ad4af6b14588a:9ba11f8b02134c4376ab4e0a44f8b850:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:c588acae6c7c29ddcfb639fd48325e9a:613119f38acf12c0214ab0259858da18:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_75.png b/res_built/atlas/atlas0_75.png index d6185e44..387e51eb 100644 Binary files a/res_built/atlas/atlas0_75.png and b/res_built/atlas/atlas0_75.png differ diff --git a/res_raw/sprites/misc/hub_direction_indicator.png b/res_raw/sprites/misc/hub_direction_indicator.png new file mode 100644 index 00000000..006ba8fa Binary files /dev/null and b/res_raw/sprites/misc/hub_direction_indicator.png differ diff --git a/src/css/ingame_hud/dialogs.scss b/src/css/ingame_hud/dialogs.scss index 2e1c417d..366ab8ce 100644 --- a/src/css/ingame_hud/dialogs.scss +++ b/src/css/ingame_hud/dialogs.scss @@ -122,6 +122,10 @@ color: #aaa; } + a { + color: $colorBlueBright; + } + strong { font-weight: bold; } diff --git a/src/css/ingame_hud/waypoints.scss b/src/css/ingame_hud/waypoints.scss index fee1ec37..e10163fc 100644 --- a/src/css/ingame_hud/waypoints.scss +++ b/src/css/ingame_hud/waypoints.scss @@ -47,6 +47,7 @@ opacity: 0.7; @include S(margin-bottom, 1px); font-weight: bold; + &:hover { opacity: 1; } @@ -63,5 +64,27 @@ transform: scale(1.5); } } + + &.hub { + // Transform because there is a canvas before + @include S(margin-left, -2px); + + grid-template-columns: auto 1fr; + background: none !important; + @include S(padding-left, 0); + canvas { + @include S(width, 12px); + @include S(height, 12px); + @include S(margin-right, 1px); + } + } + + &.shapeIcon { + canvas { + @include S(width, 15px); + @include S(height, 15px); + pointer-events: none; + } + } } } diff --git a/src/js/changelog.js b/src/js/changelog.js index 87a7d9db..1e31ed09 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -1,4 +1,12 @@ export const CHANGELOG = [ + { + version: "1.1.14", + date: "unreleased", + entries: [ + "There is now an indicator (compass) to the HUB for the HUB Marker!", + "You can now include shape short keys in markers to render shape icons instead of text!", + ], + }, { version: "1.1.13", date: "15.06.2020", diff --git a/src/js/game/hud/parts/waypoints.js b/src/js/game/hud/parts/waypoints.js index 82187e55..ebd8ec6a 100644 --- a/src/js/game/hud/parts/waypoints.js +++ b/src/js/game/hud/parts/waypoints.js @@ -1,5 +1,5 @@ import { makeOffscreenBuffer } from "../../../core/buffer_utils"; -import { Math_max } from "../../../core/builtins"; +import { Math_max, Math_PI, Math_radians } from "../../../core/builtins"; import { globalConfig, IS_DEMO } from "../../../core/config"; import { DrawParameters } from "../../../core/draw_parameters"; import { Loader } from "../../../core/loader"; @@ -7,7 +7,7 @@ import { DialogWithForm } from "../../../core/modal_dialog_elements"; import { FormElementInput } from "../../../core/modal_dialog_forms"; import { Rectangle } from "../../../core/rectangle"; import { STOP_PROPAGATION } from "../../../core/signal"; -import { arrayDeleteValue, lerp, makeDiv, removeAllChildren } from "../../../core/utils"; +import { arrayDeleteValue, lerp, makeDiv, removeAllChildren, clamp } from "../../../core/utils"; import { Vector } from "../../../core/vector"; import { T } from "../../../translations"; import { enumMouseButton } from "../../camera"; @@ -15,16 +15,26 @@ import { KEYMAPPINGS } from "../../key_action_mapper"; import { BaseHUDPart } from "../base_hud_part"; import { DynamicDomAttach } from "../dynamic_dom_attach"; import { enumNotificationType } from "./notifications"; +import { ShapeDefinition } from "../../shape_definition"; /** @typedef {{ - * label: string, + * label: string | null, * center: { x: number, y: number }, - * zoomLevel: number, - * deletable: boolean + * zoomLevel: number * }} Waypoint */ +/** + * Used when a shape icon is rendered instead + */ +const SHAPE_LABEL_PLACEHOLDER = " "; + export class HUDWaypoints extends BaseHUDPart { + /** + * Creates the overview of waypoints + * @param {HTMLElement} parent + */ createElements(parent) { + // Create the helper box on the lower right when zooming out if (this.root.app.settings.getAllSettings().offerHints) { this.hintElement = makeDiv( parent, @@ -42,17 +52,23 @@ export class HUDWaypoints extends BaseHUDPart { ); } - this.waypointSprite = Loader.getSprite("sprites/misc/waypoint.png"); - + // Create the waypoint list on the upper right this.waypointsListElement = makeDiv(parent, "ingame_HUD_Waypoints", [], "Waypoints"); } + /** + * Serializes the waypoints + */ serialize() { return { waypoints: this.waypoints, }; } + /** + * Deserializes the waypoints + * @param {{waypoints: Array}} data + */ deserialize(data) { if (!data || !data.waypoints || !Array.isArray(data.waypoints)) { return "Invalid waypoints data"; @@ -61,21 +77,97 @@ export class HUDWaypoints extends BaseHUDPart { this.rerenderWaypointList(); } + /** + * Initializes everything + */ + initialize() { + // Cache the sprite for the waypoints + this.waypointSprite = Loader.getSprite("sprites/misc/waypoint.png"); + this.directionIndicatorSprite = Loader.getSprite("sprites/misc/hub_direction_indicator.png"); + + /** @type {Array} + */ + this.waypoints = [ + { + label: null, + center: { x: 0, y: 0 }, + zoomLevel: 3, + }, + ]; + + // Create a buffer we can use to measure text + this.dummyBuffer = makeOffscreenBuffer(1, 1, { + reusable: false, + label: "waypoints-measure-canvas", + })[1]; + + // Dynamically attach/detach the lower right hint in the map overview + if (this.hintElement) { + this.domAttach = new DynamicDomAttach(this.root, this.hintElement); + } + + // Catch mouse and key events + this.root.camera.downPreHandler.add(this.onMouseDown, this); + this.root.keyMapper + .getBinding(KEYMAPPINGS.navigation.createMarker) + .add(this.requestCreateMarker, this); + + /** + * Stores at how much opacity the markers should be rendered on the map. + * This is interpolated over multiple frames so we have some sort of fade effect + */ + this.currentMarkerOpacity = 1; + this.currentCompassOpacity = 0; + + // Create buffer which is used to indicate the hub direction + const [canvas, context] = makeOffscreenBuffer(48, 48, { + smooth: true, + reusable: false, + label: "waypoints-compass", + }); + this.compassBuffer = { canvas, context }; + + /** + * Stores a cache from a shape short key to its canvas representation + */ + this.cachedKeyToCanvas = {}; + + // Initial render + this.rerenderWaypointList(); + } + + /** + * Re-renders the waypoint list to account for changes + */ rerenderWaypointList() { removeAllChildren(this.waypointsListElement); this.cleanupClickDetectors(); for (let i = 0; i < this.waypoints.length; ++i) { const waypoint = this.waypoints[i]; + const label = this.getWaypointLabel(waypoint); const element = makeDiv(this.waypointsListElement, null, ["waypoint"]); - element.innerText = waypoint.label; - if (waypoint.deletable) { + if (ShapeDefinition.isValidShortKey(label)) { + const canvas = this.getWaypointCanvas(waypoint); + element.appendChild(canvas); + element.classList.add("shapeIcon"); + } else { + element.innerText = label; + } + + if (this.isWaypointDeletable(waypoint)) { const deleteButton = makeDiv(element, null, ["deleteButton"]); this.trackClicks(deleteButton, () => this.deleteWaypoint(waypoint)); } + if (!waypoint.label) { + // This must be the hub label + element.classList.add("hub"); + element.insertBefore(this.compassBuffer.canvas, element.childNodes[0]); + } + this.trackClicks(element, () => this.moveToWaypoint(waypoint), { targetOnly: true, }); @@ -83,6 +175,7 @@ export class HUDWaypoints extends BaseHUDPart { } /** + * Moves the camera to a given waypoint * @param {Waypoint} waypoint */ moveToWaypoint(waypoint) { @@ -91,6 +184,7 @@ export class HUDWaypoints extends BaseHUDPart { } /** + * Deletes a waypoint from the list * @param {Waypoint} waypoint */ deleteWaypoint(waypoint) { @@ -98,86 +192,131 @@ export class HUDWaypoints extends BaseHUDPart { this.rerenderWaypointList(); } - initialize() { - /** @type {Array} - */ - this.waypoints = [ - { - label: T.ingame.waypoints.hub, - center: { x: 0, y: 0 }, - zoomLevel: 3, - deletable: false, - }, - ]; - - this.dummyBuffer = makeOffscreenBuffer(1, 1, { - reusable: false, - label: "waypoints-measure-canvas", - })[1]; - - this.root.camera.downPreHandler.add(this.onMouseDown, this); - - if (this.hintElement) { - this.domAttach = new DynamicDomAttach(this.root, this.hintElement); + /** + * Gets the canvas for a given waypoint + * @param {Waypoint} waypoint + * @returns {HTMLCanvasElement} + */ + getWaypointCanvas(waypoint) { + const key = waypoint.label; + if (this.cachedKeyToCanvas[key]) { + return this.cachedKeyToCanvas[key]; } - this.root.keyMapper - .getBinding(KEYMAPPINGS.navigation.createMarker) - .add(this.requestCreateMarker, this); - - this.currentMarkerOpacity = 1; - this.rerenderWaypointList(); + assert(ShapeDefinition.isValidShortKey(key), "Invalid short key: " + key); + const definition = ShapeDefinition.fromShortKey(key); + const preRendered = definition.generateAsCanvas(48); + return (this.cachedKeyToCanvas[key] = preRendered); } /** + * Requests to create a marker at the current camera position. If worldPos is set, + * uses that position instead. * @param {Vector=} worldPos Override the world pos, otherwise it is the camera position */ requestCreateMarker(worldPos = null) { + // Construct dialog with input field const markerNameInput = new FormElementInput({ id: "markerName", label: null, placeholder: "", - validator: val => val.length > 0 && val.length < 15, + validator: val => val.length > 0 && (val.length < 15 || ShapeDefinition.isValidShortKey(val)), }); - const dialog = new DialogWithForm({ app: this.root.app, title: T.dialogs.createMarker.title, desc: T.dialogs.createMarker.desc, formElements: [markerNameInput], }); - this.root.hud.parts.dialogs.internalShowDialog(dialog); + // Compute where to create the marker const center = worldPos || this.root.camera.center; dialog.buttonSignals.ok.add(() => { + // Show info that you can have only N markers in the demo, + // actually show this *after* entering the name so you want the + // standalone even more (I'm evil :P) if (IS_DEMO && this.waypoints.length > 2) { this.root.hud.parts.dialogs.showFeatureRestrictionInfo("", T.dialogs.markerDemoLimit.desc); return; } - this.waypoints.push({ - label: markerNameInput.getValue(), - center: { x: center.x, y: center.y }, - zoomLevel: Math_max(this.root.camera.zoomLevel, globalConfig.mapChunkOverviewMinZoom + 0.05), - deletable: true, - }); - this.waypoints.sort((a, b) => a.label.padStart(20, "0").localeCompare(b.label.padStart(20, "0"))); - this.root.hud.signals.notification.dispatch( - T.ingame.waypoints.creationSuccessNotification, - enumNotificationType.success - ); - this.rerenderWaypointList(); + // Actually create the waypoint + this.addWaypoint(markerNameInput.getValue(), center); }); } + /** + * Adds a new waypoint at the given location with the given label + * @param {string} label + * @param {Vector} position + */ + addWaypoint(label, position) { + this.waypoints.push({ + label, + center: { x: position.x, y: position.y }, + // Make sure the zoom is *just* a bit above the zoom level where the map overview + // starts, so you always see all buildings + zoomLevel: Math_max(this.root.camera.zoomLevel, globalConfig.mapChunkOverviewMinZoom + 0.05), + }); + + // Sort waypoints by name + this.waypoints.sort((a, b) => { + if (!a.label) { + return -1; + } + if (!b.label) { + return 1; + } + return this.getWaypointLabel(a) + .padEnd(20, "0") + .localeCompare(this.getWaypointLabel(b).padEnd(20, "0")); + }); + + // Show notification about creation + this.root.hud.signals.notification.dispatch( + T.ingame.waypoints.creationSuccessNotification, + enumNotificationType.success + ); + + // Re-render the list and thus add it + this.rerenderWaypointList(); + } + + /** + * Called every frame to update stuff + */ update() { if (this.domAttach) { this.domAttach.update(this.root.camera.getIsMapOverlayActive()); } } + /** + * Returns the label for a given waypoint + * @param {Waypoint} waypoint + * @returns {string} + */ + getWaypointLabel(waypoint) { + return waypoint.label || T.ingame.waypoints.hub; + } + + /** + * Returns if a waypoint is deletable + * @param {Waypoint} waypoint + * @returns {boolean} + */ + isWaypointDeletable(waypoint) { + return waypoint.label !== null; + } + + /** + * Finds the currently intersected waypoint on the map overview under + * the cursor. + * + * @returns {Waypoint | null} + */ findCurrentIntersectedWaypoint() { const mousePos = this.root.app.mousePosition; if (!mousePos) { @@ -197,10 +336,18 @@ export class HUDWaypoints extends BaseHUDPart { const screenPos = this.root.camera.worldToScreen( new Vector(waypoint.center.x, waypoint.center.y) ); + + let label = this.getWaypointLabel(waypoint); + + // Special case for icons + if (ShapeDefinition.isValidShortKey(label)) { + label = SHAPE_LABEL_PLACEHOLDER; + } + const intersectionRect = new Rectangle( screenPos.x - 7 * scale, screenPos.y - 12 * scale, - 15 * scale + this.dummyBuffer.measureText(waypoint.label).width, + 15 * scale + this.dummyBuffer.measureText(label).width, 15 * scale ); if (intersectionRect.containsPoint(mousePos.x, mousePos.y)) { @@ -210,7 +357,7 @@ export class HUDWaypoints extends BaseHUDPart { } /** - * + * Mouse-Down handler * @param {Vector} pos * @param {enumMouseButton} button */ @@ -221,7 +368,7 @@ export class HUDWaypoints extends BaseHUDPart { this.root.soundProxy.playUiClick(); this.moveToWaypoint(waypoint); } else if (button === enumMouseButton.right) { - if (waypoint.deletable) { + if (this.isWaypointDeletable(waypoint)) { this.root.soundProxy.playUiClick(); this.deleteWaypoint(waypoint); } else { @@ -243,50 +390,111 @@ export class HUDWaypoints extends BaseHUDPart { } /** - * + * Rerenders the compass + */ + rerenderWaypointsCompass() { + const context = this.compassBuffer.context; + const dims = 48; + context.clearRect(0, 0, dims, dims); + const indicatorSize = 30; + + const cameraPos = this.root.camera.center; + + const distanceToHub = cameraPos.length(); + const compassVisible = distanceToHub > (10 * globalConfig.tileSize) / this.root.camera.zoomLevel; + const targetCompassAlpha = compassVisible ? 1 : 0; + this.currentCompassOpacity = lerp(this.currentCompassOpacity, targetCompassAlpha, 0.08); + + if (this.currentCompassOpacity > 0.01) { + context.globalAlpha = this.currentCompassOpacity; + const angle = cameraPos.angle() + Math_radians(45) + Math_PI / 2; + context.translate(dims / 2, dims / 2); + context.rotate(angle); + this.directionIndicatorSprite.drawCentered(context, 0, 0, indicatorSize); + context.rotate(-angle); + context.translate(-dims / 2, -dims / 2); + context.globalAlpha = 1; + } + + const iconOpacity = 1 - this.currentCompassOpacity; + if (iconOpacity > 0.01) { + // Draw icon + context.globalAlpha = iconOpacity; + this.waypointSprite.drawCentered(context, dims / 2, dims / 2, dims * 0.7); + context.globalAlpha = 1; + } + } + + /** + * Draws the waypoints on the map * @param {DrawParameters} parameters */ draw(parameters) { const desiredOpacity = this.root.camera.getIsMapOverlayActive() ? 1 : 0; this.currentMarkerOpacity = lerp(this.currentMarkerOpacity, desiredOpacity, 0.08); + this.rerenderWaypointsCompass(); + + // Don't render with low opacity if (this.currentMarkerOpacity < 0.01) { return; } + // Find waypoint below cursor const selected = this.findCurrentIntersectedWaypoint(); + // Determine rendering scale const scale = (1 / this.root.camera.zoomLevel) * this.root.app.getEffectiveUiScale(); + // Render all of 'em for (let i = 0; i < this.waypoints.length; ++i) { const waypoint = this.waypoints[i]; const pos = waypoint.center; - parameters.context.globalAlpha = this.currentMarkerOpacity * (selected === waypoint ? 1 : 0.7); const yOffset = -5 * scale; + const originalLabel = this.getWaypointLabel(waypoint); + let renderLabel = originalLabel; + let isShapeIcon = false; - parameters.context.font = "bold " + 12 * scale + "px GameFont"; + if (ShapeDefinition.isValidShortKey(originalLabel)) { + renderLabel = SHAPE_LABEL_PLACEHOLDER; + isShapeIcon = true; + } + // Render the background rectangle + parameters.context.font = "bold " + 12 * scale + "px GameFont"; parameters.context.fillStyle = "rgba(255, 255, 255, 0.7)"; parameters.context.fillRect( pos.x - 7 * scale, pos.y - 12 * scale, - 15 * scale + this.dummyBuffer.measureText(waypoint.label).width / this.root.camera.zoomLevel, + 15 * scale + this.dummyBuffer.measureText(renderLabel).width / this.root.camera.zoomLevel, 15 * scale ); - parameters.context.fillStyle = "#000"; - parameters.context.textAlign = "left"; - parameters.context.textBaseline = "middle"; - parameters.context.fillText(waypoint.label, pos.x + 6 * scale, pos.y + 0.5 * scale + yOffset); - - parameters.context.textBaseline = "alphabetic"; - parameters.context.textAlign = "left"; + // Render the text + if (isShapeIcon) { + const canvas = this.getWaypointCanvas(waypoint); + parameters.context.drawImage( + canvas, + pos.x + 6 * scale, + pos.y - 11.5 * scale, + 14 * scale, + 14 * scale + ); + } else { + // Render the text + parameters.context.fillStyle = "#000"; + parameters.context.textBaseline = "middle"; + parameters.context.fillText(renderLabel, pos.x + 6 * scale, pos.y + 0.5 * scale + yOffset); + parameters.context.textBaseline = "alphabetic"; + } + // Render the small icon on the left this.waypointSprite.drawCentered(parameters.context, pos.x, pos.y + yOffset, 10 * scale); } + parameters.context.globalAlpha = 1; } } diff --git a/src/js/game/shape_definition.js b/src/js/game/shape_definition.js index 64cc3eab..ee71b506 100644 --- a/src/js/game/shape_definition.js +++ b/src/js/game/shape_definition.js @@ -70,6 +70,12 @@ export function createSimpleShape(layers) { return layers; } +/** + * Cache which shapes are valid short keys and which not + * @type {Map} + */ +const SHORT_KEY_CACHE = new Map(); + export class ShapeDefinition extends BasicSerializableObject { static getId() { return "ShapeDefinition"; @@ -114,6 +120,8 @@ export class ShapeDefinition extends BasicSerializableObject { /** * Generates the definition from the given short key + * @param {string} key + * @returns {ShapeDefinition} */ static fromShortKey(key) { const sourceLayers = key.split(":"); @@ -147,6 +155,81 @@ export class ShapeDefinition extends BasicSerializableObject { return definition; } + /** + * Checks if a given string is a valid short key + * @param {string} key + * @returns {boolean} + */ + static isValidShortKey(key) { + if (SHORT_KEY_CACHE.has(key)) { + return SHORT_KEY_CACHE.get(key); + } + + const result = ShapeDefinition.isValidShortKeyInternal(key); + SHORT_KEY_CACHE.set(key, result); + return result; + } + + /** + * INTERNAL + * Checks if a given string is a valid short key + * @param {string} key + * @returns {boolean} + */ + static isValidShortKeyInternal(key) { + const sourceLayers = key.split(":"); + let layers = []; + for (let i = 0; i < sourceLayers.length; ++i) { + const text = sourceLayers[i]; + if (text.length !== 8) { + return false; + } + + /** @type {ShapeLayer} */ + const quads = [null, null, null, null]; + let anyFilled = false; + for (let quad = 0; quad < 4; ++quad) { + const shapeText = text[quad * 2 + 0]; + const colorText = text[quad * 2 + 1]; + const subShape = enumShortcodeToSubShape[shapeText]; + const color = enumShortcodeToColor[colorText]; + + // Valid shape + if (subShape) { + if (!color) { + // Invalid color + return false; + } + quads[quad] = { + subShape, + color, + }; + anyFilled = true; + } else if (shapeText === "-") { + // Make sure color is empty then, too + if (colorText !== "-") { + return false; + } + } else { + // Invalid shape key + return false; + } + } + + if (!anyFilled) { + // Empty layer + return false; + } + layers.push(quads); + } + + if (layers.length === 0) { + return false; + } + + return true; + } + /** * Internal method to clone the shape definition * @returns {Array} diff --git a/src/js/savegame/savegame.js b/src/js/savegame/savegame.js index b67a8d0d..359a48b5 100644 --- a/src/js/savegame/savegame.js +++ b/src/js/savegame/savegame.js @@ -13,6 +13,7 @@ import { getSavegameInterface, savegameInterfaces } from "./savegame_interface_r import { SavegameInterface_V1001 } from "./schemas/1001"; import { SavegameInterface_V1002 } from "./schemas/1002"; import { SavegameInterface_V1003 } from "./schemas/1003"; +import { SavegameInterface_V1004 } from "./schemas/1004"; const logger = createLogger("savegame"); @@ -44,7 +45,7 @@ export class Savegame extends ReadWriteProxy { * @returns {number} */ static getCurrentVersion() { - return 1003; + return 1004; } /** @@ -98,6 +99,11 @@ export class Savegame extends ReadWriteProxy { data.version = 1003; } + if (data.version === 1003) { + SavegameInterface_V1004.migrate1003to1004(data); + data.version = 1004; + } + return ExplainedResult.good(); } diff --git a/src/js/savegame/savegame_interface_registry.js b/src/js/savegame/savegame_interface_registry.js index 8c28fcc9..6144ca62 100644 --- a/src/js/savegame/savegame_interface_registry.js +++ b/src/js/savegame/savegame_interface_registry.js @@ -4,6 +4,7 @@ import { createLogger } from "../core/logging"; import { SavegameInterface_V1001 } from "./schemas/1001"; import { SavegameInterface_V1002 } from "./schemas/1002"; import { SavegameInterface_V1003 } from "./schemas/1003"; +import { SavegameInterface_V1004 } from "./schemas/1004"; /** @type {Object.} */ export const savegameInterfaces = { @@ -11,6 +12,7 @@ export const savegameInterfaces = { 1001: SavegameInterface_V1001, 1002: SavegameInterface_V1002, 1003: SavegameInterface_V1003, + 1004: SavegameInterface_V1004, }; const logger = createLogger("savegame_interface_registry"); diff --git a/src/js/savegame/schemas/1004.js b/src/js/savegame/schemas/1004.js new file mode 100644 index 00000000..c9feda1a --- /dev/null +++ b/src/js/savegame/schemas/1004.js @@ -0,0 +1,36 @@ +import { createLogger } from "../../core/logging.js"; +import { SavegameInterface_V1003 } from "./1003.js"; + +const schema = require("./1004.json"); +const logger = createLogger("savegame_interface/1004"); + +export class SavegameInterface_V1004 extends SavegameInterface_V1003 { + getVersion() { + return 1004; + } + + getSchemaUncached() { + return schema; + } + + /** + * @param {import("../savegame_typedefs.js").SavegameData} data + */ + static migrate1003to1004(data) { + logger.log("Migrating 1003 to 1004"); + const dump = data.dump; + if (!dump) { + return true; + } + + // The hub simply has an empty label + const waypointData = dump.waypoints.waypoints; + for (let i = 0; i < waypointData.length; ++i) { + const waypoint = waypointData[i]; + if (!waypoint.deletable) { + waypoint.label = null; + } + delete waypoint.deletable; + } + } +} diff --git a/src/js/savegame/schemas/1004.json b/src/js/savegame/schemas/1004.json new file mode 100644 index 00000000..6682f615 --- /dev/null +++ b/src/js/savegame/schemas/1004.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "required": [], + "additionalProperties": true +} diff --git a/translations/base-en.yaml b/translations/base-en.yaml index 1b0314ed..1be11cef 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -255,7 +255,7 @@ dialogs: createMarker: title: New Marker - desc: Give it a meaningful name + desc: Give it a meaningful name, you can also include a short key of a shape (Which you can generate here) markerDemoLimit: desc: You can only create two custom markers in the demo. Get the standalone for unlimited markers! diff --git a/version b/version index 0437331a..f662c7e9 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.1.13 \ No newline at end of file +1.1.14 \ No newline at end of file