diff --git a/res/ui/building_icons/splitter.png b/res/ui/building_icons/balancer.png similarity index 100% rename from res/ui/building_icons/splitter.png rename to res/ui/building_icons/balancer.png diff --git a/res/ui/building_tutorials/splitter-compact.png b/res/ui/building_tutorials/balancer-merger.png similarity index 100% rename from res/ui/building_tutorials/splitter-compact.png rename to res/ui/building_tutorials/balancer-merger.png diff --git a/res/ui/building_tutorials/balancer-splitter.png b/res/ui/building_tutorials/balancer-splitter.png new file mode 100644 index 00000000..d03103b2 Binary files /dev/null and b/res/ui/building_tutorials/balancer-splitter.png differ diff --git a/res/ui/building_tutorials/splitter.png b/res/ui/building_tutorials/balancer.png similarity index 100% rename from res/ui/building_tutorials/splitter.png rename to res/ui/building_tutorials/balancer.png diff --git a/res/ui/building_tutorials/splitter-compact-inverse.png b/res/ui/building_tutorials/splitter-compact-inverse.png deleted file mode 100644 index 38965f4d..00000000 Binary files a/res/ui/building_tutorials/splitter-compact-inverse.png and /dev/null differ diff --git a/res_built/atlas/atlas0_hq.json b/res_built/atlas/atlas0_hq.json index ae19521e..50304df8 100644 --- a/res_built/atlas/atlas0_hq.json +++ b/res_built/atlas/atlas0_hq.json @@ -2,7 +2,7 @@ "sprites/belt/built/forward_0.png": { - "frame": {"x":1601,"y":603,"w":116,"h":144}, + "frame": {"x":1867,"y":593,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -10,7 +10,7 @@ }, "sprites/belt/built/forward_1.png": { - "frame": {"x":701,"y":1456,"w":116,"h":144}, + "frame": {"x":1241,"y":1197,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -18,7 +18,7 @@ }, "sprites/belt/built/forward_2.png": { - "frame": {"x":1476,"y":1720,"w":116,"h":144}, + "frame": {"x":1558,"y":753,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -26,7 +26,7 @@ }, "sprites/belt/built/forward_3.png": { - "frame": {"x":1598,"y":1720,"w":116,"h":144}, + "frame": {"x":1555,"y":903,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -34,7 +34,7 @@ }, "sprites/belt/built/forward_4.png": { - "frame": {"x":1440,"y":753,"w":116,"h":144}, + "frame": {"x":1562,"y":1053,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -42,7 +42,7 @@ }, "sprites/belt/built/forward_5.png": { - "frame": {"x":1440,"y":903,"w":116,"h":144}, + "frame": {"x":1680,"y":753,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -50,7 +50,7 @@ }, "sprites/belt/built/forward_6.png": { - "frame": {"x":1562,"y":753,"w":116,"h":144}, + "frame": {"x":1677,"y":903,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -58,7 +58,7 @@ }, "sprites/belt/built/forward_7.png": { - "frame": {"x":1562,"y":903,"w":116,"h":144}, + "frame": {"x":1684,"y":1053,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -66,7 +66,7 @@ }, "sprites/belt/built/forward_8.png": { - "frame": {"x":1569,"y":1053,"w":116,"h":144}, + "frame": {"x":1802,"y":743,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -74,7 +74,7 @@ }, "sprites/belt/built/forward_9.png": { - "frame": {"x":1684,"y":753,"w":116,"h":144}, + "frame": {"x":1924,"y":743,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -82,7 +82,7 @@ }, "sprites/belt/built/forward_10.png": { - "frame": {"x":1871,"y":593,"w":116,"h":144}, + "frame": {"x":1363,"y":1195,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -90,7 +90,7 @@ }, "sprites/belt/built/forward_11.png": { - "frame": {"x":846,"y":1597,"w":116,"h":144}, + "frame": {"x":845,"y":1548,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -98,7 +98,7 @@ }, "sprites/belt/built/forward_12.png": { - "frame": {"x":1109,"y":1729,"w":116,"h":144}, + "frame": {"x":1436,"y":753,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -106,7 +106,7 @@ }, "sprites/belt/built/forward_13.png": { - "frame": {"x":1354,"y":1720,"w":116,"h":144}, + "frame": {"x":1433,"y":903,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -114,7 +114,7 @@ }, "sprites/belt/built/left_0.png": { - "frame": {"x":711,"y":896,"w":130,"h":130}, + "frame": {"x":569,"y":1845,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -122,7 +122,7 @@ }, "sprites/belt/built/left_1.png": { - "frame": {"x":711,"y":1032,"w":130,"h":130}, + "frame": {"x":1426,"y":1053,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -130,7 +130,7 @@ }, "sprites/belt/built/left_2.png": { - "frame": {"x":1376,"y":1195,"w":130,"h":130}, + "frame": {"x":1893,"y":1189,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -138,7 +138,7 @@ }, "sprites/belt/built/left_3.png": { - "frame": {"x":1378,"y":1331,"w":130,"h":130}, + "frame": {"x":1241,"y":1347,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -146,7 +146,7 @@ }, "sprites/belt/built/left_4.png": { - "frame": {"x":1356,"y":1584,"w":130,"h":130}, + "frame": {"x":1377,"y":1345,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -154,7 +154,7 @@ }, "sprites/belt/built/left_5.png": { - "frame": {"x":1492,"y":1584,"w":130,"h":130}, + "frame": {"x":1513,"y":1339,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -162,7 +162,7 @@ }, "sprites/belt/built/left_6.png": { - "frame": {"x":1433,"y":1053,"w":130,"h":130}, + "frame": {"x":1649,"y":1339,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -170,7 +170,7 @@ }, "sprites/belt/built/left_7.png": { - "frame": {"x":1691,"y":1053,"w":130,"h":130}, + "frame": {"x":1785,"y":1339,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -178,7 +178,7 @@ }, "sprites/belt/built/left_8.png": { - "frame": {"x":1806,"y":743,"w":130,"h":130}, + "frame": {"x":1377,"y":1481,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -186,7 +186,7 @@ }, "sprites/belt/built/left_9.png": { - "frame": {"x":1806,"y":879,"w":130,"h":130}, + "frame": {"x":1802,"y":1475,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -194,7 +194,7 @@ }, "sprites/belt/built/left_10.png": { - "frame": {"x":841,"y":1747,"w":130,"h":130}, + "frame": {"x":1485,"y":1203,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -202,7 +202,7 @@ }, "sprites/belt/built/left_11.png": { - "frame": {"x":1240,"y":1195,"w":130,"h":130}, + "frame": {"x":1621,"y":1203,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -210,7 +210,7 @@ }, "sprites/belt/built/left_12.png": { - "frame": {"x":1230,"y":1448,"w":130,"h":130}, + "frame": {"x":1757,"y":1203,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -218,7 +218,7 @@ }, "sprites/belt/built/left_13.png": { - "frame": {"x":1220,"y":1584,"w":130,"h":130}, + "frame": {"x":1806,"y":1053,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -226,7 +226,7 @@ }, "sprites/belt/built/right_0.png": { - "frame": {"x":1827,"y":1015,"w":130,"h":130}, + "frame": {"x":1799,"y":1611,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -234,7 +234,7 @@ }, "sprites/belt/built/right_1.png": { - "frame": {"x":1514,"y":1290,"w":130,"h":130}, + "frame": {"x":294,"y":1885,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -242,7 +242,7 @@ }, "sprites/belt/built/right_2.png": { - "frame": {"x":1650,"y":1461,"w":130,"h":130}, + "frame": {"x":1239,"y":1483,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -250,7 +250,7 @@ }, "sprites/belt/built/right_3.png": { - "frame": {"x":1827,"y":1287,"w":130,"h":130}, + "frame": {"x":997,"y":1785,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -258,7 +258,7 @@ }, "sprites/belt/built/right_4.png": { - "frame": {"x":1824,"y":1423,"w":130,"h":130}, + "frame": {"x":1375,"y":1617,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -266,7 +266,7 @@ }, "sprites/belt/built/right_5.png": { - "frame": {"x":1720,"y":1684,"w":130,"h":130}, + "frame": {"x":1511,"y":1710,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -274,7 +274,7 @@ }, "sprites/belt/built/right_6.png": { - "frame": {"x":1720,"y":1820,"w":130,"h":130}, + "frame": {"x":1647,"y":1710,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -282,7 +282,7 @@ }, "sprites/belt/built/right_7.png": { - "frame": {"x":1865,"y":1559,"w":130,"h":130}, + "frame": {"x":1783,"y":1747,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -290,7 +290,7 @@ }, "sprites/belt/built/right_8.png": { - "frame": {"x":1856,"y":1695,"w":130,"h":130}, + "frame": {"x":1111,"y":1635,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -298,7 +298,7 @@ }, "sprites/belt/built/right_9.png": { - "frame": {"x":1856,"y":1831,"w":130,"h":130}, + "frame": {"x":1133,"y":1771,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -306,7 +306,7 @@ }, "sprites/belt/built/right_10.png": { - "frame": {"x":1514,"y":1426,"w":130,"h":130}, + "frame": {"x":430,"y":1885,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -314,7 +314,7 @@ }, "sprites/belt/built/right_11.png": { - "frame": {"x":1827,"y":1151,"w":130,"h":130}, + "frame": {"x":967,"y":1513,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -322,7 +322,7 @@ }, "sprites/belt/built/right_12.png": { - "frame": {"x":1691,"y":1189,"w":130,"h":130}, + "frame": {"x":975,"y":1649,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -330,15 +330,55 @@ }, "sprites/belt/built/right_13.png": { - "frame": {"x":1650,"y":1325,"w":130,"h":130}, + "frame": {"x":1103,"y":1444,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, "sourceSize": {"w":144,"h":144} }, +"sprites/blueprints/balancer-merger-inverse.png": +{ + "frame": {"x":993,"y":753,"w":142,"h":138}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":142,"h":138}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/blueprints/balancer-merger.png": +{ + "frame": {"x":1281,"y":1051,"w":139,"h":138}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":5,"y":2,"w":139,"h":138}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/blueprints/balancer-splitter-inverse.png": +{ + "frame": {"x":1141,"y":753,"w":142,"h":138}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":142,"h":138}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/blueprints/balancer-splitter.png": +{ + "frame": {"x":664,"y":1174,"w":139,"h":138}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":5,"y":2,"w":139,"h":138}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/blueprints/balancer.png": +{ + "frame": {"x":298,"y":709,"w":257,"h":144}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":17,"y":0,"w":257,"h":144}, + "sourceSize": {"w":288,"h":144} +}, "sprites/blueprints/belt_left.png": { - "frame": {"x":294,"y":1885,"w":130,"h":130}, + "frame": {"x":1168,"y":1907,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -346,7 +386,7 @@ }, "sprites/blueprints/belt_right.png": { - "frame": {"x":430,"y":1885,"w":130,"h":130}, + "frame": {"x":1269,"y":1753,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -354,7 +394,7 @@ }, "sprites/blueprints/belt_top.png": { - "frame": {"x":1684,"y":903,"w":116,"h":144}, + "frame": {"x":1799,"y":903,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -362,7 +402,7 @@ }, "sprites/blueprints/constant_signal.png": { - "frame": {"x":913,"y":1883,"w":105,"h":127}, + "frame": {"x":1921,"y":1325,"w":105,"h":127}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":20,"y":0,"w":105,"h":127}, @@ -378,7 +418,7 @@ }, "sprites/blueprints/cutter.png": { - "frame": {"x":298,"y":709,"w":256,"h":144}, + "frame": {"x":4,"y":1589,"w":256,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":17,"y":0,"w":256,"h":144}, @@ -386,7 +426,7 @@ }, "sprites/blueprints/display.png": { - "frame": {"x":1096,"y":1437,"w":128,"h":136}, + "frame": {"x":841,"y":1698,"w":128,"h":136}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":8,"y":8,"w":128,"h":136}, @@ -402,7 +442,7 @@ }, "sprites/blueprints/lever.png": { - "frame": {"x":566,"y":1885,"w":111,"h":129}, + "frame": {"x":1921,"y":893,"w":111,"h":129}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":17,"y":4,"w":111,"h":129}, @@ -410,7 +450,7 @@ }, "sprites/blueprints/logic_gate-not.png": { - "frame": {"x":823,"y":1447,"w":123,"h":144}, + "frame": {"x":1596,"y":603,"w":123,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":0,"w":123,"h":144}, @@ -450,7 +490,7 @@ }, "sprites/blueprints/miner-chainable.png": { - "frame": {"x":710,"y":597,"w":136,"h":143}, + "frame": {"x":522,"y":1159,"w":136,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":136,"h":143}, @@ -458,7 +498,7 @@ }, "sprites/blueprints/miner.png": { - "frame": {"x":522,"y":1159,"w":136,"h":143}, + "frame": {"x":1725,"y":593,"w":136,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":136,"h":143}, @@ -466,7 +506,7 @@ }, "sprites/blueprints/mixer.png": { - "frame": {"x":4,"y":1589,"w":261,"h":144}, + "frame": {"x":298,"y":859,"w":261,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":13,"y":0,"w":261,"h":144}, @@ -506,7 +546,7 @@ }, "sprites/blueprints/reader.png": { - "frame": {"x":271,"y":1585,"w":141,"h":144}, + "frame": {"x":266,"y":1585,"w":141,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":141,"h":144}, @@ -536,46 +576,6 @@ "spriteSourceSize": {"x":1,"y":0,"w":143,"h":144}, "sourceSize": {"w":144,"h":144} }, -"sprites/blueprints/splitter-compact-inverse.png": -{ - "frame": {"x":997,"y":753,"w":142,"h":138}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":2,"w":142,"h":138}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/blueprints/splitter-compact-merge-inverse.png": -{ - "frame": {"x":1145,"y":753,"w":142,"h":138}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":2,"w":142,"h":138}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/blueprints/splitter-compact-merge.png": -{ - "frame": {"x":1143,"y":1046,"w":139,"h":138}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":2,"w":139,"h":138}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/blueprints/splitter-compact.png": -{ - "frame": {"x":1288,"y":1051,"w":139,"h":138}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":2,"w":139,"h":138}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/blueprints/splitter.png": -{ - "frame": {"x":298,"y":859,"w":257,"h":144}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":17,"y":0,"w":257,"h":144}, - "sourceSize": {"w":288,"h":144} -}, "sprites/blueprints/stacker.png": { "frame": {"x":4,"y":1739,"w":261,"h":144}, @@ -602,7 +602,7 @@ }, "sprites/blueprints/underground_belt_entry-tier2.png": { - "frame": {"x":804,"y":1316,"w":138,"h":125}, + "frame": {"x":954,"y":1188,"w":138,"h":125}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":19,"w":138,"h":125}, @@ -610,7 +610,7 @@ }, "sprites/blueprints/underground_belt_entry.png": { - "frame": {"x":557,"y":1456,"w":138,"h":112}, + "frame": {"x":954,"y":1319,"w":138,"h":112}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":32,"w":138,"h":112}, @@ -618,7 +618,7 @@ }, "sprites/blueprints/underground_belt_exit-tier2.png": { - "frame": {"x":701,"y":1606,"w":139,"h":112}, + "frame": {"x":1513,"y":1475,"w":139,"h":112}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":0,"w":139,"h":112}, @@ -626,7 +626,7 @@ }, "sprites/blueprints/underground_belt_exit.png": { - "frame": {"x":948,"y":1320,"w":138,"h":112}, + "frame": {"x":1658,"y":1475,"w":138,"h":112}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":0,"w":138,"h":112}, @@ -642,7 +642,7 @@ }, "sprites/blueprints/virtual_processor-painter.png": { - "frame": {"x":711,"y":746,"w":130,"h":144}, + "frame": {"x":711,"y":597,"w":130,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":130,"h":144}, @@ -650,7 +650,7 @@ }, "sprites/blueprints/virtual_processor-rotater.png": { - "frame": {"x":1096,"y":1579,"w":118,"h":144}, + "frame": {"x":1162,"y":897,"w":118,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":118,"h":144}, @@ -658,7 +658,7 @@ }, "sprites/blueprints/virtual_processor-shapecompare.png": { - "frame": {"x":847,"y":897,"w":144,"h":133}, + "frame": {"x":715,"y":897,"w":144,"h":133}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":0,"w":144,"h":133}, @@ -666,7 +666,7 @@ }, "sprites/blueprints/virtual_processor-stacker.png": { - "frame": {"x":565,"y":1574,"w":130,"h":144}, + "frame": {"x":569,"y":1695,"w":130,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":130,"h":144}, @@ -682,7 +682,7 @@ }, "sprites/blueprints/virtual_processor.png": { - "frame": {"x":852,"y":604,"w":144,"h":141}, + "frame": {"x":847,"y":604,"w":144,"h":141}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":3,"w":144,"h":141}, @@ -706,7 +706,7 @@ }, "sprites/blueprints/wire-turn.png": { - "frame": {"x":1341,"y":1870,"w":82,"h":82}, + "frame": {"x":557,"y":1456,"w":82,"h":82}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":62,"y":62,"w":82,"h":82}, @@ -714,7 +714,7 @@ }, "sprites/blueprints/wire.png": { - "frame": {"x":1992,"y":1695,"w":20,"h":144}, + "frame": {"x":1980,"y":1028,"w":20,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":62,"y":0,"w":20,"h":144}, @@ -722,7 +722,7 @@ }, "sprites/blueprints/wire_tunnel-coating.png": { - "frame": {"x":1942,"y":743,"w":33,"h":134}, + "frame": {"x":526,"y":1009,"w":33,"h":134}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":56,"y":5,"w":33,"h":134}, @@ -730,15 +730,55 @@ }, "sprites/blueprints/wire_tunnel.png": { - "frame": {"x":952,"y":1438,"w":138,"h":135}, + "frame": {"x":807,"y":1320,"w":138,"h":135}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":4,"y":4,"w":138,"h":135}, "sourceSize": {"w":144,"h":144} }, +"sprites/buildings/balancer-merger-inverse.png": +{ + "frame": {"x":864,"y":1036,"w":141,"h":136}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":3,"w":141,"h":136}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/buildings/balancer-merger.png": +{ + "frame": {"x":662,"y":1318,"w":139,"h":136}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":5,"y":3,"w":139,"h":136}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/buildings/balancer-splitter-inverse.png": +{ + "frame": {"x":1014,"y":897,"w":142,"h":136}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":3,"w":142,"h":136}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/buildings/balancer-splitter.png": +{ + "frame": {"x":809,"y":1178,"w":139,"h":136}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":5,"y":3,"w":139,"h":136}, + "sourceSize": {"w":144,"h":144} +}, +"sprites/buildings/balancer.png": +{ + "frame": {"x":260,"y":1158,"w":256,"h":143}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":17,"y":0,"w":256,"h":143}, + "sourceSize": {"w":288,"h":144} +}, "sprites/buildings/belt_left.png": { - "frame": {"x":711,"y":896,"w":130,"h":130}, + "frame": {"x":569,"y":1845,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":14,"w":130,"h":130}, @@ -746,7 +786,7 @@ }, "sprites/buildings/belt_right.png": { - "frame": {"x":1827,"y":1015,"w":130,"h":130}, + "frame": {"x":1799,"y":1611,"w":130,"h":130}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":14,"w":130,"h":130}, @@ -754,7 +794,7 @@ }, "sprites/buildings/belt_top.png": { - "frame": {"x":1601,"y":603,"w":116,"h":144}, + "frame": {"x":1867,"y":593,"w":116,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":116,"h":144}, @@ -762,7 +802,7 @@ }, "sprites/buildings/constant_signal.png": { - "frame": {"x":1108,"y":1879,"w":104,"h":127}, + "frame": {"x":1938,"y":1458,"w":104,"h":127}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":20,"y":0,"w":104,"h":127}, @@ -778,7 +818,7 @@ }, "sprites/buildings/cutter.png": { - "frame": {"x":260,"y":1158,"w":256,"h":143}, + "frame": {"x":258,"y":1307,"w":256,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":17,"y":0,"w":256,"h":143}, @@ -786,7 +826,7 @@ }, "sprites/buildings/display.png": { - "frame": {"x":977,"y":1729,"w":126,"h":135}, + "frame": {"x":841,"y":1840,"w":126,"h":135}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":9,"y":9,"w":126,"h":135}, @@ -810,7 +850,7 @@ }, "sprites/buildings/lever.png": { - "frame": {"x":683,"y":1874,"w":109,"h":127}, + "frame": {"x":1935,"y":1611,"w":109,"h":127}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":18,"y":5,"w":109,"h":127}, @@ -818,7 +858,7 @@ }, "sprites/buildings/logic_gate-not.png": { - "frame": {"x":968,"y":1579,"w":122,"h":144}, + "frame": {"x":715,"y":747,"w":122,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":12,"y":0,"w":122,"h":144}, @@ -842,7 +882,7 @@ }, "sprites/buildings/logic_gate-xor.png": { - "frame": {"x":1002,"y":604,"w":143,"h":143}, + "frame": {"x":997,"y":604,"w":143,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":143,"h":143}, @@ -850,7 +890,7 @@ }, "sprites/buildings/logic_gate.png": { - "frame": {"x":847,"y":1036,"w":143,"h":132}, + "frame": {"x":715,"y":1036,"w":143,"h":132}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":143,"h":132}, @@ -866,7 +906,7 @@ }, "sprites/buildings/miner.png": { - "frame": {"x":662,"y":1308,"w":136,"h":142}, + "frame": {"x":560,"y":1547,"w":136,"h":142}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":136,"h":142}, @@ -914,7 +954,7 @@ }, "sprites/buildings/reader.png": { - "frame": {"x":418,"y":1585,"w":141,"h":144}, + "frame": {"x":413,"y":1585,"w":141,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":141,"h":144}, @@ -922,7 +962,7 @@ }, "sprites/buildings/rotater-ccw.png": { - "frame": {"x":1293,"y":753,"w":141,"h":143}, + "frame": {"x":1289,"y":753,"w":141,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":141,"h":143}, @@ -930,7 +970,7 @@ }, "sprites/buildings/rotater-rotate180.png": { - "frame": {"x":1146,"y":897,"w":141,"h":143}, + "frame": {"x":1286,"y":902,"w":141,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":141,"h":143}, @@ -938,52 +978,12 @@ }, "sprites/buildings/rotater.png": { - "frame": {"x":1293,"y":902,"w":141,"h":143}, + "frame": {"x":1011,"y":1039,"w":141,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":141,"h":143}, "sourceSize": {"w":144,"h":144} }, -"sprites/buildings/splitter-compact-inverse.png": -{ - "frame": {"x":996,"y":1036,"w":141,"h":136}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":3,"w":141,"h":136}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/buildings/splitter-compact-merge-inverse.png": -{ - "frame": {"x":1723,"y":593,"w":142,"h":136}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":3,"w":142,"h":136}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/buildings/splitter-compact-merge.png": -{ - "frame": {"x":807,"y":1174,"w":139,"h":136}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":3,"w":139,"h":136}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/buildings/splitter-compact.png": -{ - "frame": {"x":952,"y":1178,"w":139,"h":136}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":3,"w":139,"h":136}, - "sourceSize": {"w":144,"h":144} -}, -"sprites/buildings/splitter.png": -{ - "frame": {"x":258,"y":1307,"w":256,"h":143}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":17,"y":0,"w":256,"h":143}, - "sourceSize": {"w":288,"h":144} -}, "sprites/buildings/stacker.png": { "frame": {"x":260,"y":1009,"w":260,"h":143}, @@ -1010,7 +1010,7 @@ }, "sprites/buildings/underground_belt_entry-tier2.png": { - "frame": {"x":1097,"y":1190,"w":137,"h":124}, + "frame": {"x":1098,"y":1197,"w":137,"h":124}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":20,"w":137,"h":124}, @@ -1018,7 +1018,7 @@ }, "sprites/buildings/underground_belt_entry.png": { - "frame": {"x":1092,"y":1320,"w":137,"h":111}, + "frame": {"x":1098,"y":1327,"w":137,"h":111}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":33,"w":137,"h":111}, @@ -1026,7 +1026,7 @@ }, "sprites/buildings/underground_belt_exit-tier2.png": { - "frame": {"x":1235,"y":1331,"w":137,"h":111}, + "frame": {"x":1513,"y":1593,"w":137,"h":111}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":137,"h":111}, @@ -1034,7 +1034,7 @@ }, "sprites/buildings/underground_belt_exit.png": { - "frame": {"x":1366,"y":1467,"w":137,"h":111}, + "frame": {"x":1656,"y":1593,"w":137,"h":111}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":137,"h":111}, @@ -1050,7 +1050,7 @@ }, "sprites/buildings/virtual_processor-painter.png": { - "frame": {"x":569,"y":1724,"w":130,"h":144}, + "frame": {"x":705,"y":1688,"w":130,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":130,"h":144}, @@ -1058,7 +1058,7 @@ }, "sprites/buildings/virtual_processor-rotater.png": { - "frame": {"x":1231,"y":1720,"w":117,"h":144}, + "frame": {"x":1158,"y":1047,"w":117,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":117,"h":144}, @@ -1066,7 +1066,7 @@ }, "sprites/buildings/virtual_processor-shapecompare.png": { - "frame": {"x":997,"y":897,"w":143,"h":133}, + "frame": {"x":865,"y":897,"w":143,"h":133}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":0,"w":143,"h":133}, @@ -1074,7 +1074,7 @@ }, "sprites/buildings/virtual_processor-stacker.png": { - "frame": {"x":705,"y":1724,"w":130,"h":144}, + "frame": {"x":705,"y":1838,"w":130,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":14,"y":0,"w":130,"h":144}, @@ -1082,7 +1082,7 @@ }, "sprites/buildings/virtual_processor-unstacker.png": { - "frame": {"x":1451,"y":603,"w":144,"h":143}, + "frame": {"x":1446,"y":603,"w":144,"h":143}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":1,"w":144,"h":143}, @@ -1090,7 +1090,7 @@ }, "sprites/buildings/virtual_processor.png": { - "frame": {"x":847,"y":751,"w":144,"h":140}, + "frame": {"x":843,"y":751,"w":144,"h":140}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":144,"h":140}, @@ -1098,7 +1098,7 @@ }, "sprites/buildings/wire-cross.png": { - "frame": {"x":560,"y":685,"w":144,"h":144}, + "frame": {"x":561,"y":685,"w":144,"h":144}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":144,"h":144}, @@ -1106,7 +1106,7 @@ }, "sprites/buildings/wire-split.png": { - "frame": {"x":561,"y":985,"w":144,"h":81}, + "frame": {"x":565,"y":985,"w":144,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":63,"w":144,"h":81}, @@ -1114,7 +1114,7 @@ }, "sprites/buildings/wire-turn.png": { - "frame": {"x":1778,"y":1597,"w":81,"h":81}, + "frame": {"x":997,"y":1921,"w":81,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":63,"w":81,"h":81}, @@ -1122,7 +1122,7 @@ }, "sprites/buildings/wire.png": { - "frame": {"x":1981,"y":743,"w":18,"h":144}, + "frame": {"x":2006,"y":1028,"w":18,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":0,"w":18,"h":144}, @@ -1130,7 +1130,7 @@ }, "sprites/buildings/wire_tunnel-coating.png": { - "frame": {"x":1786,"y":1325,"w":32,"h":134}, + "frame": {"x":1942,"y":1028,"w":32,"h":134}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":56,"y":5,"w":32,"h":134}, @@ -1138,7 +1138,7 @@ }, "sprites/buildings/wire_tunnel.png": { - "frame": {"x":664,"y":1168,"w":137,"h":134}, + "frame": {"x":702,"y":1548,"w":137,"h":134}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":5,"w":137,"h":134}, @@ -1146,7 +1146,7 @@ }, "sprites/colors/blue.png": { - "frame": {"x":1326,"y":1995,"w":54,"h":49}, + "frame": {"x":1103,"y":1580,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1154,7 +1154,7 @@ }, "sprites/colors/cyan.png": { - "frame": {"x":1386,"y":1995,"w":54,"h":49}, + "frame": {"x":1163,"y":1580,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1162,7 +1162,7 @@ }, "sprites/colors/green.png": { - "frame": {"x":1446,"y":1995,"w":54,"h":49}, + "frame": {"x":705,"y":1988,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1170,7 +1170,7 @@ }, "sprites/colors/purple.png": { - "frame": {"x":1506,"y":1995,"w":54,"h":49}, + "frame": {"x":765,"y":1988,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1178,7 +1178,7 @@ }, "sprites/colors/red.png": { - "frame": {"x":1566,"y":1995,"w":54,"h":49}, + "frame": {"x":1492,"y":1846,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1186,7 +1186,7 @@ }, "sprites/colors/uncolored.png": { - "frame": {"x":1626,"y":1995,"w":54,"h":49}, + "frame": {"x":1552,"y":1846,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1194,7 +1194,7 @@ }, "sprites/colors/white.png": { - "frame": {"x":1686,"y":1995,"w":54,"h":49}, + "frame": {"x":1612,"y":1846,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1202,7 +1202,7 @@ }, "sprites/colors/yellow.png": { - "frame": {"x":1746,"y":1995,"w":54,"h":49}, + "frame": {"x":1672,"y":1846,"w":54,"h":49}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":4,"w":54,"h":49}, @@ -1210,7 +1210,7 @@ }, "sprites/debug/acceptor_slot.png": { - "frame": {"x":1723,"y":735,"w":12,"h":12}, + "frame": {"x":1269,"y":1889,"w":12,"h":12}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, @@ -1218,7 +1218,7 @@ }, "sprites/debug/ejector_slot.png": { - "frame": {"x":1942,"y":997,"w":12,"h":12}, + "frame": {"x":1719,"y":555,"w":12,"h":12}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12}, @@ -1226,7 +1226,7 @@ }, "sprites/misc/hub_direction_indicator.png": { - "frame": {"x":1218,"y":1996,"w":48,"h":48}, + "frame": {"x":1247,"y":1619,"w":48,"h":48}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, @@ -1234,7 +1234,7 @@ }, "sprites/misc/processor_disabled.png": { - "frame": {"x":1024,"y":1870,"w":78,"h":81}, + "frame": {"x":1084,"y":1921,"w":78,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":10,"y":10,"w":78,"h":81}, @@ -1242,7 +1242,7 @@ }, "sprites/misc/processor_disconnected.png": { - "frame": {"x":1024,"y":1957,"w":65,"h":84}, + "frame": {"x":1304,"y":1619,"w":65,"h":84}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":17,"y":8,"w":65,"h":84}, @@ -1250,7 +1250,7 @@ }, "sprites/misc/reader_overlay.png": { - "frame": {"x":1231,"y":1870,"w":104,"h":70}, + "frame": {"x":951,"y":1437,"w":104,"h":70}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":20,"y":38,"w":104,"h":70}, @@ -1258,7 +1258,7 @@ }, "sprites/misc/slot_bad_arrow.png": { - "frame": {"x":1963,"y":1096,"w":35,"h":35}, + "frame": {"x":1999,"y":161,"w":35,"h":35}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":2,"w":35,"h":35}, @@ -1266,7 +1266,7 @@ }, "sprites/misc/slot_good_arrow.png": { - "frame": {"x":1963,"y":1051,"w":35,"h":39}, + "frame": {"x":1999,"y":116,"w":35,"h":39}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":2,"y":0,"w":35,"h":39}, @@ -1274,7 +1274,7 @@ }, "sprites/misc/storage_overlay.png": { - "frame": {"x":1218,"y":1946,"w":89,"h":44}, + "frame": {"x":566,"y":1981,"w":89,"h":44}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":89,"h":44}, @@ -1282,7 +1282,7 @@ }, "sprites/misc/waypoint.png": { - "frame": {"x":1963,"y":997,"w":38,"h":48}, + "frame": {"x":661,"y":1981,"w":38,"h":48}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":38,"h":48}, @@ -1290,7 +1290,7 @@ }, "sprites/wires/boolean_false.png": { - "frame": {"x":1786,"y":1465,"w":31,"h":41}, + "frame": {"x":1061,"y":1437,"w":31,"h":41}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":9,"y":5,"w":31,"h":41}, @@ -1298,7 +1298,7 @@ }, "sprites/wires/boolean_true.png": { - "frame": {"x":1313,"y":1946,"w":22,"h":41}, + "frame": {"x":1999,"y":202,"w":22,"h":41}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":5,"w":22,"h":41}, @@ -1306,7 +1306,7 @@ }, "sprites/wires/display/blue.png": { - "frame": {"x":1975,"y":189,"w":47,"h":47}, + "frame": {"x":1391,"y":1927,"w":47,"h":47}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":47,"h":47}, @@ -1314,7 +1314,7 @@ }, "sprites/wires/display/cyan.png": { - "frame": {"x":1975,"y":242,"w":47,"h":47}, + "frame": {"x":1444,"y":1927,"w":47,"h":47}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":47,"h":47}, @@ -1322,7 +1322,7 @@ }, "sprites/wires/display/green.png": { - "frame": {"x":1975,"y":295,"w":47,"h":47}, + "frame": {"x":1370,"y":1980,"w":47,"h":47}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":47,"h":47}, @@ -1330,7 +1330,7 @@ }, "sprites/wires/display/purple.png": { - "frame": {"x":1975,"y":348,"w":47,"h":47}, + "frame": {"x":1423,"y":1980,"w":47,"h":47}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":47,"h":47}, @@ -1338,7 +1338,7 @@ }, "sprites/wires/display/red.png": { - "frame": {"x":1975,"y":401,"w":47,"h":47}, + "frame": {"x":1497,"y":1901,"w":47,"h":47}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":47,"h":47}, @@ -1346,7 +1346,7 @@ }, "sprites/wires/display/white.png": { - "frame": {"x":1971,"y":454,"w":47,"h":47}, + "frame": {"x":1550,"y":1901,"w":47,"h":47}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":47,"h":47}, @@ -1354,7 +1354,7 @@ }, "sprites/wires/display/yellow.png": { - "frame": {"x":1971,"y":507,"w":47,"h":47}, + "frame": {"x":1603,"y":1901,"w":47,"h":47}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":1,"w":47,"h":47}, @@ -1362,7 +1362,7 @@ }, "sprites/wires/lever_on.png": { - "frame": {"x":798,"y":1883,"w":109,"h":127}, + "frame": {"x":1935,"y":1744,"w":109,"h":127}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":18,"y":5,"w":109,"h":127}, @@ -1378,7 +1378,7 @@ }, "sprites/wires/logical_ejector.png": { - "frame": {"x":1975,"y":116,"w":60,"h":67}, + "frame": {"x":1304,"y":1976,"w":60,"h":67}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":44,"y":0,"w":60,"h":67}, @@ -1386,7 +1386,7 @@ }, "sprites/wires/network_conflict.png": { - "frame": {"x":1942,"y":893,"w":47,"h":44}, + "frame": {"x":1656,"y":1901,"w":47,"h":44}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":1,"y":2,"w":47,"h":44}, @@ -1394,7 +1394,7 @@ }, "sprites/wires/network_empty.png": { - "frame": {"x":1942,"y":943,"w":41,"h":48}, + "frame": {"x":1732,"y":1846,"w":41,"h":48}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":41,"h":48}, @@ -1410,7 +1410,7 @@ }, "sprites/wires/sets/color_cross.png": { - "frame": {"x":561,"y":835,"w":144,"h":144}, + "frame": {"x":565,"y":835,"w":144,"h":144}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":144,"h":144}, @@ -1426,7 +1426,7 @@ }, "sprites/wires/sets/color_split.png": { - "frame": {"x":526,"y":1072,"w":144,"h":81}, + "frame": {"x":565,"y":1072,"w":144,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":63,"w":144,"h":81}, @@ -1434,7 +1434,7 @@ }, "sprites/wires/sets/color_turn.png": { - "frame": {"x":1429,"y":1870,"w":81,"h":81}, + "frame": {"x":1405,"y":1753,"w":81,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":63,"w":81,"h":81}, @@ -1442,7 +1442,7 @@ }, "sprites/wires/sets/conflict_cross.png": { - "frame": {"x":1151,"y":603,"w":144,"h":144}, + "frame": {"x":1146,"y":603,"w":144,"h":144}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":144,"h":144}, @@ -1450,7 +1450,7 @@ }, "sprites/wires/sets/conflict_forward.png": { - "frame": {"x":1992,"y":1845,"w":18,"h":144}, + "frame": {"x":973,"y":1840,"w":18,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":0,"w":18,"h":144}, @@ -1458,7 +1458,7 @@ }, "sprites/wires/sets/conflict_split.png": { - "frame": {"x":1512,"y":1203,"w":144,"h":81}, + "frame": {"x":645,"y":1460,"w":144,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":63,"w":144,"h":81}, @@ -1466,7 +1466,7 @@ }, "sprites/wires/sets/conflict_turn.png": { - "frame": {"x":1516,"y":1870,"w":81,"h":81}, + "frame": {"x":1304,"y":1889,"w":81,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":63,"w":81,"h":81}, @@ -1474,7 +1474,7 @@ }, "sprites/wires/sets/regular_cross.png": { - "frame": {"x":560,"y":685,"w":144,"h":144}, + "frame": {"x":561,"y":685,"w":144,"h":144}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":144,"h":144}, @@ -1482,7 +1482,7 @@ }, "sprites/wires/sets/regular_forward.png": { - "frame": {"x":1981,"y":743,"w":18,"h":144}, + "frame": {"x":2006,"y":1028,"w":18,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":0,"w":18,"h":144}, @@ -1490,7 +1490,7 @@ }, "sprites/wires/sets/regular_split.png": { - "frame": {"x":561,"y":985,"w":144,"h":81}, + "frame": {"x":565,"y":985,"w":144,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":63,"w":144,"h":81}, @@ -1498,7 +1498,7 @@ }, "sprites/wires/sets/regular_turn.png": { - "frame": {"x":1778,"y":1597,"w":81,"h":81}, + "frame": {"x":997,"y":1921,"w":81,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":63,"w":81,"h":81}, @@ -1506,7 +1506,7 @@ }, "sprites/wires/sets/shape_cross.png": { - "frame": {"x":1301,"y":603,"w":144,"h":144}, + "frame": {"x":1296,"y":603,"w":144,"h":144}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":144,"h":144}, @@ -1514,7 +1514,7 @@ }, "sprites/wires/sets/shape_forward.png": { - "frame": {"x":2016,"y":1845,"w":18,"h":144}, + "frame": {"x":1975,"y":116,"w":18,"h":144}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":0,"w":18,"h":144}, @@ -1522,7 +1522,7 @@ }, "sprites/wires/sets/shape_split.png": { - "frame": {"x":1628,"y":1597,"w":144,"h":81}, + "frame": {"x":795,"y":1461,"w":144,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":0,"y":63,"w":144,"h":81}, @@ -1530,7 +1530,7 @@ }, "sprites/wires/sets/shape_turn.png": { - "frame": {"x":1603,"y":1870,"w":81,"h":81}, + "frame": {"x":1405,"y":1840,"w":81,"h":81}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":63,"y":63,"w":81,"h":81}, @@ -1538,7 +1538,7 @@ }, "sprites/wires/wires_preview.png": { - "frame": {"x":1272,"y":1996,"w":48,"h":48}, + "frame": {"x":1247,"y":1673,"w":48,"h":48}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, @@ -1551,6 +1551,6 @@ "format": "RGBA8888", "size": {"w":2048,"h":2048}, "scale": "0.75", - "smartupdate": "$TexturePacker:SmartUpdate:6428a34334a71261053e6374332fbd0f:de76d600c9c903298cb6652e0ef02898:908b89f5ca8ff73e331a35a3b14d0604$" + "smartupdate": "$TexturePacker:SmartUpdate:c57f50d18c59efc0edbd4a3a732323a4:3fcf23da2ddc6370c437cf41f6d44ed0:908b89f5ca8ff73e331a35a3b14d0604$" } } diff --git a/res_built/atlas/atlas0_hq.png b/res_built/atlas/atlas0_hq.png index 83873d2a..f5b94051 100644 Binary files a/res_built/atlas/atlas0_hq.png and b/res_built/atlas/atlas0_hq.png differ diff --git a/res_built/atlas/atlas0_lq.json b/res_built/atlas/atlas0_lq.json index 5af85784..6aed36ff 100644 --- a/res_built/atlas/atlas0_lq.json +++ b/res_built/atlas/atlas0_lq.json @@ -336,6 +336,46 @@ "spriteSourceSize": {"x":4,"y":4,"w":44,"h":44}, "sourceSize": {"w":48,"h":48} }, +"sprites/blueprints/balancer-merger-inverse.png": +{ + "frame": {"x":310,"y":112,"w":48,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/blueprints/balancer-merger.png": +{ + "frame": {"x":208,"y":376,"w":47,"h":47}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/blueprints/balancer-splitter-inverse.png": +{ + "frame": {"x":310,"y":166,"w":48,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/blueprints/balancer-splitter.png": +{ + "frame": {"x":261,"y":376,"w":47,"h":47}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/blueprints/balancer.png": +{ + "frame": {"x":770,"y":58,"w":87,"h":48}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":5,"y":0,"w":87,"h":48}, + "sourceSize": {"w":96,"h":48} +}, "sprites/blueprints/belt_left.png": { "frame": {"x":305,"y":486,"w":44,"h":44}, @@ -378,7 +418,7 @@ }, "sprites/blueprints/cutter.png": { - "frame": {"x":770,"y":58,"w":87,"h":48}, + "frame": {"x":863,"y":58,"w":87,"h":48}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":87,"h":48}, @@ -434,7 +474,7 @@ }, "sprites/blueprints/logic_gate-xor.png": { - "frame": {"x":310,"y":112,"w":48,"h":48}, + "frame": {"x":965,"y":4,"w":48,"h":48}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, @@ -506,7 +546,7 @@ }, "sprites/blueprints/reader.png": { - "frame": {"x":310,"y":166,"w":48,"h":48}, + "frame": {"x":956,"y":58,"w":48,"h":48}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, @@ -514,7 +554,7 @@ }, "sprites/blueprints/rotater-ccw.png": { - "frame": {"x":965,"y":4,"w":48,"h":48}, + "frame": {"x":950,"y":112,"w":48,"h":48}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, @@ -522,29 +562,13 @@ }, "sprites/blueprints/rotater-rotate180.png": { - "frame": {"x":956,"y":58,"w":48,"h":48}, + "frame": {"x":950,"y":166,"w":48,"h":48}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, "sourceSize": {"w":48,"h":48} }, "sprites/blueprints/rotater.png": -{ - "frame": {"x":950,"y":112,"w":48,"h":48}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/blueprints/splitter-compact-inverse.png": -{ - "frame": {"x":950,"y":166,"w":48,"h":48}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/blueprints/splitter-compact-merge-inverse.png": { "frame": {"x":582,"y":166,"w":48,"h":48}, "rotated": false, @@ -552,30 +576,6 @@ "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, "sourceSize": {"w":48,"h":48} }, -"sprites/blueprints/splitter-compact-merge.png": -{ - "frame": {"x":208,"y":376,"w":47,"h":47}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/blueprints/splitter-compact.png": -{ - "frame": {"x":261,"y":376,"w":47,"h":47}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/blueprints/splitter.png": -{ - "frame": {"x":863,"y":58,"w":87,"h":48}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":0,"w":87,"h":48}, - "sourceSize": {"w":96,"h":48} -}, "sprites/blueprints/stacker.png": { "frame": {"x":870,"y":4,"w":89,"h":48}, @@ -736,6 +736,46 @@ "spriteSourceSize": {"x":0,"y":0,"w":48,"h":47}, "sourceSize": {"w":48,"h":48} }, +"sprites/buildings/balancer-merger-inverse.png": +{ + "frame": {"x":442,"y":249,"w":48,"h":47}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":47}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/buildings/balancer-merger.png": +{ + "frame": {"x":207,"y":429,"w":47,"h":47}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/buildings/balancer-splitter-inverse.png": +{ + "frame": {"x":496,"y":249,"w":48,"h":47}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":47}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/buildings/balancer-splitter.png": +{ + "frame": {"x":260,"y":429,"w":47,"h":47}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, + "sourceSize": {"w":48,"h":48} +}, +"sprites/buildings/balancer.png": +{ + "frame": {"x":582,"y":112,"w":87,"h":48}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":5,"y":0,"w":87,"h":48}, + "sourceSize": {"w":96,"h":48} +}, "sprites/buildings/belt_left.png": { "frame": {"x":487,"y":302,"w":44,"h":44}, @@ -778,7 +818,7 @@ }, "sprites/buildings/cutter.png": { - "frame": {"x":582,"y":112,"w":87,"h":48}, + "frame": {"x":675,"y":112,"w":87,"h":48}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":5,"y":0,"w":87,"h":48}, @@ -944,46 +984,6 @@ "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, "sourceSize": {"w":48,"h":48} }, -"sprites/buildings/splitter-compact-inverse.png": -{ - "frame": {"x":442,"y":249,"w":48,"h":47}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":48,"h":47}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/buildings/splitter-compact-merge-inverse.png": -{ - "frame": {"x":496,"y":249,"w":48,"h":47}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":0,"w":48,"h":47}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/buildings/splitter-compact-merge.png": -{ - "frame": {"x":207,"y":429,"w":47,"h":47}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/buildings/splitter-compact.png": -{ - "frame": {"x":260,"y":429,"w":47,"h":47}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":1,"y":0,"w":47,"h":47}, - "sourceSize": {"w":48,"h":48} -}, -"sprites/buildings/splitter.png": -{ - "frame": {"x":675,"y":112,"w":87,"h":48}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":5,"y":0,"w":87,"h":48}, - "sourceSize": {"w":96,"h":48} -}, "sprites/buildings/stacker.png": { "frame": {"x":676,"y":58,"w":88,"h":48}, @@ -1551,6 +1551,6 @@ "format": "RGBA8888", "size": {"w":1024,"h":1024}, "scale": "0.25", - "smartupdate": "$TexturePacker:SmartUpdate:6428a34334a71261053e6374332fbd0f:de76d600c9c903298cb6652e0ef02898:908b89f5ca8ff73e331a35a3b14d0604$" + "smartupdate": "$TexturePacker:SmartUpdate:c57f50d18c59efc0edbd4a3a732323a4:3fcf23da2ddc6370c437cf41f6d44ed0:908b89f5ca8ff73e331a35a3b14d0604$" } } diff --git a/res_built/atlas/atlas0_lq.png b/res_built/atlas/atlas0_lq.png index 1ac1bd55..a5957fda 100644 Binary files a/res_built/atlas/atlas0_lq.png and b/res_built/atlas/atlas0_lq.png differ diff --git a/res_built/atlas/atlas0_mq.json b/res_built/atlas/atlas0_mq.json index 27adf57f..e9687dbb 100644 --- a/res_built/atlas/atlas0_mq.json +++ b/res_built/atlas/atlas0_mq.json @@ -336,6 +336,46 @@ "spriteSourceSize": {"x":9,"y":9,"w":87,"h":87}, "sourceSize": {"w":96,"h":96} }, +"sprites/blueprints/balancer-merger-inverse.png": +{ + "frame": {"x":453,"y":1170,"w":95,"h":93}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":1,"w":95,"h":93}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/blueprints/balancer-merger.png": +{ + "frame": {"x":4,"y":1320,"w":93,"h":93}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":1,"w":93,"h":93}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/blueprints/balancer-splitter-inverse.png": +{ + "frame": {"x":348,"y":1180,"w":95,"h":93}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":1,"w":95,"h":93}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/blueprints/balancer-splitter.png": +{ + "frame": {"x":694,"y":1113,"w":93,"h":93}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":1,"w":93,"h":93}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/blueprints/balancer.png": +{ + "frame": {"x":184,"y":581,"w":172,"h":96}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":11,"y":0,"w":172,"h":96}, + "sourceSize": {"w":192,"h":96} +}, "sprites/blueprints/belt_left.png": { "frame": {"x":479,"y":1639,"w":87,"h":87}, @@ -378,7 +418,7 @@ }, "sprites/blueprints/cutter.png": { - "frame": {"x":184,"y":581,"w":172,"h":96}, + "frame": {"x":362,"y":616,"w":172,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":0,"w":172,"h":96}, @@ -536,46 +576,6 @@ "spriteSourceSize": {"x":0,"y":0,"w":96,"h":96}, "sourceSize": {"w":96,"h":96} }, -"sprites/blueprints/splitter-compact-inverse.png": -{ - "frame": {"x":453,"y":1170,"w":95,"h":93}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":1,"w":95,"h":93}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/blueprints/splitter-compact-merge-inverse.png": -{ - "frame": {"x":348,"y":1180,"w":95,"h":93}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":1,"w":95,"h":93}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/blueprints/splitter-compact-merge.png": -{ - "frame": {"x":4,"y":1320,"w":93,"h":93}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":1,"w":93,"h":93}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/blueprints/splitter-compact.png": -{ - "frame": {"x":694,"y":1113,"w":93,"h":93}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":1,"w":93,"h":93}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/blueprints/splitter.png": -{ - "frame": {"x":362,"y":616,"w":172,"h":96}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":11,"y":0,"w":172,"h":96}, - "sourceSize": {"w":192,"h":96} -}, "sprites/blueprints/stacker.png": { "frame": {"x":185,"y":479,"w":175,"h":96}, @@ -736,6 +736,46 @@ "spriteSourceSize": {"x":2,"y":2,"w":93,"h":91}, "sourceSize": {"w":96,"h":96} }, +"sprites/buildings/balancer-merger-inverse.png": +{ + "frame": {"x":105,"y":1237,"w":94,"h":91}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":94,"h":91}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/buildings/balancer-merger.png": +{ + "frame": {"x":554,"y":1174,"w":93,"h":91}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":2,"w":93,"h":91}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/buildings/balancer-splitter-inverse.png": +{ + "frame": {"x":246,"y":1183,"w":95,"h":91}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":95,"h":91}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/buildings/balancer-splitter.png": +{ + "frame": {"x":449,"y":1269,"w":93,"h":91}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":2,"w":93,"h":91}, + "sourceSize": {"w":96,"h":96} +}, +"sprites/buildings/balancer.png": +{ + "frame": {"x":740,"y":807,"w":171,"h":96}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":11,"y":0,"w":171,"h":96}, + "sourceSize": {"w":192,"h":96} +}, "sprites/buildings/belt_left.png": { "frame": {"x":200,"y":1441,"w":87,"h":87}, @@ -778,7 +818,7 @@ }, "sprites/buildings/cutter.png": { - "frame": {"x":740,"y":807,"w":171,"h":96}, + "frame": {"x":4,"y":683,"w":171,"h":96}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":11,"y":0,"w":171,"h":96}, @@ -944,46 +984,6 @@ "spriteSourceSize": {"x":1,"y":0,"w":95,"h":96}, "sourceSize": {"w":96,"h":96} }, -"sprites/buildings/splitter-compact-inverse.png": -{ - "frame": {"x":105,"y":1237,"w":94,"h":91}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":2,"w":94,"h":91}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/buildings/splitter-compact-merge-inverse.png": -{ - "frame": {"x":246,"y":1183,"w":95,"h":91}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":0,"y":2,"w":95,"h":91}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/buildings/splitter-compact-merge.png": -{ - "frame": {"x":554,"y":1174,"w":93,"h":91}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":2,"w":93,"h":91}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/buildings/splitter-compact.png": -{ - "frame": {"x":449,"y":1269,"w":93,"h":91}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":3,"y":2,"w":93,"h":91}, - "sourceSize": {"w":96,"h":96} -}, -"sprites/buildings/splitter.png": -{ - "frame": {"x":4,"y":683,"w":171,"h":96}, - "rotated": false, - "trimmed": true, - "spriteSourceSize": {"x":11,"y":0,"w":171,"h":96}, - "sourceSize": {"w":192,"h":96} -}, "sprites/buildings/stacker.png": { "frame": {"x":4,"y":581,"w":174,"h":96}, @@ -1551,6 +1551,6 @@ "format": "RGBA8888", "size": {"w":1024,"h":2048}, "scale": "0.5", - "smartupdate": "$TexturePacker:SmartUpdate:6428a34334a71261053e6374332fbd0f:de76d600c9c903298cb6652e0ef02898:908b89f5ca8ff73e331a35a3b14d0604$" + "smartupdate": "$TexturePacker:SmartUpdate:c57f50d18c59efc0edbd4a3a732323a4:3fcf23da2ddc6370c437cf41f6d44ed0:908b89f5ca8ff73e331a35a3b14d0604$" } } diff --git a/res_built/atlas/atlas0_mq.png b/res_built/atlas/atlas0_mq.png index ee22e74d..36e71502 100644 Binary files a/res_built/atlas/atlas0_mq.png and b/res_built/atlas/atlas0_mq.png differ diff --git a/res_raw/sprites/blueprints/splitter-compact-inverse.png b/res_raw/sprites/blueprints/balancer-merger-inverse.png similarity index 100% rename from res_raw/sprites/blueprints/splitter-compact-inverse.png rename to res_raw/sprites/blueprints/balancer-merger-inverse.png diff --git a/res_raw/sprites/blueprints/splitter-compact.png b/res_raw/sprites/blueprints/balancer-merger.png similarity index 100% rename from res_raw/sprites/blueprints/splitter-compact.png rename to res_raw/sprites/blueprints/balancer-merger.png diff --git a/res_raw/sprites/blueprints/splitter-compact-merge-inverse.png b/res_raw/sprites/blueprints/balancer-splitter-inverse.png similarity index 100% rename from res_raw/sprites/blueprints/splitter-compact-merge-inverse.png rename to res_raw/sprites/blueprints/balancer-splitter-inverse.png diff --git a/res_raw/sprites/blueprints/splitter-compact-merge.png b/res_raw/sprites/blueprints/balancer-splitter.png similarity index 100% rename from res_raw/sprites/blueprints/splitter-compact-merge.png rename to res_raw/sprites/blueprints/balancer-splitter.png diff --git a/res_raw/sprites/blueprints/splitter.png b/res_raw/sprites/blueprints/balancer.png similarity index 100% rename from res_raw/sprites/blueprints/splitter.png rename to res_raw/sprites/blueprints/balancer.png diff --git a/res_raw/sprites/blueprints/trash-storage.png b/res_raw/sprites/blueprints/trash-storage.png index cc719a5a..b86519b9 100644 Binary files a/res_raw/sprites/blueprints/trash-storage.png and b/res_raw/sprites/blueprints/trash-storage.png differ diff --git a/res_raw/sprites/buildings/splitter-compact-inverse.png b/res_raw/sprites/buildings/balancer-merger-inverse.png similarity index 100% rename from res_raw/sprites/buildings/splitter-compact-inverse.png rename to res_raw/sprites/buildings/balancer-merger-inverse.png diff --git a/res_raw/sprites/buildings/splitter-compact.png b/res_raw/sprites/buildings/balancer-merger.png similarity index 100% rename from res_raw/sprites/buildings/splitter-compact.png rename to res_raw/sprites/buildings/balancer-merger.png diff --git a/res_raw/sprites/buildings/splitter-compact-merge-inverse.png b/res_raw/sprites/buildings/balancer-splitter-inverse.png similarity index 100% rename from res_raw/sprites/buildings/splitter-compact-merge-inverse.png rename to res_raw/sprites/buildings/balancer-splitter-inverse.png diff --git a/res_raw/sprites/buildings/splitter-compact-merge.png b/res_raw/sprites/buildings/balancer-splitter.png similarity index 100% rename from res_raw/sprites/buildings/splitter-compact-merge.png rename to res_raw/sprites/buildings/balancer-splitter.png diff --git a/res_raw/sprites/buildings/splitter.png b/res_raw/sprites/buildings/balancer.png similarity index 100% rename from res_raw/sprites/buildings/splitter.png rename to res_raw/sprites/buildings/balancer.png diff --git a/res_raw/sprites/buildings/trash-storage.png b/res_raw/sprites/buildings/trash-storage.png index 39a4df1f..56fbcc38 100644 Binary files a/res_raw/sprites/buildings/trash-storage.png and b/res_raw/sprites/buildings/trash-storage.png differ diff --git a/src/css/icons.scss b/src/css/icons.scss index 841fccd9..9636059a 100644 --- a/src/css/icons.scss +++ b/src/css/icons.scss @@ -1,4 +1,4 @@ -$buildings: belt, cutter, miner, mixer, painter, rotater, splitter, stacker, trash, underground_belt, wire, +$buildings: belt, cutter, miner, mixer, painter, rotater, balancer, stacker, trash, underground_belt, wire, constant_signal, logic_gate, lever, filter, wire_tunnel, display, virtual_processor, reader; @each $building in $buildings { @@ -7,7 +7,7 @@ $buildings: belt, cutter, miner, mixer, painter, rotater, splitter, stacker, tra } } -$buildingsAndVariants: belt, splitter, splitter-compact, splitter-compact-inverse, underground_belt, +$buildingsAndVariants: belt, balancer, balancer-merger, balancer-splitter, underground_belt, underground_belt-tier2, miner, miner-chainable, cutter, cutter-quad, rotater, rotater-ccw, rotater-fl, stacker, mixer, painter, painter-double, painter-quad, trash, trash-storage; @each $building in $buildingsAndVariants { @@ -16,10 +16,18 @@ $buildingsAndVariants: belt, splitter, splitter-compact, splitter-compact-invers } } -// Special case +// @TODO: New buildings (balancer, wires, etc) + +// Special cases for mirrored vairants [data-icon="building_tutorials/painter-mirrored.png"] { background-image: uiResource("res/ui/building_tutorials/painter.png") !important; } +[data-icon="building_tutorials/balancer-merger-inverse.png"] { + background-image: uiResource("res/ui/building_tutorials/balancer-merger.png") !important; +} +[data-icon="building_tutorials/balancer-splitter-inverse.png"] { + background-image: uiResource("res/ui/building_tutorials/balancer-splitter.png") !important; +} $icons: notification_saved, notification_success, notification_upgrade; @each $icon in $icons { diff --git a/src/js/changelog.js b/src/js/changelog.js index 207109a5..6f38ae81 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -24,7 +24,7 @@ export const CHANGELOG = [ "Mark pinned shapes in statistics dialog and show them first (inspired by davidburhans)", "Added setting to show chunk borders", "Quad painters have been reworked! They now are integrated with the wires, and only paint the shape when the value is 1 (inspired by dengr1605)", - "There are now compact 1x1 splitters available to be unlocked!", + "There are now compact 1x1 balancers available to be unlocked!", "Replaced level completion sound to be less distracting", "Allow editing waypoints (by isaisstillalive)", "Show confirmation when cutting area which is too expensive to get pasted again (by isaisstillalive)", diff --git a/src/js/game/buildings/splitter.js b/src/js/game/buildings/balancer.js similarity index 77% rename from src/js/game/buildings/splitter.js rename to src/js/game/buildings/balancer.js index c58d593d..06fbc965 100644 --- a/src/js/game/buildings/splitter.js +++ b/src/js/game/buildings/balancer.js @@ -11,29 +11,29 @@ import { formatItemsPerSecond } from "../../core/utils"; import { BeltUnderlaysComponent } from "../components/belt_underlays"; /** @enum {string} */ -export const enumSplitterVariants = { - compact: "compact", - compactInverse: "compact-inverse", - compactMerge: "compact-merge", - compactMergeInverse: "compact-merge-inverse", +export const enumBalancerVariants = { + merger: "merger", + mergerInverse: "merger-inverse", + splitter: "splitter", + splitterInverse: "splitter-inverse", }; -export class MetaSplitterBuilding extends MetaBuilding { +export class MetaBalancerBuilding extends MetaBuilding { constructor() { - super("splitter"); + super("balancer"); } getDimensions(variant) { switch (variant) { case defaultBuildingVariant: return new Vector(2, 1); - case enumSplitterVariants.compact: - case enumSplitterVariants.compactInverse: - case enumSplitterVariants.compactMerge: - case enumSplitterVariants.compactMergeInverse: + case enumBalancerVariants.merger: + case enumBalancerVariants.mergerInverse: + case enumBalancerVariants.splitter: + case enumBalancerVariants.splitterInverse: return new Vector(1, 1); default: - assertAlways(false, "Unknown splitter variant: " + variant); + assertAlways(false, "Unknown balancer variant: " + variant); } } @@ -43,7 +43,7 @@ export class MetaSplitterBuilding extends MetaBuilding { * @returns {Array<[string, string]>} */ getAdditionalStatistics(root, variant) { - const speed = root.hubGoals.getProcessorBaseSpeed(enumItemProcessorTypes.splitter); + const speed = root.hubGoals.getProcessorBaseSpeed(enumItemProcessorTypes.balancer); return [[T.ingame.buildingPlacement.infoTexts.speed, formatItemsPerSecond(speed)]]; } @@ -57,12 +57,12 @@ export class MetaSplitterBuilding extends MetaBuilding { getAvailableVariants(root) { let available = [defaultBuildingVariant]; - if (root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_splitter_compact)) { - available.push(enumSplitterVariants.compact, enumSplitterVariants.compactInverse); + if (root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_merger)) { + available.push(enumBalancerVariants.merger, enumBalancerVariants.mergerInverse); } - if (root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_merger_compact)) { - available.push(enumSplitterVariants.compactMerge, enumSplitterVariants.compactMergeInverse); + if (root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_splitter)) { + available.push(enumBalancerVariants.splitter, enumBalancerVariants.splitterInverse); } return available; @@ -72,7 +72,7 @@ export class MetaSplitterBuilding extends MetaBuilding { * @param {GameRoot} root */ getIsUnlocked(root) { - return root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_splitter); + return root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_balancer); } /** @@ -89,7 +89,7 @@ export class MetaSplitterBuilding extends MetaBuilding { entity.addComponent( new ItemProcessorComponent({ inputsPerCharge: 1, - processorType: enumItemProcessorTypes.splitter, + processorType: enumItemProcessorTypes.balancer, }) ); @@ -135,8 +135,8 @@ export class MetaSplitterBuilding extends MetaBuilding { break; } - case enumSplitterVariants.compact: - case enumSplitterVariants.compactInverse: { + case enumBalancerVariants.merger: + case enumBalancerVariants.mergerInverse: { entity.components.ItemAcceptor.setSlots([ { pos: new Vector(0, 0), @@ -145,7 +145,7 @@ export class MetaSplitterBuilding extends MetaBuilding { { pos: new Vector(0, 0), directions: [ - variant === enumSplitterVariants.compactInverse + variant === enumBalancerVariants.mergerInverse ? enumDirection.left : enumDirection.right, ], @@ -162,8 +162,8 @@ export class MetaSplitterBuilding extends MetaBuilding { break; } - case enumSplitterVariants.compactMerge: - case enumSplitterVariants.compactMergeInverse: { + case enumBalancerVariants.splitter: + case enumBalancerVariants.splitterInverse: { entity.components.ItemAcceptor.setSlots([ { pos: new Vector(0, 0), @@ -179,7 +179,7 @@ export class MetaSplitterBuilding extends MetaBuilding { { pos: new Vector(0, 0), direction: - variant === enumSplitterVariants.compactMergeInverse + variant === enumBalancerVariants.splitterInverse ? enumDirection.left : enumDirection.right, }, @@ -192,7 +192,7 @@ export class MetaSplitterBuilding extends MetaBuilding { break; } default: - assertAlways(false, "Unknown splitter variant: " + variant); + assertAlways(false, "Unknown balancer variant: " + variant); } } } diff --git a/src/js/game/camera.js b/src/js/game/camera.js index be520813..66d7efa8 100644 --- a/src/js/game/camera.js +++ b/src/js/game/camera.js @@ -895,7 +895,7 @@ export class Camera extends BasicSerializableObject { return; } - const panAreaPixels = Math.min(this.root.gameWidth, this.root.gameHeight) * 0.015; + const panAreaPixels = 2; const panVelocity = new Vector(); if (mousePos.x < panAreaPixels) { diff --git a/src/js/game/components/item_processor.js b/src/js/game/components/item_processor.js index d3c71b18..fd466662 100644 --- a/src/js/game/components/item_processor.js +++ b/src/js/game/components/item_processor.js @@ -4,7 +4,7 @@ import { Component } from "../component"; /** @enum {string} */ export const enumItemProcessorTypes = { - splitter: "splitter", + balancer: "balancer", cutter: "cutter", cutterQuad: "cutterQuad", rotater: "rotater", @@ -57,14 +57,14 @@ export class ItemProcessorComponent extends Component { * */ constructor({ - processorType = enumItemProcessorTypes.splitter, + processorType = enumItemProcessorTypes.balancer, processingRequirement = null, inputsPerCharge = 1, }) { super(); // Which slot to emit next, this is only a preference and if it can't emit - // it will take the other one. Some machines ignore this (e.g. the splitter) to make + // it will take the other one. Some machines ignore this (e.g. the balancer) to make // sure the outputs always match this.nextOutputSlot = 0; diff --git a/src/js/game/hub_goals.js b/src/js/game/hub_goals.js index c2f17f8f..16947f24 100644 --- a/src/js/game/hub_goals.js +++ b/src/js/game/hub_goals.js @@ -43,11 +43,11 @@ export class HubGoals extends BasicSerializableObject { // Compute upgrade improvements for (const upgradeId in UPGRADES) { - const upgradeHandle = UPGRADES[upgradeId]; + const tiers = UPGRADES[upgradeId]; const level = this.upgradeLevels[upgradeId] || 0; - let totalImprovement = upgradeHandle.baseValue || 1; + let totalImprovement = 1; for (let i = 0; i < level; ++i) { - totalImprovement += upgradeHandle.tiers[i].improvement; + totalImprovement += tiers[i].improvement; } this.upgradeImprovements[upgradeId] = totalImprovement; } @@ -98,7 +98,7 @@ export class HubGoals extends BasicSerializableObject { */ this.upgradeImprovements = {}; for (const key in UPGRADES) { - this.upgradeImprovements[key] = UPGRADES[key].baseValue || 1; + this.upgradeImprovements[key] = 1; } this.createNextGoal(); @@ -212,7 +212,7 @@ export class HubGoals extends BasicSerializableObject { this.currentGoal = { /** @type {ShapeDefinition} */ definition: this.createRandomShape(), - required: 10000 + findNiceIntegerValue(this.level * 2000), + required: findNiceIntegerValue(5000 + Math.pow(this.level * 2000, 0.75)), reward: enumHubGoalRewards.no_reward_freeplay, }; } @@ -243,10 +243,10 @@ export class HubGoals extends BasicSerializableObject { * @param {string} upgradeId */ canUnlockUpgrade(upgradeId) { - const handle = UPGRADES[upgradeId]; + const tiers = UPGRADES[upgradeId]; const currentLevel = this.getUpgradeLevel(upgradeId); - if (currentLevel >= handle.tiers.length) { + if (currentLevel >= tiers.length) { // Max level return false; } @@ -255,7 +255,7 @@ export class HubGoals extends BasicSerializableObject { return true; } - const tierData = handle.tiers[currentLevel]; + const tierData = tiers[currentLevel]; for (let i = 0; i < tierData.required.length; ++i) { const requirement = tierData.required[i]; @@ -290,10 +290,10 @@ export class HubGoals extends BasicSerializableObject { return false; } - const handle = UPGRADES[upgradeId]; + const upgradeTiers = UPGRADES[upgradeId]; const currentLevel = this.getUpgradeLevel(upgradeId); - const tierData = handle.tiers[currentLevel]; + const tierData = upgradeTiers[currentLevel]; if (!tierData) { return false; } @@ -399,7 +399,7 @@ export class HubGoals extends BasicSerializableObject { case enumItemProcessorTypes.trash: case enumItemProcessorTypes.hub: return 1e30; - case enumItemProcessorTypes.splitter: + case enumItemProcessorTypes.balancer: return globalConfig.beltSpeedItemsPerSecond * this.upgradeImprovements.belt * 2; case enumItemProcessorTypes.reader: return globalConfig.beltSpeedItemsPerSecond * this.upgradeImprovements.belt; diff --git a/src/js/game/hud/parts/buildings_toolbar.js b/src/js/game/hud/parts/buildings_toolbar.js index 9b6a7901..19754436 100644 --- a/src/js/game/hud/parts/buildings_toolbar.js +++ b/src/js/game/hud/parts/buildings_toolbar.js @@ -8,7 +8,7 @@ import { MetaMixerBuilding } from "../../buildings/mixer"; import { MetaPainterBuilding } from "../../buildings/painter"; import { MetaReaderBuilding } from "../../buildings/reader"; import { MetaRotaterBuilding } from "../../buildings/rotater"; -import { MetaSplitterBuilding } from "../../buildings/splitter"; +import { MetaBalancerBuilding } from "../../buildings/balancer"; import { MetaStackerBuilding } from "../../buildings/stacker"; import { MetaTrashBuilding } from "../../buildings/trash"; import { MetaUndergroundBeltBuilding } from "../../buildings/underground_belt"; @@ -16,7 +16,7 @@ import { HUDBaseToolbar } from "./base_toolbar"; const supportedBuildings = [ MetaBeltBuilding, - MetaSplitterBuilding, + MetaBalancerBuilding, MetaUndergroundBeltBuilding, MetaMinerBuilding, MetaCutterBuilding, diff --git a/src/js/game/hud/parts/pinned_shapes.js b/src/js/game/hud/parts/pinned_shapes.js index 2f7dd11e..c54554bf 100644 --- a/src/js/game/hud/parts/pinned_shapes.js +++ b/src/js/game/hud/parts/pinned_shapes.js @@ -1,291 +1,291 @@ -import { ClickDetector } from "../../../core/click_detector"; -import { formatBigNumber, makeDiv, arrayDeleteValue } from "../../../core/utils"; -import { ShapeDefinition } from "../../shape_definition"; -import { BaseHUDPart } from "../base_hud_part"; -import { blueprintShape, UPGRADES } from "../../upgrades"; -import { enumHubGoalRewards } from "../../tutorial_goals"; - -/** - * Manages the pinned shapes on the left side of the screen - */ -export class HUDPinnedShapes extends BaseHUDPart { - constructor(root) { - super(root); - /** - * Store a list of pinned shapes - * @type {Array} - */ - this.pinnedShapes = []; - - /** - * Store handles to the currently rendered elements, so we can update them more - * convenient. Also allows for cleaning up handles. - * @type {Array<{ - * key: string, - * amountLabel: HTMLElement, - * lastRenderedValue: string, - * element: HTMLElement, - * detector?: ClickDetector, - * infoDetector?: ClickDetector - * }>} - */ - this.handles = []; - } - - createElements(parent) { - this.element = makeDiv(parent, "ingame_HUD_PinnedShapes", []); - } - - /** - * Serializes the pinned shapes - */ - serialize() { - return { - shapes: this.pinnedShapes, - }; - } - - /** - * Deserializes the pinned shapes - * @param {{ shapes: Array}} data - */ - deserialize(data) { - if (!data || !data.shapes || !Array.isArray(data.shapes)) { - return "Invalid pinned shapes data"; - } - this.pinnedShapes = data.shapes; - } - - /** - * Initializes the hud component - */ - initialize() { - // Connect to any relevant signals - this.root.signals.storyGoalCompleted.add(this.rerenderFull, this); - this.root.signals.upgradePurchased.add(this.updateShapesAfterUpgrade, this); - this.root.signals.postLoadHook.add(this.rerenderFull, this); - this.root.hud.signals.shapePinRequested.add(this.pinNewShape, this); - this.root.hud.signals.shapeUnpinRequested.add(this.unpinShape, this); - - // Perform initial render - this.updateShapesAfterUpgrade(); - } - - /** - * Updates all shapes after an upgrade has been purchased and removes the unused ones - */ - updateShapesAfterUpgrade() { - for (let i = 0; i < this.pinnedShapes.length; ++i) { - const key = this.pinnedShapes[i]; - if (key === blueprintShape) { - // Ignore blueprint shapes - continue; - } - let goal = this.findGoalValueForShape(key); - if (!goal) { - // Seems no longer relevant - this.pinnedShapes.splice(i, 1); - i -= 1; - } - } - - this.rerenderFull(); - } - - /** - * Finds the current goal for the given key. If the key is the story goal, returns - * the story goal. If its the blueprint shape, no goal is returned. Otherwise - * it's searched for upgrades. - * @param {string} key - */ - findGoalValueForShape(key) { - if (key === this.root.hubGoals.currentGoal.definition.getHash()) { - return this.root.hubGoals.currentGoal.required; - } - if (key === blueprintShape) { - return null; - } - - // Check if this shape is required for any upgrade - for (const upgradeId in UPGRADES) { - const { tiers } = UPGRADES[upgradeId]; - const currentTier = this.root.hubGoals.getUpgradeLevel(upgradeId); - const tierHandle = tiers[currentTier]; - - if (!tierHandle) { - // Max level - continue; - } - - for (let i = 0; i < tierHandle.required.length; ++i) { - const { shape, amount } = tierHandle.required[i]; - if (shape === key) { - return amount; - } - } - } - - return null; - } - - /** - * Returns whether a given shape is currently pinned - * @param {string} key - */ - isShapePinned(key) { - if (key === this.root.hubGoals.currentGoal.definition.getHash() || key === blueprintShape) { - // This is a "special" shape which is always pinned - return true; - } - - return this.pinnedShapes.indexOf(key) >= 0; - } - - /** - * Rerenders the whole component - */ - rerenderFull() { - const currentGoal = this.root.hubGoals.currentGoal; - const currentKey = currentGoal.definition.getHash(); - - // First, remove all old shapes - for (let i = 0; i < this.handles.length; ++i) { - this.handles[i].element.remove(); - const detector = this.handles[i].detector; - if (detector) { - detector.cleanup(); - } - const infoDetector = this.handles[i].infoDetector; - if (infoDetector) { - infoDetector.cleanup(); - } - } - this.handles = []; - - // Pin story goal - this.internalPinShape(currentKey, false, "goal"); - - // Pin blueprint shape as well - if (this.root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_blueprints)) { - this.internalPinShape(blueprintShape, false, "blueprint"); - } - - // Pin manually pinned shapes - for (let i = 0; i < this.pinnedShapes.length; ++i) { - const key = this.pinnedShapes[i]; - if (key !== currentKey) { - this.internalPinShape(key); - } - } - } - - /** - * Pins a new shape - * @param {string} key - * @param {boolean} canUnpin - * @param {string=} className - */ - internalPinShape(key, canUnpin = true, className = null) { - const definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(key); - - const element = makeDiv(this.element, null, ["shape"]); - const canvas = definition.generateAsCanvas(120); - element.appendChild(canvas); - - if (className) { - element.classList.add(className); - } - - let detector = null; - if (canUnpin) { - element.classList.add("unpinable"); - detector = new ClickDetector(element, { - consumeEvents: true, - preventDefault: true, - targetOnly: true, - }); - detector.click.add(() => this.unpinShape(key)); - } else { - element.classList.add("marked"); - } - - // Show small info icon - const infoButton = document.createElement("button"); - infoButton.classList.add("infoButton"); - element.appendChild(infoButton); - const infoDetector = new ClickDetector(infoButton, { - consumeEvents: true, - preventDefault: true, - targetOnly: true, - }); - infoDetector.click.add(() => this.root.hud.signals.viewShapeDetailsRequested.dispatch(definition)); - - const amountLabel = makeDiv(element, null, ["amountLabel"], ""); - - const goal = this.findGoalValueForShape(key); - if (goal) { - makeDiv(element, null, ["goalLabel"], "/" + formatBigNumber(goal)); - } - - this.handles.push({ - key, - element, - amountLabel, - lastRenderedValue: "", - detector, - infoDetector, - }); - } - - /** - * Updates all amount labels - */ - update() { - for (let i = 0; i < this.handles.length; ++i) { - const handle = this.handles[i]; - - const currentValue = this.root.hubGoals.getShapesStoredByKey(handle.key); - const currentValueFormatted = formatBigNumber(currentValue); - if (currentValueFormatted !== handle.lastRenderedValue) { - handle.lastRenderedValue = currentValueFormatted; - handle.amountLabel.innerText = currentValueFormatted; - const goal = this.findGoalValueForShape(handle.key); - handle.element.classList.toggle("completed", goal && currentValue > goal); - } - } - } - - /** - * Unpins a shape - * @param {string} key - */ - unpinShape(key) { - arrayDeleteValue(this.pinnedShapes, key); - this.rerenderFull(); - } - - /** - * Requests to pin a new shape - * @param {ShapeDefinition} definition - */ - pinNewShape(definition) { - const key = definition.getHash(); - if (key === this.root.hubGoals.currentGoal.definition.getHash()) { - // Can not pin current goal - return; - } - - if (key === blueprintShape) { - // Can not pin the blueprint shape - return; - } - - // Check if its already pinned - if (this.pinnedShapes.indexOf(key) >= 0) { - return; - } - - this.pinnedShapes.push(key); - this.rerenderFull(); - } -} +import { ClickDetector } from "../../../core/click_detector"; +import { formatBigNumber, makeDiv, arrayDeleteValue } from "../../../core/utils"; +import { ShapeDefinition } from "../../shape_definition"; +import { BaseHUDPart } from "../base_hud_part"; +import { blueprintShape, UPGRADES } from "../../upgrades"; +import { enumHubGoalRewards } from "../../tutorial_goals"; + +/** + * Manages the pinned shapes on the left side of the screen + */ +export class HUDPinnedShapes extends BaseHUDPart { + constructor(root) { + super(root); + /** + * Store a list of pinned shapes + * @type {Array} + */ + this.pinnedShapes = []; + + /** + * Store handles to the currently rendered elements, so we can update them more + * convenient. Also allows for cleaning up handles. + * @type {Array<{ + * key: string, + * amountLabel: HTMLElement, + * lastRenderedValue: string, + * element: HTMLElement, + * detector?: ClickDetector, + * infoDetector?: ClickDetector + * }>} + */ + this.handles = []; + } + + createElements(parent) { + this.element = makeDiv(parent, "ingame_HUD_PinnedShapes", []); + } + + /** + * Serializes the pinned shapes + */ + serialize() { + return { + shapes: this.pinnedShapes, + }; + } + + /** + * Deserializes the pinned shapes + * @param {{ shapes: Array}} data + */ + deserialize(data) { + if (!data || !data.shapes || !Array.isArray(data.shapes)) { + return "Invalid pinned shapes data"; + } + this.pinnedShapes = data.shapes; + } + + /** + * Initializes the hud component + */ + initialize() { + // Connect to any relevant signals + this.root.signals.storyGoalCompleted.add(this.rerenderFull, this); + this.root.signals.upgradePurchased.add(this.updateShapesAfterUpgrade, this); + this.root.signals.postLoadHook.add(this.rerenderFull, this); + this.root.hud.signals.shapePinRequested.add(this.pinNewShape, this); + this.root.hud.signals.shapeUnpinRequested.add(this.unpinShape, this); + + // Perform initial render + this.updateShapesAfterUpgrade(); + } + + /** + * Updates all shapes after an upgrade has been purchased and removes the unused ones + */ + updateShapesAfterUpgrade() { + for (let i = 0; i < this.pinnedShapes.length; ++i) { + const key = this.pinnedShapes[i]; + if (key === blueprintShape) { + // Ignore blueprint shapes + continue; + } + let goal = this.findGoalValueForShape(key); + if (!goal) { + // Seems no longer relevant + this.pinnedShapes.splice(i, 1); + i -= 1; + } + } + + this.rerenderFull(); + } + + /** + * Finds the current goal for the given key. If the key is the story goal, returns + * the story goal. If its the blueprint shape, no goal is returned. Otherwise + * it's searched for upgrades. + * @param {string} key + */ + findGoalValueForShape(key) { + if (key === this.root.hubGoals.currentGoal.definition.getHash()) { + return this.root.hubGoals.currentGoal.required; + } + if (key === blueprintShape) { + return null; + } + + // Check if this shape is required for any upgrade + for (const upgradeId in UPGRADES) { + const upgradeTiers = UPGRADES[upgradeId]; + const currentTier = this.root.hubGoals.getUpgradeLevel(upgradeId); + const tierHandle = upgradeTiers[currentTier]; + + if (!tierHandle) { + // Max level + continue; + } + + for (let i = 0; i < tierHandle.required.length; ++i) { + const { shape, amount } = tierHandle.required[i]; + if (shape === key) { + return amount; + } + } + } + + return null; + } + + /** + * Returns whether a given shape is currently pinned + * @param {string} key + */ + isShapePinned(key) { + if (key === this.root.hubGoals.currentGoal.definition.getHash() || key === blueprintShape) { + // This is a "special" shape which is always pinned + return true; + } + + return this.pinnedShapes.indexOf(key) >= 0; + } + + /** + * Rerenders the whole component + */ + rerenderFull() { + const currentGoal = this.root.hubGoals.currentGoal; + const currentKey = currentGoal.definition.getHash(); + + // First, remove all old shapes + for (let i = 0; i < this.handles.length; ++i) { + this.handles[i].element.remove(); + const detector = this.handles[i].detector; + if (detector) { + detector.cleanup(); + } + const infoDetector = this.handles[i].infoDetector; + if (infoDetector) { + infoDetector.cleanup(); + } + } + this.handles = []; + + // Pin story goal + this.internalPinShape(currentKey, false, "goal"); + + // Pin blueprint shape as well + if (this.root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_blueprints)) { + this.internalPinShape(blueprintShape, false, "blueprint"); + } + + // Pin manually pinned shapes + for (let i = 0; i < this.pinnedShapes.length; ++i) { + const key = this.pinnedShapes[i]; + if (key !== currentKey) { + this.internalPinShape(key); + } + } + } + + /** + * Pins a new shape + * @param {string} key + * @param {boolean} canUnpin + * @param {string=} className + */ + internalPinShape(key, canUnpin = true, className = null) { + const definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(key); + + const element = makeDiv(this.element, null, ["shape"]); + const canvas = definition.generateAsCanvas(120); + element.appendChild(canvas); + + if (className) { + element.classList.add(className); + } + + let detector = null; + if (canUnpin) { + element.classList.add("unpinable"); + detector = new ClickDetector(element, { + consumeEvents: true, + preventDefault: true, + targetOnly: true, + }); + detector.click.add(() => this.unpinShape(key)); + } else { + element.classList.add("marked"); + } + + // Show small info icon + const infoButton = document.createElement("button"); + infoButton.classList.add("infoButton"); + element.appendChild(infoButton); + const infoDetector = new ClickDetector(infoButton, { + consumeEvents: true, + preventDefault: true, + targetOnly: true, + }); + infoDetector.click.add(() => this.root.hud.signals.viewShapeDetailsRequested.dispatch(definition)); + + const amountLabel = makeDiv(element, null, ["amountLabel"], ""); + + const goal = this.findGoalValueForShape(key); + if (goal) { + makeDiv(element, null, ["goalLabel"], "/" + formatBigNumber(goal)); + } + + this.handles.push({ + key, + element, + amountLabel, + lastRenderedValue: "", + detector, + infoDetector, + }); + } + + /** + * Updates all amount labels + */ + update() { + for (let i = 0; i < this.handles.length; ++i) { + const handle = this.handles[i]; + + const currentValue = this.root.hubGoals.getShapesStoredByKey(handle.key); + const currentValueFormatted = formatBigNumber(currentValue); + if (currentValueFormatted !== handle.lastRenderedValue) { + handle.lastRenderedValue = currentValueFormatted; + handle.amountLabel.innerText = currentValueFormatted; + const goal = this.findGoalValueForShape(handle.key); + handle.element.classList.toggle("completed", goal && currentValue > goal); + } + } + } + + /** + * Unpins a shape + * @param {string} key + */ + unpinShape(key) { + arrayDeleteValue(this.pinnedShapes, key); + this.rerenderFull(); + } + + /** + * Requests to pin a new shape + * @param {ShapeDefinition} definition + */ + pinNewShape(definition) { + const key = definition.getHash(); + if (key === this.root.hubGoals.currentGoal.definition.getHash()) { + // Can not pin current goal + return; + } + + if (key === blueprintShape) { + // Can not pin the blueprint shape + return; + } + + // Check if its already pinned + if (this.pinnedShapes.indexOf(key) >= 0) { + return; + } + + this.pinnedShapes.push(key); + this.rerenderFull(); + } +} diff --git a/src/js/game/hud/parts/sandbox_controller.js b/src/js/game/hud/parts/sandbox_controller.js index eba65c88..c382cf84 100644 --- a/src/js/game/hud/parts/sandbox_controller.js +++ b/src/js/game/hud/parts/sandbox_controller.js @@ -89,8 +89,8 @@ export class HUDSandboxController extends BaseHUDPart { } modifyUpgrade(id, amount) { - const handle = UPGRADES[id]; - const maxLevel = handle.tiers.length; + const upgradeTiers = UPGRADES[id]; + const maxLevel = upgradeTiers.length; this.root.hubGoals.upgradeLevels[id] = Math.max( 0, @@ -100,7 +100,7 @@ export class HUDSandboxController extends BaseHUDPart { // Compute improvement let improvement = 1; for (let i = 0; i < this.root.hubGoals.upgradeLevels[id]; ++i) { - improvement += handle.tiers[i].improvement; + improvement += upgradeTiers[i].improvement; } this.root.hubGoals.upgradeImprovements[id] = improvement; this.root.signals.upgradePurchased.dispatch(id); diff --git a/src/js/game/hud/parts/shop.js b/src/js/game/hud/parts/shop.js index 93d11827..cfa78c29 100644 --- a/src/js/game/hud/parts/shop.js +++ b/src/js/game/hud/parts/shop.js @@ -59,11 +59,11 @@ export class HUDShop extends BaseHUDPart { rerenderFull() { for (const upgradeId in this.upgradeToElements) { const handle = this.upgradeToElements[upgradeId]; - const { tiers } = UPGRADES[upgradeId]; + const upgradeTiers = UPGRADES[upgradeId]; const currentTier = this.root.hubGoals.getUpgradeLevel(upgradeId); const currentTierMultiplier = this.root.hubGoals.upgradeImprovements[upgradeId]; - const tierHandle = tiers[currentTier]; + const tierHandle = upgradeTiers[currentTier]; // Set tier handle.elemTierLabel.innerText = T.ingame.shop.tier.replace( diff --git a/src/js/game/key_action_mapper.js b/src/js/game/key_action_mapper.js index 7140c927..074c4b84 100644 --- a/src/js/game/key_action_mapper.js +++ b/src/js/game/key_action_mapper.js @@ -45,7 +45,7 @@ export const KEYMAPPINGS = { buildings: { belt: { keyCode: key("1") }, - splitter: { keyCode: key("2") }, + balancer: { keyCode: key("2") }, underground_belt: { keyCode: key("3") }, miner: { keyCode: key("4") }, cutter: { keyCode: key("5") }, diff --git a/src/js/game/meta_building_registry.js b/src/js/game/meta_building_registry.js index 9fe57089..4b7095df 100644 --- a/src/js/game/meta_building_registry.js +++ b/src/js/game/meta_building_registry.js @@ -7,7 +7,7 @@ import { enumMinerVariants, MetaMinerBuilding } from "./buildings/miner"; import { MetaMixerBuilding } from "./buildings/mixer"; import { enumPainterVariants, MetaPainterBuilding } from "./buildings/painter"; import { enumRotaterVariants, MetaRotaterBuilding } from "./buildings/rotater"; -import { enumSplitterVariants, MetaSplitterBuilding } from "./buildings/splitter"; +import { enumBalancerVariants, MetaBalancerBuilding } from "./buildings/balancer"; import { MetaStackerBuilding } from "./buildings/stacker"; import { enumTrashVariants, MetaTrashBuilding } from "./buildings/trash"; import { enumUndergroundBeltVariants, MetaUndergroundBeltBuilding } from "./buildings/underground_belt"; @@ -26,7 +26,7 @@ import { MetaReaderBuilding } from "./buildings/reader"; const logger = createLogger("building_registry"); export function initMetaBuildingRegistry() { - gMetaBuildingRegistry.register(MetaSplitterBuilding); + gMetaBuildingRegistry.register(MetaBalancerBuilding); gMetaBuildingRegistry.register(MetaMinerBuilding); gMetaBuildingRegistry.register(MetaCutterBuilding); gMetaBuildingRegistry.register(MetaRotaterBuilding); @@ -52,12 +52,12 @@ export function initMetaBuildingRegistry() { registerBuildingVariant(2, MetaBeltBuilding, defaultBuildingVariant, 1); registerBuildingVariant(3, MetaBeltBuilding, defaultBuildingVariant, 2); - // Splitter - registerBuildingVariant(4, MetaSplitterBuilding); - registerBuildingVariant(5, MetaSplitterBuilding, enumSplitterVariants.compact); - registerBuildingVariant(6, MetaSplitterBuilding, enumSplitterVariants.compactInverse); - registerBuildingVariant(47, MetaSplitterBuilding, enumSplitterVariants.compactMerge); - registerBuildingVariant(48, MetaSplitterBuilding, enumSplitterVariants.compactMergeInverse); + // Balancer + registerBuildingVariant(4, MetaBalancerBuilding); + registerBuildingVariant(5, MetaBalancerBuilding, enumBalancerVariants.merger); + registerBuildingVariant(6, MetaBalancerBuilding, enumBalancerVariants.mergerInverse); + registerBuildingVariant(47, MetaBalancerBuilding, enumBalancerVariants.splitter); + registerBuildingVariant(48, MetaBalancerBuilding, enumBalancerVariants.splitterInverse); // Miner registerBuildingVariant(7, MetaMinerBuilding); diff --git a/src/js/game/systems/item_processor.js b/src/js/game/systems/item_processor.js index b4a7231b..7fc2819b 100644 --- a/src/js/game/systems/item_processor.js +++ b/src/js/game/systems/item_processor.js @@ -45,7 +45,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter { * @type {Object} */ this.handlers = { - [enumItemProcessorTypes.splitter]: this.process_SPLITTER, + [enumItemProcessorTypes.balancer]: this.process_BALANCER, [enumItemProcessorTypes.cutter]: this.process_CUTTER, [enumItemProcessorTypes.cutterQuad]: this.process_CUTTER_QUAD, [enumItemProcessorTypes.rotater]: this.process_ROTATER, @@ -305,8 +305,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter { /** * @param {ProcessorImplementationPayload} payload */ - process_SPLITTER(payload) { - // trackProduction = false; + process_BALANCER(payload) { const availableSlots = payload.entity.components.ItemEjector.slots.length; const processorComp = payload.entity.components.ItemProcessor; diff --git a/src/js/game/tutorial_goals.js b/src/js/game/tutorial_goals.js index 6dce9617..3a5cf807 100644 --- a/src/js/game/tutorial_goals.js +++ b/src/js/game/tutorial_goals.js @@ -11,21 +11,19 @@ export const enumHubGoalRewards = { reward_painter: "reward_painter", reward_mixer: "reward_mixer", reward_stacker: "reward_stacker", - reward_splitter: "reward_splitter", + reward_balancer: "reward_balancer", reward_tunnel: "reward_tunnel", reward_rotater_ccw: "reward_rotater_ccw", - reward_rotater_180: "reward_rotater_fl", + reward_rotater_180: "reward_rotater_180", reward_miner_chainable: "reward_miner_chainable", reward_underground_belt_tier_2: "reward_underground_belt_tier_2", - reward_splitter_compact: "reward_splitter_compact", + reward_splitter: "reward_splitter", reward_cutter_quad: "reward_cutter_quad", reward_painter_double: "reward_painter_double", reward_painter_quad: "reward_painter_quad", reward_storage: "reward_storage", - - // @todo: unlock - reward_merger_compact: "reward_compact_merger", + reward_merger: "reward_merger", reward_blueprints: "reward_blueprints", reward_freeplay: "reward_freeplay", @@ -55,14 +53,14 @@ export const tutorialGoals = [ // Rectangle { shape: "RuRuRuRu", // miners t1 - required: 100, - reward: enumHubGoalRewards.reward_splitter, + required: 85, + reward: enumHubGoalRewards.reward_balancer, }, // 4 { shape: "RuRu----", // processors t2 - required: 120, + required: 100, reward: enumHubGoalRewards.reward_rotater, }, @@ -70,14 +68,14 @@ export const tutorialGoals = [ // Rotater { shape: "Cu----Cu", // belts t2 - required: 200, + required: 175, reward: enumHubGoalRewards.reward_tunnel, }, // 6 { shape: "Cu------", // miners t2 - required: 400, + required: 250, reward: enumHubGoalRewards.reward_painter, }, @@ -85,14 +83,14 @@ export const tutorialGoals = [ // Painter { shape: "CrCrCrCr", // unused - required: 800, + required: 500, reward: enumHubGoalRewards.reward_rotater_ccw, }, // 8 { shape: "RbRb----", // painter t2 - required: 1000, + required: 700, reward: enumHubGoalRewards.reward_mixer, }, @@ -100,15 +98,15 @@ export const tutorialGoals = [ // Mixing (purple) { shape: "CpCpCpCp", // belts t3 - required: 1400, - reward: enumHubGoalRewards.reward_splitter_compact, + required: 800, + reward: enumHubGoalRewards.reward_splitter, }, // 10 // Star shape + cyan { shape: "ScScScSc", // miners t3 - required: 1600, + required: 900, reward: enumHubGoalRewards.reward_stacker, }, @@ -116,7 +114,7 @@ export const tutorialGoals = [ // Stacker { shape: "CgScScCg", // processors t3 - required: 1800, + required: 1000, reward: enumHubGoalRewards.reward_miner_chainable, }, @@ -124,49 +122,56 @@ export const tutorialGoals = [ // Blueprints { shape: "CbCbCbRb:CwCwCwCw", - required: 2000, + required: 1250, reward: enumHubGoalRewards.reward_blueprints, }, // 13 { shape: "RpRpRpRp:CwCwCwCw", // painting t3 - required: 12000, + required: 5000, reward: enumHubGoalRewards.reward_underground_belt_tier_2, }, // 14 { shape: "SrSrSrSr:CyCyCyCy", // unused - required: 16000, + required: 7500, reward: enumHubGoalRewards.reward_storage, }, // 15 { shape: "SrSrSrSr:CyCyCyCy:SwSwSwSw", // belts t4 (two variants) - required: 25000, + required: 15000, reward: enumHubGoalRewards.reward_cutter_quad, }, // 16 { shape: "CbRbRbCb:CwCwCwCw:WbWbWbWb", // miner t4 (two variants) - required: 50000, + required: 20000, reward: enumHubGoalRewards.reward_painter_double, }, // 17 { - shape: "WrRgWrRg:CwCrCwCr:SgSgSgSg", // processors t4 (two variants) - required: 120000, - reward: enumHubGoalRewards.reward_painter_quad, + shape: "CbRbRbCb:CwCwCwCw:WbWbWbWb", // rotater 180 + required: 25000, + reward: enumHubGoalRewards.reward_rotater_180, }, // 18 + { + shape: "WrRgWrRg:CwCrCwCr:SgSgSgSg", // processors t4 (two variants) + required: 30000, + reward: enumHubGoalRewards.reward_painter_quad, + }, + + // 19 { shape: finalGameShape, - required: 250000, + required: 50000, reward: enumHubGoalRewards.reward_freeplay, }, ]; diff --git a/src/js/game/tutorial_goals_mappings.js b/src/js/game/tutorial_goals_mappings.js index 93fa64c4..1257cad9 100644 --- a/src/js/game/tutorial_goals_mappings.js +++ b/src/js/game/tutorial_goals_mappings.js @@ -4,7 +4,7 @@ import { MetaRotaterBuilding, enumRotaterVariants } from "./buildings/rotater"; import { MetaPainterBuilding, enumPainterVariants } from "./buildings/painter"; import { MetaMixerBuilding } from "./buildings/mixer"; import { MetaStackerBuilding } from "./buildings/stacker"; -import { MetaSplitterBuilding, enumSplitterVariants } from "./buildings/splitter"; +import { MetaBalancerBuilding, enumBalancerVariants } from "./buildings/balancer"; import { MetaUndergroundBeltBuilding, enumUndergroundBeltVariants } from "./buildings/underground_belt"; import { MetaMinerBuilding, enumMinerVariants } from "./buildings/miner"; import { MetaTrashBuilding, enumTrashVariants } from "./buildings/trash"; @@ -29,7 +29,7 @@ export const enumHubGoalRewardsToContentUnlocked = { [enumHubGoalRewards.reward_painter]: typed([[MetaPainterBuilding, defaultBuildingVariant]]), [enumHubGoalRewards.reward_mixer]: typed([[MetaMixerBuilding, defaultBuildingVariant]]), [enumHubGoalRewards.reward_stacker]: typed([[MetaStackerBuilding, defaultBuildingVariant]]), - [enumHubGoalRewards.reward_splitter]: typed([[MetaSplitterBuilding, defaultBuildingVariant]]), + [enumHubGoalRewards.reward_balancer]: typed([[MetaBalancerBuilding, defaultBuildingVariant]]), [enumHubGoalRewards.reward_tunnel]: typed([[MetaUndergroundBeltBuilding, defaultBuildingVariant]]), [enumHubGoalRewards.reward_rotater_ccw]: typed([[MetaRotaterBuilding, enumRotaterVariants.ccw]]), @@ -38,9 +38,8 @@ export const enumHubGoalRewardsToContentUnlocked = { [enumHubGoalRewards.reward_underground_belt_tier_2]: typed([ [MetaUndergroundBeltBuilding, enumUndergroundBeltVariants.tier2], ]), - [enumHubGoalRewards.reward_splitter_compact]: typed([ - [MetaSplitterBuilding, enumSplitterVariants.compact], - ]), + [enumHubGoalRewards.reward_splitter]: typed([[MetaBalancerBuilding, enumBalancerVariants.splitter]]), + [enumHubGoalRewards.reward_merger]: typed([[MetaBalancerBuilding, enumBalancerVariants.merger]]), [enumHubGoalRewards.reward_cutter_quad]: typed([[MetaCutterBuilding, enumCutterVariants.quad]]), [enumHubGoalRewards.reward_painter_double]: typed([[MetaPainterBuilding, enumPainterVariants.double]]), [enumHubGoalRewards.reward_painter_quad]: typed([[MetaPainterBuilding, enumPainterVariants.quad]]), diff --git a/src/js/game/upgrades.js b/src/js/game/upgrades.js index 6e0c7c64..4735592b 100644 --- a/src/js/game/upgrades.js +++ b/src/js/game/upgrades.js @@ -1,175 +1,160 @@ -import { findNiceIntegerValue } from "../core/utils"; -import { ShapeDefinition } from "./shape_definition"; - -export const finalGameShape = "RuCw--Cw:----Ru--"; -export const blueprintShape = "CbCbCbRb:CwCwCwCw"; - -export const UPGRADES = { - belt: { - tiers: [ - { - required: [{ shape: "CuCuCuCu", amount: 150 }], - improvement: 1, - }, - { - required: [{ shape: "--CuCu--", amount: 1200 }], - improvement: 2, - }, - { - required: [{ shape: "CpCpCpCp", amount: 15000 }], - improvement: 2, - }, - { - required: [{ shape: "SrSrSrSr:CyCyCyCy", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: "SrSrSrSr:CyCyCyCy:SwSwSwSw", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: finalGameShape, amount: 150000 }], - improvement: 5, - excludePrevious: true, - }, - ], - }, - - miner: { - tiers: [ - { - required: [{ shape: "RuRuRuRu", amount: 400 }], - improvement: 1, - }, - { - required: [{ shape: "Cu------", amount: 4000 }], - improvement: 2, - }, - { - required: [{ shape: "ScScScSc", amount: 20000 }], - improvement: 2, - }, - { - required: [{ shape: "CwCwCwCw:WbWbWbWb", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: "CbRbRbCb:CwCwCwCw:WbWbWbWb", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: finalGameShape, amount: 150000 }], - improvement: 5, - excludePrevious: true, - }, - ], - }, - - processors: { - tiers: [ - { - required: [{ shape: "SuSuSuSu", amount: 1000 }], - improvement: 1, - }, - { - required: [{ shape: "RuRu----", amount: 2000 }], - improvement: 2, - }, - { - required: [{ shape: "CgScScCg", amount: 25000 }], - improvement: 2, - }, - { - required: [{ shape: "CwCrCwCr:SgSgSgSg", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: "WrRgWrRg:CwCrCwCr:SgSgSgSg", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: finalGameShape, amount: 150000 }], - improvement: 5, - excludePrevious: true, - }, - ], - }, - - painting: { - tiers: [ - { - required: [{ shape: "RbRb----", amount: 1500 }], - improvement: 2, - }, - { - required: [{ shape: "WrWrWrWr", amount: 4000 }], - improvement: 1, - }, - { - required: [{ shape: "RpRpRpRp:CwCwCwCw", amount: 30000 }], - improvement: 2, - }, - { - required: [{ shape: "WpWpWpWp:CwCwCwCw:WpWpWpWp", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: "WpWpWpWp:CwCwCwCw:WpWpWpWp:CwCwCwCw", amount: 40000 }], - improvement: 2, - }, - { - required: [{ shape: finalGameShape, amount: 150000 }], - improvement: 5, - excludePrevious: true, - }, - ], - }, -}; - -// Tiers need % of the previous tier as requirement too -const tierGrowth = 2.5; - -// Automatically generate tier levels -for (const upgradeId in UPGRADES) { - const upgrade = UPGRADES[upgradeId]; - - let currentTierRequirements = []; - for (let i = 0; i < upgrade.tiers.length; ++i) { - const tierHandle = upgrade.tiers[i]; - const originalRequired = tierHandle.required.slice(); - - for (let k = currentTierRequirements.length - 1; k >= 0; --k) { - const oldTierRequirement = currentTierRequirements[k]; - if (!tierHandle.excludePrevious) { - tierHandle.required.unshift({ - shape: oldTierRequirement.shape, - amount: oldTierRequirement.amount, - }); - } - } - currentTierRequirements.push( - ...originalRequired.map(req => ({ - amount: req.amount, - shape: req.shape, - })) - ); - currentTierRequirements.forEach(tier => { - tier.amount = findNiceIntegerValue(tier.amount * tierGrowth); - }); - } -} - -if (G_IS_DEV) { - for (const upgradeId in UPGRADES) { - const upgrade = UPGRADES[upgradeId]; - upgrade.tiers.forEach(tier => { - tier.required.forEach(({ shape }) => { - try { - ShapeDefinition.fromShortKey(shape); - } catch (ex) { - throw new Error("Invalid upgrade goal: '" + ex + "' for shape" + shape); - } - }); - }); - } -} +import { findNiceIntegerValue } from "../core/utils"; +import { ShapeDefinition } from "./shape_definition"; + +export const finalGameShape = "RuCw--Cw:----Ru--"; +export const blueprintShape = "CbCbCbRb:CwCwCwCw"; + +const fixedImprovements = [0.5, 0.5, 1, 1, 2, 2]; + +/** @typedef {{ + * shape: string, + * amount: number + * }} UpgradeRequirement */ + +/** @typedef {{ + * required: Array + * improvement?: number, + * excludePrevious?: boolean + * }} TierRequirement */ + +/** @typedef {Array} UpgradeTiers */ + +/** @type {Object} */ +export const UPGRADES = { + belt: [ + { + required: [{ shape: "CuCuCuCu", amount: 150 }], + }, + { + required: [{ shape: "--CuCu--", amount: 1000 }], + }, + { + required: [{ shape: "CpCpCpCp", amount: 5000 }], + }, + { + required: [{ shape: "SrSrSrSr:CyCyCyCy", amount: 12000 }], + }, + { + required: [{ shape: "SrSrSrSr:CyCyCyCy:SwSwSwSw", amount: 20000 }], + }, + { + required: [{ shape: finalGameShape, amount: 75000 }], + excludePrevious: true, + }, + ], + + miner: [ + { + required: [{ shape: "RuRuRuRu", amount: 400 }], + }, + { + required: [{ shape: "Cu------", amount: 3000 }], + }, + { + required: [{ shape: "ScScScSc", amount: 7000 }], + }, + { + required: [{ shape: "CwCwCwCw:WbWbWbWb", amount: 15000 }], + }, + { + required: [{ shape: "CbRbRbCb:CwCwCwCw:WbWbWbWb", amount: 30000 }], + }, + { + required: [{ shape: finalGameShape, amount: 85000 }], + excludePrevious: true, + }, + ], + + processors: [ + { + required: [{ shape: "SuSuSuSu", amount: 600 }], + }, + { + required: [{ shape: "RuRu----", amount: 2000 }], + }, + { + required: [{ shape: "CgScScCg", amount: 15000 }], + }, + { + required: [{ shape: "CwCrCwCr:SgSgSgSg", amount: 20000 }], + }, + { + required: [{ shape: "WrRgWrRg:CwCrCwCr:SgSgSgSg", amount: 30000 }], + }, + { + required: [{ shape: finalGameShape, amount: 100000 }], + excludePrevious: true, + }, + ], + + painting: [ + { + required: [{ shape: "RbRb----", amount: 1000 }], + }, + { + required: [{ shape: "WrWrWrWr", amount: 3000 }], + }, + { + required: [{ shape: "RpRpRpRp:CwCwCwCw", amount: 15000 }], + }, + { + required: [{ shape: "WpWpWpWp:CwCwCwCw:WpWpWpWp", amount: 20000 }], + }, + { + required: [{ shape: "WpWpWpWp:CwCwCwCw:WpWpWpWp:CwCwCwCw", amount: 30000 }], + }, + { + required: [{ shape: finalGameShape, amount: 125000 }], + excludePrevious: true, + }, + ], +}; + +// Tiers need % of the previous tier as requirement too +const tierGrowth = 1.8; + +// Automatically generate tier levels +for (const upgradeId in UPGRADES) { + const upgradeTiers = UPGRADES[upgradeId]; + + let currentTierRequirements = []; + for (let i = 0; i < upgradeTiers.length; ++i) { + const tierHandle = upgradeTiers[i]; + tierHandle.improvement = fixedImprovements[i]; + const originalRequired = tierHandle.required.slice(); + + for (let k = currentTierRequirements.length - 1; k >= 0; --k) { + const oldTierRequirement = currentTierRequirements[k]; + if (!tierHandle.excludePrevious) { + tierHandle.required.unshift({ + shape: oldTierRequirement.shape, + amount: oldTierRequirement.amount, + }); + } + } + currentTierRequirements.push( + ...originalRequired.map(req => ({ + amount: req.amount, + shape: req.shape, + })) + ); + currentTierRequirements.forEach(tier => { + tier.amount = findNiceIntegerValue(tier.amount * tierGrowth); + }); + } +} + +// VALIDATE +if (G_IS_DEV) { + for (const upgradeId in UPGRADES) { + UPGRADES[upgradeId].forEach(tier => { + tier.required.forEach(({ shape }) => { + try { + ShapeDefinition.fromShortKey(shape); + } catch (ex) { + throw new Error("Invalid upgrade goal: '" + ex + "' for shape" + shape); + } + }); + }); + } +} diff --git a/src/js/platform/browser/game_analytics.js b/src/js/platform/browser/game_analytics.js index 19a67f57..52497ef7 100644 --- a/src/js/platform/browser/game_analytics.js +++ b/src/js/platform/browser/game_analytics.js @@ -192,10 +192,9 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface { // Check if its required to unlock an upgrade for (const upgradeKey in UPGRADES) { - const handle = UPGRADES[upgradeKey]; - const tiers = handle.tiers; - for (let i = 0; i < tiers.length; ++i) { - const tier = tiers[i]; + const upgradeTiers = UPGRADES[upgradeKey]; + for (let i = 0; i < upgradeTiers.length; ++i) { + const tier = upgradeTiers[i]; const required = tier.required; for (let k = 0; k < required.length; ++k) { if (required[k].shape === key) { diff --git a/src/js/savegame/schemas/1006.js b/src/js/savegame/schemas/1006.js index 90504754..422814c1 100644 --- a/src/js/savegame/schemas/1006.js +++ b/src/js/savegame/schemas/1006.js @@ -7,7 +7,7 @@ import { enumMinerVariants, MetaMinerBuilding } from "../../game/buildings/miner import { MetaMixerBuilding } from "../../game/buildings/mixer.js"; import { enumPainterVariants, MetaPainterBuilding } from "../../game/buildings/painter.js"; import { enumRotaterVariants, MetaRotaterBuilding } from "../../game/buildings/rotater.js"; -import { enumSplitterVariants, MetaSplitterBuilding } from "../../game/buildings/splitter.js"; +import { enumBalancerVariants, MetaBalancerBuilding } from "../../game/buildings/balancer.js"; import { MetaStackerBuilding } from "../../game/buildings/stacker.js"; import { enumTrashVariants, MetaTrashBuilding } from "../../game/buildings/trash.js"; import { @@ -33,6 +33,15 @@ function findCode(metaBuilding, variant = defaultBuildingVariant, rotationVarian return getCodeFromBuildingData(gMetaBuildingRegistry.findByClass(metaBuilding), variant, rotationVariant); } +/** + * Rebalances a value from the old balancing to the new one + * @param {number} value + * @returns {number} + */ +function rebalance(value) { + return Math.round(Math.pow(value, 0.75)); +} + export class SavegameInterface_V1006 extends SavegameInterface_V1005 { getVersion() { return 1006; @@ -49,15 +58,15 @@ export class SavegameInterface_V1006 extends SavegameInterface_V1005 { "sprites/blueprints/belt_left.png": findCode(MetaBeltBuilding, defaultBuildingVariant, 1), "sprites/blueprints/belt_right.png": findCode(MetaBeltBuilding, defaultBuildingVariant, 2), - // Splitter - "sprites/blueprints/splitter.png": findCode(MetaSplitterBuilding), + // Splitter (=Balancer) + "sprites/blueprints/splitter.png": findCode(MetaBalancerBuilding), "sprites/blueprints/splitter-compact.png": findCode( - MetaSplitterBuilding, - enumSplitterVariants.compact + MetaBalancerBuilding, + enumBalancerVariants.merger ), "sprites/blueprints/splitter-compact-inverse.png": findCode( - MetaSplitterBuilding, - enumSplitterVariants.compactInverse + MetaBalancerBuilding, + enumBalancerVariants.mergerInverse ), // Underground belt @@ -133,6 +142,17 @@ export class SavegameInterface_V1006 extends SavegameInterface_V1005 { return true; } + // Reduce stored shapes + const stored = dump.hubGoals.storedShapes; + for (const shapeKey in stored) { + stored[shapeKey] = rebalance(stored[shapeKey]); + } + + // Reduce goals + if (dump.hubGoals.currentGoal) { + dump.hubGoals.currentGoal.required = rebalance(dump.hubGoals.currentGoal.required); + } + // Update entities const entities = dump.entities; for (let i = 0; i < entities.length; ++i) { diff --git a/translations/base-en.yaml b/translations/base-en.yaml index 6316a70e..193a2d04 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -484,25 +484,25 @@ buildings: name: Tunnel Tier II description: Allows you to tunnel resources under buildings and belts. - # Internal name for the Balancer - splitter: + # Balancer + balancer: default: - name: &splitter Balancer + name: &balancer Balancer description: Multifunctional - Evenly distributes all inputs onto all outputs. - compact: + merger: name: Merger (compact) description: Merges two conveyor belts into one. - compact-inverse: + merger-inverse: name: Merger (compact) description: Merges two conveyor belts into one. - compact-merge: + splitter: name: Splitter (compact) description: Splits one conveyor belt into two. - compact-merge-inverse: + splitter-inverse: name: Splitter (compact) description: Splits one conveyor belt into two. @@ -673,8 +673,8 @@ storyRewards: title: Combiner desc: You can now combine shapes with the combiner! Both inputs are combined, and if they can be put next to each other, they will be fused. If not, the right input is stacked on top of the left input! - reward_splitter: - title: Splitter/Merger + reward_balancer: + title: Balancer desc: The multifunctional balancer has been unlocked - It can be used to build bigger factories by splitting and merging items onto multiple belts!

reward_tunnel: @@ -693,10 +693,15 @@ storyRewards: title: Tunnel Tier II desc: You have unlocked a new variant of the tunnel - It has a bigger range, and you can also mix-n-match those tunnels now! - reward_splitter_compact: - title: Compact Balancer + reward_merger: + title: Compact Merger desc: >- - You have unlocked a compact variant of the balancer - It accepts two inputs and merges them into one belt! + You have unlocked a merger variant of the balancer - It accepts two inputs and merges them into one belt! + + reward_splitter: + title: Compact Splitter + desc: >- + You have unlocked a merger variant of the balancer - It accepts one input and splits them into two! reward_cutter_quad: title: Quad Cutting @@ -722,6 +727,10 @@ storyRewards: title: Blueprints desc: You can now copy and paste parts of your factory! Select an area (Hold CTRL, then drag with your mouse), and press 'C' to copy it.

Pasting it is not free, you need to produce blueprint shapes to afford it! (Those you just delivered). + reward_rotater_180: + title: Rotater (180 degrees) + desc: You just unlocked the 180 degress rotater! - It allows you to rotate a shape by 180 degress (Surprise! :D) + # Special reward, which is shown when there is no reward actually no_reward: title: Next level @@ -962,7 +971,7 @@ keybindings: # --- Do not translate the values in this section belt: *belt - splitter: *splitter + balancer: *balancer underground_belt: *underground_belt miner: *miner cutter: *cutter