diff --git a/build.gradle b/build.gradle index 8e2949f2c4..47bbaa9dfd 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ allprojects { appName = 'Mindustry' gdxVersion = '1.9.8' aiVersion = '1.8.1' - uCoreVersion = '64d13cc' + uCoreVersion = '238babe' getVersionString = { String buildVersion = getBuildVersion() diff --git a/core/assets-raw/sprites/blocks/production/flierfactory-top.png b/core/assets-raw/sprites/blocks/production/flierfactory-top.png new file mode 100644 index 0000000000..c0c0c82aa7 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/flierfactory-top.png differ diff --git a/core/assets-raw/sprites/blocks/production/flierfactory.png b/core/assets-raw/sprites/blocks/production/flierfactory.png index b3fb296cff..72c6264dc3 100644 Binary files a/core/assets-raw/sprites/blocks/production/flierfactory.png and b/core/assets-raw/sprites/blocks/production/flierfactory.png differ diff --git a/core/assets-raw/sprites/units/flier.png b/core/assets-raw/sprites/units/flier.png new file mode 100644 index 0000000000..dd83278b1d Binary files /dev/null and b/core/assets-raw/sprites/units/flier.png differ diff --git a/core/assets-raw/sprites/enemies/scout-base.png b/core/assets-raw/sprites/units/scout-base.png similarity index 100% rename from core/assets-raw/sprites/enemies/scout-base.png rename to core/assets-raw/sprites/units/scout-base.png diff --git a/core/assets-raw/sprites/enemies/scout-leg.png b/core/assets-raw/sprites/units/scout-leg.png similarity index 100% rename from core/assets-raw/sprites/enemies/scout-leg.png rename to core/assets-raw/sprites/units/scout-leg.png diff --git a/core/assets-raw/sprites/enemies/scout.png b/core/assets-raw/sprites/units/scout.png similarity index 100% rename from core/assets-raw/sprites/enemies/scout.png rename to core/assets-raw/sprites/units/scout.png diff --git a/core/assets/maps/test.mmap b/core/assets/maps/test.mmap index de4d45a09c..aefe433ff5 100644 Binary files a/core/assets/maps/test.mmap and b/core/assets/maps/test.mmap differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index cbda60b357..40c8b0064e 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -13,56 +13,56 @@ background index: -1 blackrock1 rotate: false - xy: 637, 306 + xy: 223, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackrockshadow1 rotate: false - xy: 419, 125 + xy: 245, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone1 rotate: false - xy: 136, 43 + xy: 255, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone2 rotate: false - xy: 134, 33 + xy: 265, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstone3 rotate: false - xy: 419, 159 + xy: 275, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstoneblock1 rotate: false - xy: 429, 160 + xy: 285, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstoneblock2 rotate: false - xy: 439, 160 + xy: 295, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blackstoneblock3 rotate: false - xy: 449, 160 + xy: 305, 117 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -76,504 +76,504 @@ blackstoneedge index: -1 coal1 rotate: false - xy: 632, 296 + xy: 860, 373 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal2 rotate: false - xy: 693, 353 + xy: 413, 141 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coal3 rotate: false - xy: 693, 343 + xy: 488, 168 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 deepwater rotate: false - xy: 945, 445 + xy: 419, 159 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt1 rotate: false - xy: 955, 455 + xy: 429, 160 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt2 rotate: false - xy: 965, 465 + xy: 439, 160 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirt3 rotate: false - xy: 955, 445 + xy: 449, 160 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 dirtedge rotate: false - xy: 871, 439 + xy: 842, 397 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 grass1 rotate: false - xy: 985, 455 + xy: 704, 369 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass2 rotate: false - xy: 985, 445 + xy: 704, 359 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grass3 rotate: false - xy: 889, 423 + xy: 714, 364 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassblock1 rotate: false - xy: 899, 423 + xy: 724, 364 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassblock2 rotate: false - xy: 887, 413 + xy: 734, 364 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 grassedge rotate: false - xy: 113, 17 + xy: 762, 381 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 ice1 rotate: false - xy: 897, 413 + xy: 642, 296 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice2 rotate: false - xy: 698, 401 + xy: 652, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 ice3 rotate: false - xy: 696, 391 + xy: 699, 349 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iceedge rotate: false - xy: 674, 361 + xy: 776, 381 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 icerock1 rotate: false - xy: 696, 381 + xy: 699, 339 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerock2 rotate: false - xy: 708, 401 + xy: 699, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow1 rotate: false - xy: 706, 391 + xy: 699, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow1 rotate: false - xy: 706, 391 + xy: 699, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icerockshadow2 rotate: false - xy: 706, 381 + xy: 714, 354 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rockshadow2 rotate: false - xy: 706, 381 + xy: 714, 354 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron1 rotate: false - xy: 148, 54 + xy: 724, 354 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron2 rotate: false - xy: 158, 54 + xy: 734, 354 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 iron3 rotate: false - xy: 168, 54 + xy: 744, 360 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lava rotate: false - xy: 702, 291 + xy: 739, 330 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lavaedge rotate: false - xy: 669, 347 + xy: 790, 381 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 lead1 rotate: false - xy: 620, 266 + xy: 739, 310 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead2 rotate: false - xy: 630, 276 + xy: 749, 340 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 lead3 rotate: false - xy: 630, 266 + xy: 749, 330 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 mossblock rotate: false - xy: 907, 413 + xy: 188, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oil rotate: false - xy: 875, 405 + xy: 198, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 oiledge rotate: false - xy: 669, 333 + xy: 804, 381 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 rock1 rotate: false - xy: 949, 425 + xy: 622, 286 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rock2 rotate: false - xy: 965, 435 + xy: 632, 286 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand1 rotate: false - xy: 985, 435 + xy: 620, 276 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand2 rotate: false - xy: 979, 425 + xy: 620, 266 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sand3 rotate: false - xy: 989, 425 + xy: 630, 276 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock1 rotate: false - xy: 139, 23 + xy: 630, 266 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock2 rotate: false - xy: 144, 33 + xy: 640, 276 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandblock3 rotate: false - xy: 146, 43 + xy: 640, 266 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sandedge rotate: false - xy: 321, 121 + xy: 818, 381 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 shrub rotate: false - xy: 216, 44 + xy: 784, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shrubshadow rotate: false - xy: 149, 23 + xy: 794, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow1 rotate: false - xy: 184, 34 + xy: 677, 311 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow2 rotate: false - xy: 194, 34 + xy: 687, 313 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snow3 rotate: false - xy: 204, 34 + xy: 682, 301 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock1 rotate: false - xy: 214, 34 + xy: 682, 291 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock2 rotate: false - xy: 159, 23 + xy: 697, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowblock3 rotate: false - xy: 169, 24 + xy: 692, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 snowedge rotate: false - xy: 377, 121 + xy: 860, 383 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 stone1 rotate: false - xy: 229, 24 + xy: 712, 284 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 234, 34 + xy: 722, 284 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 239, 24 + xy: 759, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock1 rotate: false - xy: 139, 13 + xy: 759, 337 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock2 rotate: false - xy: 149, 13 + xy: 769, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock3 rotate: false - xy: 159, 13 + xy: 759, 327 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneedge rotate: false - xy: 885, 433 + xy: 788, 367 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 thorium1 rotate: false - xy: 209, 14 + xy: 779, 337 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium2 rotate: false - xy: 219, 14 + xy: 789, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thorium3 rotate: false - xy: 229, 14 + xy: 769, 317 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium1 rotate: false - xy: 714, 412 + xy: 789, 337 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium2 rotate: false - xy: 724, 412 + xy: 799, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanium3 rotate: false - xy: 734, 412 + xy: 779, 317 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 water rotate: false - xy: 828, 401 + xy: 809, 327 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 wateredge rotate: false - xy: 899, 433 + xy: 802, 367 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 block-middle rotate: false - xy: 683, 331 + xy: 627, 306 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pump-liquid rotate: false - xy: 683, 331 + xy: 627, 306 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-liquid rotate: false - xy: 691, 321 + xy: 669, 321 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 cross-1 rotate: false - xy: 955, 465 + xy: 632, 296 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -594,28 +594,28 @@ cross-3 index: -1 enemyspawn rotate: false - xy: 985, 465 + xy: 689, 323 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 playerspawn rotate: false - xy: 905, 403 + xy: 133, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shadow rotate: false - xy: 293, 111 + xy: 130, 35 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 battery rotate: false - xy: 933, 469 + xy: 113, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -629,21 +629,21 @@ batterylarge index: -1 coalgenerator rotate: false - xy: 652, 299 + xy: 669, 341 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coalgenerator-top rotate: false - xy: 662, 299 + xy: 669, 331 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 combustiongenerator rotate: false - xy: 672, 299 + xy: 679, 353 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -678,49 +678,49 @@ nuclearreactor-lights index: -1 powerinfinite rotate: false - xy: 919, 425 + xy: 315, 107 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powervoid rotate: false - xy: 935, 435 + xy: 875, 421 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rtgenerator rotate: false - xy: 975, 435 + xy: 652, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 rtgenerator-top rotate: false - xy: 969, 425 + xy: 662, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shieldgenerator rotate: false - xy: 166, 44 + xy: 630, 256 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shieldprojector rotate: false - xy: 817, 427 + xy: 835, 427 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 solarpanel rotate: false - xy: 179, 24 + xy: 692, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -734,7 +734,7 @@ teleporter index: -1 thermalgenerator rotate: false - xy: 199, 14 + xy: 769, 327 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -748,14 +748,14 @@ alloysmelter index: -1 coaldrill rotate: false - xy: 693, 333 + xy: 315, 117 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 coalextractor rotate: false - xy: 642, 296 + xy: 669, 351 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -795,37 +795,44 @@ flierfactory orig: 16, 16 offset: 0, 0 index: -1 +flierfactory-top + rotate: false + xy: 401, 151 + size: 16, 16 + orig: 16, 16 + offset: 0, 0 + index: -1 fluxpump rotate: false - xy: 975, 445 + xy: 694, 363 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 irondrill rotate: false - xy: 178, 54 + xy: 744, 350 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 laserdrill rotate: false - xy: 206, 76 + xy: 561, 225 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 lavasmelter rotate: false - xy: 620, 276 + xy: 739, 320 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 leaddrill rotate: false - xy: 640, 276 + xy: 749, 320 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -846,154 +853,154 @@ oilextractor-liquid index: -1 oilrefinery rotate: false - xy: 885, 403 + xy: 208, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 omnidrill rotate: false - xy: 895, 403 + xy: 218, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulverizer rotate: false - xy: 939, 425 + xy: 874, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pump rotate: false - xy: 955, 435 + xy: 884, 391 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 quartzextractor rotate: false - xy: 799, 427 + xy: 817, 427 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 siliconextractor rotate: false - xy: 154, 33 + xy: 804, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 smelter rotate: false - xy: 164, 34 + xy: 672, 301 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 smelter-middle rotate: false - xy: 174, 34 + xy: 672, 291 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stonedrill rotate: false - xy: 169, 14 + xy: 769, 337 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneformer rotate: false - xy: 179, 14 + xy: 779, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 thoriumdrill rotate: false - xy: 239, 14 + xy: 779, 327 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumdrill rotate: false - xy: 718, 402 + xy: 789, 327 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumextractor rotate: false - xy: 728, 402 + xy: 799, 337 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 uraniumextractor rotate: false - xy: 788, 401 + xy: 789, 307 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 waterextractor rotate: false - xy: 651, 343 + xy: 651, 325 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 waterextractor-liquid rotate: false - xy: 651, 325 + xy: 680, 407 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 conduit-bottom rotate: false - xy: 689, 311 + xy: 679, 333 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduit-top rotate: false - xy: 692, 301 + xy: 679, 323 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conduittunnel rotate: false - xy: 699, 311 + xy: 667, 311 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyor rotate: false - xy: 702, 301 + xy: 870, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyormove rotate: false - xy: 945, 465 + xy: 137, 25 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 conveyortunnel rotate: false - xy: 945, 455 + xy: 622, 296 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1007,42 +1014,42 @@ core index: -1 junction rotate: false - xy: 692, 291 + xy: 739, 340 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidjunction rotate: false - xy: 640, 266 + xy: 749, 310 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter rotate: false - xy: 620, 256 + xy: 148, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-bottom rotate: false - xy: 630, 256 + xy: 158, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-liquid rotate: false - xy: 640, 256 + xy: 168, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 liquidrouter-top rotate: false - xy: 909, 423 + xy: 178, 54 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1070,84 +1077,84 @@ liquidtank-top index: -1 multiplexer rotate: false - xy: 781, 427 + xy: 799, 427 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 poweredconveyor rotate: false - xy: 700, 371 + xy: 133, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 poweredconveyormove rotate: false - xy: 710, 371 + xy: 305, 107 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 powernode rotate: false - xy: 925, 435 + xy: 870, 373 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulseconduit-bottom rotate: false - xy: 929, 425 + xy: 875, 411 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 pulseconduit-top rotate: false - xy: 945, 435 + xy: 880, 401 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 router rotate: false - xy: 959, 425 + xy: 642, 286 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sortedunloader rotate: false - xy: 189, 24 + xy: 702, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 sorter rotate: false - xy: 199, 24 + xy: 702, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 splitter rotate: false - xy: 209, 24 + xy: 712, 304 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelconveyor rotate: false - xy: 219, 24 + xy: 722, 304 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelconveyormove rotate: false - xy: 224, 34 + xy: 712, 294 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1161,7 +1168,7 @@ teleporter-top index: -1 unloader rotate: false - xy: 778, 401 + xy: 779, 307 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1175,21 +1182,21 @@ vault index: -1 vault-icon rotate: false - xy: 798, 401 + xy: 799, 307 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weaponfactory rotate: false - xy: 680, 407 + xy: 680, 389 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 block-1 rotate: false - xy: 683, 341 + xy: 579, 234 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1231,7 +1238,7 @@ chainturret index: -1 doubleturret rotate: false - xy: 965, 445 + xy: 689, 343 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1266,56 +1273,56 @@ gatlingturret index: -1 laserturret rotate: false - xy: 257, 111 + xy: 113, 23 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 magmaturret rotate: false - xy: 561, 225 + xy: 564, 207 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 megarepairturret rotate: false - xy: 564, 207 + xy: 763, 427 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 missileturret rotate: false - xy: 763, 427 + xy: 781, 427 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 railgunturret rotate: false - xy: 269, 111 + xy: 121, 1 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 repairturret rotate: false - xy: 281, 111 + xy: 125, 23 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 shotgunturret rotate: false - xy: 305, 115 + xy: 871, 431 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 teslaturret rotate: false - xy: 579, 232 + xy: 233, 111 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1329,14 +1336,14 @@ titancannon index: -1 compositewall rotate: false - xy: 682, 301 + xy: 679, 343 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 door rotate: false - xy: 965, 455 + xy: 459, 160 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1357,14 +1364,14 @@ door-large-open index: -1 door-open rotate: false - xy: 975, 465 + xy: 689, 353 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 duriumwall rotate: false - xy: 975, 455 + xy: 689, 333 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1378,49 +1385,49 @@ duriumwall-large index: -1 ironwall rotate: false - xy: 188, 54 + xy: 662, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelwall rotate: false - xy: 226, 44 + xy: 722, 294 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelwall-large rotate: false - xy: 835, 427 + xy: 853, 427 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 stonewall rotate: false - xy: 189, 14 + xy: 759, 317 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumshieldwall rotate: false - xy: 738, 402 + xy: 789, 317 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumwall rotate: false - xy: 748, 406 + xy: 799, 327 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titaniumwall-large rotate: false - xy: 853, 427 + xy: 651, 343 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -1434,7 +1441,7 @@ blank index: -1 bullet rotate: false - xy: 681, 321 + xy: 637, 306 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1476,161 +1483,126 @@ laserfull index: -1 shell rotate: false - xy: 156, 44 + xy: 620, 256 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot rotate: false - xy: 196, 44 + xy: 764, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot-long rotate: false - xy: 206, 44 + xy: 774, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanshell rotate: false - xy: 748, 396 + xy: 799, 317 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -scout - rotate: false - xy: 335, 121 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 -scout-base - rotate: false - xy: 349, 121 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 -standard-mech-base - rotate: false - xy: 349, 121 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 -scout-leg - rotate: false - xy: 363, 121 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 -standard-mech-leg - rotate: false - xy: 363, 121 - size: 12, 12 - orig: 12, 12 - offset: 0, 0 - index: -1 item-biomatter rotate: false - xy: 198, 54 + xy: 709, 344 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-coal rotate: false - xy: 208, 54 + xy: 709, 334 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-densealloy rotate: false - xy: 218, 54 + xy: 719, 344 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-iron rotate: false - xy: 305, 105 + xy: 709, 324 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-lead rotate: false - xy: 419, 115 + xy: 719, 334 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-plastic rotate: false - xy: 622, 286 + xy: 729, 344 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-quartz rotate: false - xy: 632, 286 + xy: 719, 324 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-silicon rotate: false - xy: 642, 286 + xy: 729, 334 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-steel rotate: false - xy: 652, 289 + xy: 729, 324 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-stone rotate: false - xy: 662, 289 + xy: 709, 314 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-thorium rotate: false - xy: 672, 289 + xy: 719, 314 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 item-titanium rotate: false - xy: 682, 291 + xy: 729, 314 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 standard-mech rotate: false - xy: 391, 121 + xy: 760, 367 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 standard-ship rotate: false - xy: 405, 121 + xy: 774, 367 size: 12, 12 orig: 12, 12 offset: 0, 0 @@ -1778,7 +1750,7 @@ clear index: -1 cursor rotate: false - xy: 883, 427 + xy: 674, 373 size: 4, 4 orig: 4, 4 offset: 0, 0 @@ -1827,7 +1799,7 @@ icon-admin index: -1 icon-admin-small rotate: false - xy: 321, 135 + xy: 867, 445 size: 6, 6 orig: 6, 6 offset: 0, 0 @@ -1841,7 +1813,7 @@ icon-areaDelete index: -1 icon-arrow rotate: false - xy: 680, 391 + xy: 698, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -1855,14 +1827,14 @@ icon-arrow-down index: -1 icon-arrow-left rotate: false - xy: 871, 427 + xy: 816, 369 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-arrow-right rotate: false - xy: 913, 435 + xy: 828, 369 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -1876,21 +1848,21 @@ icon-arrow-up index: -1 icon-back rotate: false - xy: 401, 151 + xy: 656, 361 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-ban rotate: false - xy: 698, 411 + xy: 698, 395 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-cancel rotate: false - xy: 680, 375 + xy: 572, 274 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -1904,7 +1876,7 @@ icon-chat index: -1 icon-check rotate: false - xy: 572, 274 + xy: 572, 258 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -1953,14 +1925,14 @@ icon-defense index: -1 icon-dev-builds rotate: false - xy: 572, 258 + xy: 588, 276 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-discord rotate: false - xy: 588, 276 + xy: 588, 260 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -1974,98 +1946,98 @@ icon-distribution index: -1 icon-donate rotate: false - xy: 588, 260 + xy: 604, 276 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-dots rotate: false - xy: 604, 276 + xy: 604, 260 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-editor rotate: false - xy: 604, 260 + xy: 763, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-exit rotate: false - xy: 763, 411 + xy: 779, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-file-text rotate: false - xy: 779, 411 + xy: 795, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-fill rotate: false - xy: 656, 361 + xy: 118, 47 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-floppy rotate: false - xy: 795, 411 + xy: 811, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-folder rotate: false - xy: 811, 411 + xy: 827, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-folder-parent rotate: false - xy: 827, 411 + xy: 843, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-github rotate: false - xy: 843, 411 + xy: 859, 411 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-google-play rotate: false - xy: 859, 411 + xy: 680, 373 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-grid rotate: false - xy: 118, 47 + xy: 476, 178 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-hold rotate: false - xy: 933, 457 + xy: 329, 139 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-holdDelete rotate: false - xy: 933, 445 + xy: 341, 139 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2086,7 +2058,7 @@ icon-host index: -1 icon-info rotate: false - xy: 875, 415 + xy: 353, 139 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2100,7 +2072,7 @@ icon-itch.io index: -1 icon-line rotate: false - xy: 476, 178 + xy: 492, 207 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -2114,7 +2086,7 @@ icon-link index: -1 icon-liquid rotate: false - xy: 688, 363 + xy: 365, 139 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2128,63 +2100,63 @@ icon-load index: -1 icon-load-image rotate: false - xy: 492, 207 + xy: 510, 207 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-load-map rotate: false - xy: 510, 207 + xy: 528, 207 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-loading rotate: false - xy: 528, 207 + xy: 546, 207 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-logic rotate: false - xy: 669, 321 + xy: 377, 139 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-menu rotate: false - xy: 667, 309 + xy: 389, 139 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-menu-large rotate: false - xy: 546, 207 + xy: 867, 453 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-none rotate: false - xy: 136, 53 + xy: 401, 139 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-pause rotate: false - xy: 154, 64 + xy: 476, 166 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-pencil rotate: false - xy: 867, 453 + xy: 134, 92 size: 16, 16 orig: 16, 16 offset: 0, 0 @@ -2198,14 +2170,14 @@ icon-pencil-small index: -1 icon-pick rotate: false - xy: 134, 92 + xy: 134, 74 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-play rotate: false - xy: 166, 64 + xy: 118, 35 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -2219,210 +2191,210 @@ icon-play-2 index: -1 icon-players rotate: false - xy: 178, 64 + xy: 136, 53 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-power rotate: false - xy: 190, 64 + xy: 154, 64 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-production rotate: false - xy: 202, 64 + xy: 166, 64 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-quit rotate: false - xy: 329, 135 + xy: 714, 406 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-redo rotate: false - xy: 134, 74 + xy: 152, 94 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-refresh rotate: false - xy: 345, 135 + xy: 730, 406 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rename rotate: false - xy: 361, 135 + xy: 714, 390 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-resize rotate: false - xy: 152, 94 + xy: 152, 76 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-rotate rotate: false - xy: 377, 135 + xy: 730, 390 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rotate-arrow rotate: false - xy: 393, 135 + xy: 746, 400 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rotate-left rotate: false - xy: 409, 135 + xy: 698, 379 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-rotate-right rotate: false - xy: 476, 162 + xy: 714, 374 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-save rotate: false - xy: 885, 463 + xy: 730, 374 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-save-image rotate: false - xy: 152, 76 + xy: 170, 94 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-save-map rotate: false - xy: 170, 94 + xy: 170, 76 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-settings rotate: false - xy: 214, 64 + xy: 178, 64 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-terrain rotate: false - xy: 170, 76 + xy: 188, 94 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-tools rotate: false - xy: 901, 463 + xy: 746, 384 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-touch rotate: false - xy: 574, 195 + xy: 190, 64 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-touchDelete rotate: false - xy: 127, 19 + xy: 202, 64 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-trash rotate: false - xy: 917, 463 + xy: 762, 395 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-trash-16 rotate: false - xy: 188, 94 + xy: 188, 76 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-trello rotate: false - xy: 885, 447 + xy: 778, 395 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-tutorial rotate: false - xy: 901, 447 + xy: 794, 395 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-undo rotate: false - xy: 188, 76 + xy: 206, 94 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-units rotate: false - xy: 233, 111 + xy: 214, 64 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-weapon rotate: false - xy: 245, 111 + xy: 574, 195 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 icon-wiki rotate: false - xy: 917, 447 + xy: 810, 395 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-zoom rotate: false - xy: 206, 94 + xy: 206, 76 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 icon-zoom-small rotate: false - xy: 118, 31 + xy: 826, 395 size: 14, 14 orig: 14, 14 offset: 0, 0 @@ -2572,7 +2544,7 @@ textfield-over index: -1 white rotate: false - xy: 113, 34 + xy: 709, 354 size: 3, 3 orig: 3, 3 offset: 0, 0 @@ -2593,86 +2565,128 @@ window-empty orig: 27, 61 offset: 0, 0 index: -1 +flier + rotate: false + xy: 856, 397 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +scout + rotate: false + xy: 746, 370 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +scout-base + rotate: false + xy: 832, 381 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +standard-mech-base + rotate: false + xy: 832, 381 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +scout-leg + rotate: false + xy: 846, 383 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 +standard-mech-leg + rotate: false + xy: 846, 383 + size: 12, 12 + orig: 12, 12 + offset: 0, 0 + index: -1 beam rotate: false - xy: 223, 113 + xy: 123, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 beam-equip rotate: false - xy: 627, 306 + xy: 875, 443 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blaster rotate: false - xy: 459, 160 + xy: 674, 363 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blaster-equip rotate: false - xy: 683, 351 + xy: 684, 363 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 clustergun rotate: false - xy: 679, 311 + xy: 840, 371 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 clustergun-equip rotate: false - xy: 622, 296 + xy: 850, 373 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shockgun rotate: false - xy: 176, 44 + xy: 640, 256 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shockgun-equip rotate: false - xy: 186, 44 + xy: 754, 357 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster rotate: false - xy: 758, 401 + xy: 759, 307 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 triblaster-equip rotate: false - xy: 768, 401 + xy: 769, 307 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan rotate: false - xy: 808, 401 + xy: 809, 347 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 vulcan-equip rotate: false - xy: 818, 401 + xy: 809, 337 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 5e4df7279e..b011f8fa78 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/assets/version.properties b/core/assets/version.properties index cc4c588535..b1812d3652 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Sun Mar 25 13:11:36 EDT 2018 +#Sun Mar 25 15:04:04 EDT 2018 version=release -androidBuildCode=641 +androidBuildCode=650 name=Mindustry code=3.4 build=custom build diff --git a/core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java index 3ad47e6071..2b2526bba5 100644 --- a/core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/DebugBlocks.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.types.PowerBlock; -import io.anuke.mindustry.world.blocks.types.generation.PowerDistributor; +import io.anuke.mindustry.world.blocks.types.power.PowerDistributor; public class DebugBlocks { public static final Block diff --git a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java index ccef03df3b..aa0a84afa4 100644 --- a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java @@ -7,18 +7,18 @@ import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.types.defense.RepairTurret; import io.anuke.mindustry.world.blocks.types.defense.ShieldBlock; import io.anuke.mindustry.world.blocks.types.distribution.Teleporter; -import io.anuke.mindustry.world.blocks.types.generation.*; +import io.anuke.mindustry.world.blocks.types.power.ItemPowerGenerator; public class PowerBlocks { public static final Block - coalgenerator = new ItemPowerGenerator("coalgenerator") {{ + coalgenerator = new io.anuke.mindustry.world.blocks.types.power.ItemPowerGenerator("coalgenerator") {{ generateItem = Items.coal; powerOutput = 0.04f; powerCapacity = 40f; }}, - thermalgenerator = new LiquidPowerGenerator("thermalgenerator") {{ + thermalgenerator = new io.anuke.mindustry.world.blocks.types.power.LiquidPowerGenerator("thermalgenerator") {{ generateLiquid = Liquids.lava; maxLiquidGenerate = 0.5f; powerPerLiquid = 0.08f; @@ -26,7 +26,7 @@ public class PowerBlocks { generateEffect = Fx.redgeneratespark; }}, - combustiongenerator = new LiquidPowerGenerator("combustiongenerator") {{ + combustiongenerator = new io.anuke.mindustry.world.blocks.types.power.LiquidPowerGenerator("combustiongenerator") {{ generateLiquid = Liquids.oil; maxLiquidGenerate = 0.4f; powerPerLiquid = 0.12f; @@ -40,16 +40,16 @@ public class PowerBlocks { itemDuration = 240f; }}, - solarpanel = new SolarGenerator("solarpanel") {{ + solarpanel = new io.anuke.mindustry.world.blocks.types.power.SolarGenerator("solarpanel") {{ generation = 0.003f; }}, - largesolarpanel = new SolarGenerator("largesolarpanel") {{ + largesolarpanel = new io.anuke.mindustry.world.blocks.types.power.SolarGenerator("largesolarpanel") {{ size = 3; generation = 0.012f; }}, - nuclearReactor = new NuclearReactor("nuclearreactor") {{ + nuclearReactor = new io.anuke.mindustry.world.blocks.types.power.NuclearReactor("nuclearreactor") {{ size = 3; health = 600; breaktime *= 2.3f; @@ -74,16 +74,16 @@ public class PowerBlocks { health = 400; }}, - battery = new PowerGenerator("battery") {{ + battery = new io.anuke.mindustry.world.blocks.types.power.PowerGenerator("battery") {{ powerCapacity = 320f; }}, - batteryLarge = new PowerGenerator("batterylarge") {{ + batteryLarge = new io.anuke.mindustry.world.blocks.types.power.PowerGenerator("batterylarge") {{ size = 3; powerCapacity = 2000f; }}, - powernode = new PowerDistributor("powernode"), + powernode = new io.anuke.mindustry.world.blocks.types.power.PowerDistributor("powernode"), teleporter = new Teleporter("teleporter"); } diff --git a/core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java b/core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java index 6355cca507..1aec4ebd4f 100644 --- a/core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/UnitBlocks.java @@ -1,6 +1,8 @@ package io.anuke.mindustry.content.blocks; +import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.UnitTypes; +import io.anuke.mindustry.resource.ItemStack; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.types.production.UnitFactory; @@ -9,5 +11,10 @@ public class UnitBlocks { flierFactory = new UnitFactory("flierfactory"){{ type = UnitTypes.flier; + produceTime = 400; + size = 2; + requirements = new ItemStack[]{ + new ItemStack(Items.stone, 5) + }; }}; } diff --git a/core/src/io/anuke/mindustry/entities/Units.java b/core/src/io/anuke/mindustry/entities/Units.java index e0a11dc96a..e056f503e9 100644 --- a/core/src/io/anuke/mindustry/entities/Units.java +++ b/core/src/io/anuke/mindustry/entities/Units.java @@ -38,6 +38,8 @@ public class Units { Unit[] result = {null}; float[] cdist = {0}; + rect.setSize(range*2f).setCenter(x, y); + getNearbyEnemies(team, rect, e -> { if (!predicate.test(e)) return; diff --git a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java index 6e7083676d..2aedc0e96e 100644 --- a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java @@ -12,6 +12,7 @@ import io.anuke.ucore.util.Timer; import java.nio.ByteBuffer; +import static io.anuke.mindustry.Vars.state; import static io.anuke.mindustry.Vars.unitGroups; public class BaseUnit extends Unit { @@ -71,7 +72,7 @@ public class BaseUnit extends Unit { @Override public boolean collides(SolidEntity other){ - return (other instanceof Bullet) && !(((Bullet) other).owner instanceof BaseUnit); + return other instanceof Bullet && state.teams.areEnemies((((Bullet) other).team), team); } @Override diff --git a/core/src/io/anuke/mindustry/entities/units/FlyingUnitType.java b/core/src/io/anuke/mindustry/entities/units/FlyingUnitType.java index 14df599f46..41939fd75e 100644 --- a/core/src/io/anuke/mindustry/entities/units/FlyingUnitType.java +++ b/core/src/io/anuke/mindustry/entities/units/FlyingUnitType.java @@ -2,27 +2,47 @@ package io.anuke.mindustry.entities.units; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.utils.ObjectSet; +import io.anuke.mindustry.entities.BulletType; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.game.TeamInfo.TeamData; +import io.anuke.mindustry.graphics.Fx; import io.anuke.mindustry.world.Tile; +import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Timers; import io.anuke.ucore.graphics.Draw; +import io.anuke.ucore.util.Angles; import static io.anuke.mindustry.Vars.state; public class FlyingUnitType extends UnitType { private static Vector2 vec = new Vector2(); + protected float boosterLength = 4.5f; + public FlyingUnitType(String name) { super(name); - speed = 1f; + speed = 0.2f; + maxVelocity = 4f; + drag = 0.01f; + } + + @Override + public void update(BaseUnit unit) { + super.update(unit); + + unit.rotation = unit.velocity.angle(); + + if(unit.velocity.len() > 0.2f && unit.timer.get(timerBoost, 2f)){ + Effects.effect(Fx.dashsmoke, unit.x + Angles.trnsx(unit.rotation + 180f, boosterLength), + unit.y + Angles.trnsy(unit.rotation + 180f, boosterLength)); + } } @Override public void draw(BaseUnit unit) { Draw.alpha(unit.hitTime / Unit.hitDuration); - Draw.rect(name, unit.x, unit.y, unit.rotation); + Draw.rect(name, unit.x, unit.y, unit.rotation - 90); Draw.alpha(1f); } @@ -30,10 +50,22 @@ public class FlyingUnitType extends UnitType { @Override public void behavior(BaseUnit unit) { vec.set(unit.target.x - unit.x, unit.target.y - unit.y); - vec.setLength(speed); - unit.velocity.lerp(vec, 0.1f * Timers.delta()); //TODO clamp it so it doesn't glitch out at low fps + float ang = vec.angle(); + float circleLength = 40f; + + if(vec.len() < circleLength){ + vec.rotate((circleLength-vec.len())/circleLength * 180f); + } + + vec.setLength(speed * Timers.delta()); + + unit.velocity.add(vec); //TODO clamp it so it doesn't glitch out at low fps + + if(unit.timer.get(timerReload, reload)){ + shoot(unit, BulletType.shot, ang, 4f); + } } @Override diff --git a/core/src/io/anuke/mindustry/entities/units/UnitType.java b/core/src/io/anuke/mindustry/entities/units/UnitType.java index 863fd1df0a..eaf083a75a 100644 --- a/core/src/io/anuke/mindustry/entities/units/UnitType.java +++ b/core/src/io/anuke/mindustry/entities/units/UnitType.java @@ -1,6 +1,7 @@ package io.anuke.mindustry.entities.units; import com.badlogic.gdx.utils.Array; +import io.anuke.mindustry.entities.Bullet; import io.anuke.mindustry.entities.BulletType; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.Units; @@ -9,6 +10,7 @@ import io.anuke.mindustry.net.Net; import io.anuke.mindustry.net.NetEvents; import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Timers; +import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Mathf; import static io.anuke.mindustry.Vars.tilesize; @@ -21,6 +23,8 @@ public abstract class UnitType { private static int timerIndex = 0; protected static final int timerTarget = timerIndex++; + protected static final int timerBoost = timerIndex++; + protected static final int timerReload = timerIndex++; public final String name; public final byte id; @@ -35,6 +39,8 @@ public abstract class UnitType { protected float mass = 1f; protected boolean isFlying; protected float drag = 0.1f; + protected float maxVelocity = 5f; + protected float reload = 40f; public UnitType(String name){ this.id = lastid++; @@ -64,6 +70,7 @@ public abstract class UnitType { //TODO logic + unit.velocity.limit(maxVelocity); unit.x += unit.velocity.x / mass; unit.y += unit.velocity.y / mass; @@ -88,8 +95,10 @@ public abstract class UnitType { } } - public void onShoot(BaseUnit unit, BulletType type, float rotation){ - //TODO remove? + public void shoot(BaseUnit unit, BulletType type, float rotation, float translation){ + new Bullet(type, unit, + unit.x + Angles.trnsx(rotation, translation), + unit.y + Angles.trnsy(rotation, translation), rotation).add(); } public void onDeath(BaseUnit unit){ diff --git a/core/src/io/anuke/mindustry/game/Difficulty.java b/core/src/io/anuke/mindustry/game/Difficulty.java index 451a1bb228..c3d7952174 100644 --- a/core/src/io/anuke/mindustry/game/Difficulty.java +++ b/core/src/io/anuke/mindustry/game/Difficulty.java @@ -9,7 +9,7 @@ import io.anuke.mindustry.world.blocks.types.defense.Turret; import io.anuke.mindustry.world.blocks.types.distribution.Conveyor; import io.anuke.mindustry.world.blocks.types.distribution.Router; import io.anuke.mindustry.world.blocks.types.production.Drill; -import io.anuke.mindustry.world.blocks.types.generation.PowerDistributor; +import io.anuke.mindustry.world.blocks.types.power.PowerDistributor; import io.anuke.mindustry.world.blocks.types.production.Smelter; import io.anuke.ucore.util.Bundles; diff --git a/core/src/io/anuke/mindustry/io/MapIO.java b/core/src/io/anuke/mindustry/io/MapIO.java index b73ab8eae5..9bbc801e7b 100644 --- a/core/src/io/anuke/mindustry/io/MapIO.java +++ b/core/src/io/anuke/mindustry/io/MapIO.java @@ -30,8 +30,8 @@ public class MapIO { Pixmap pixmap = new Pixmap(data.width(), data.height(), Format.RGBA8888); data.position(0, 0); - for(int x = 0; x < data.width(); x ++){ - for(int y = 0; y < data.height(); y ++){ + for(int y = 0; y < data.height(); y ++){ + for(int x = 0; x < data.width(); x ++){ TileDataMarker marker = data.read(); Block floor = Block.getByID(marker.floor); Block wall = Block.getByID(marker.wall); diff --git a/core/src/io/anuke/mindustry/io/versions/Save16.java b/core/src/io/anuke/mindustry/io/versions/Save16.java index b9d0b9e115..972e62aac7 100644 --- a/core/src/io/anuke/mindustry/io/versions/Save16.java +++ b/core/src/io/anuke/mindustry/io/versions/Save16.java @@ -3,6 +3,8 @@ package io.anuke.mindustry.io.versions; import com.badlogic.gdx.utils.IntMap; import com.badlogic.gdx.utils.TimeUtils; import io.anuke.mindustry.content.Weapons; +import io.anuke.mindustry.content.blocks.Blocks; +import io.anuke.mindustry.content.blocks.StorageBlocks; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.entities.units.UnitType; import io.anuke.mindustry.game.Difficulty; @@ -13,9 +15,9 @@ import io.anuke.mindustry.resource.Item; import io.anuke.mindustry.resource.Upgrade; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.content.blocks.Blocks; import io.anuke.mindustry.world.blocks.types.BlockPart; import io.anuke.ucore.core.Core; +import io.anuke.ucore.entities.Entities; import io.anuke.ucore.entities.EntityGroup; import io.anuke.ucore.util.Bits; @@ -140,6 +142,8 @@ public class Save16 extends SaveFileVersion { short width = stream.readShort(); short height = stream.readShort(); + Entities.resizeTree(0, 0, width * tilesize, height * tilesize); + Tile[][] tiles = world.createTiles(width, height); for(int x = 0; x < width; x ++){ @@ -161,6 +165,8 @@ public class Save16 extends SaveFileVersion { byte team = Bits.getLeftByte(tr); byte rotation = Bits.getRightByte(tr); + Team t = Team.values()[team]; + tile.setTeam(Team.values()[team]); tile.entity.health = health; tile.setRotation(rotation); @@ -170,6 +176,11 @@ public class Save16 extends SaveFileVersion { if (tile.entity.liquid != null) tile.entity.liquid.read(stream); tile.entity.read(stream); + + if(tile.block() == StorageBlocks.core && + state.teams.has(t)){ + state.teams.get(t).cores.add(tile); + } } tiles[x][y] = tile; diff --git a/core/src/io/anuke/mindustry/world/BarType.java b/core/src/io/anuke/mindustry/world/BarType.java index 3fd9923be0..b605412270 100644 --- a/core/src/io/anuke/mindustry/world/BarType.java +++ b/core/src/io/anuke/mindustry/world/BarType.java @@ -7,7 +7,8 @@ public enum BarType { inventory(Color.GREEN), power(Color.YELLOW), liquid(Color.ROYAL), - heat(Color.CORAL); + heat(Color.CORAL), + production(Color.PURPLE); public final Color color; diff --git a/core/src/io/anuke/mindustry/world/WorldGenerator.java b/core/src/io/anuke/mindustry/world/WorldGenerator.java index 980648b6b7..83ac3b383c 100644 --- a/core/src/io/anuke/mindustry/world/WorldGenerator.java +++ b/core/src/io/anuke/mindustry/world/WorldGenerator.java @@ -8,7 +8,6 @@ import io.anuke.mindustry.game.Team; import io.anuke.mindustry.io.MapTileData; import io.anuke.mindustry.io.MapTileData.TileDataMarker; import io.anuke.ucore.noise.Noise; -import io.anuke.ucore.util.Log; import static io.anuke.mindustry.Vars.state; import static io.anuke.mindustry.Vars.world; @@ -27,9 +26,9 @@ public class WorldGenerator { Noise.setSeed(world.getSeed()); IntArray multiblocks = new IntArray(); - - for(int x = 0; x < data.width(); x ++){ - for(int y = 0; y < data.height(); y ++){ + + for(int y = 0; y < data.height(); y ++){ + for(int x = 0; x < data.width(); x ++){ TileDataMarker tile = data.read(); tiles[x][y] = new Tile(x, y, tile.floor, tile.wall, tile.rotation, tile.team); diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java index c7b897ff9e..a4349fc4e7 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java @@ -133,7 +133,7 @@ public class Turret extends Block{ if(entity.timer.get(timerTarget, targetInterval)){ entity.target = Units.getClosestEnemy(tile.getTeam(), - tile.worldx(), tile.worldy(), range, e -> !e.isDead()); + tile.drawx(), tile.drawy(), range, e -> !e.isDead()); } if(entity.target != null){ diff --git a/core/src/io/anuke/mindustry/world/blocks/types/generation/ItemPowerGenerator.java b/core/src/io/anuke/mindustry/world/blocks/types/power/ItemPowerGenerator.java similarity index 94% rename from core/src/io/anuke/mindustry/world/blocks/types/generation/ItemPowerGenerator.java rename to core/src/io/anuke/mindustry/world/blocks/types/power/ItemPowerGenerator.java index 4063f593d1..cc50207db4 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/generation/ItemPowerGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/power/ItemPowerGenerator.java @@ -1,4 +1,4 @@ -package io.anuke.mindustry.world.blocks.types.generation; +package io.anuke.mindustry.world.blocks.types.power; import com.badlogic.gdx.graphics.Color; import io.anuke.mindustry.graphics.Fx; @@ -6,7 +6,6 @@ import io.anuke.mindustry.resource.Item; import io.anuke.mindustry.world.BarType; import io.anuke.mindustry.world.BlockBar; import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.blocks.types.generation.PowerGenerator.GeneratorEntity; import io.anuke.ucore.core.Effects; import io.anuke.ucore.core.Effects.Effect; import io.anuke.ucore.core.Timers; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/generation/LiquidPowerGenerator.java b/core/src/io/anuke/mindustry/world/blocks/types/power/LiquidPowerGenerator.java similarity index 93% rename from core/src/io/anuke/mindustry/world/blocks/types/generation/LiquidPowerGenerator.java rename to core/src/io/anuke/mindustry/world/blocks/types/power/LiquidPowerGenerator.java index 2fbe596047..687d54d171 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/generation/LiquidPowerGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/power/LiquidPowerGenerator.java @@ -1,4 +1,4 @@ -package io.anuke.mindustry.world.blocks.types.generation; +package io.anuke.mindustry.world.blocks.types.power; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.graphics.Fx; @@ -11,7 +11,7 @@ import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Strings; -public class LiquidPowerGenerator extends PowerGenerator { +public class LiquidPowerGenerator extends io.anuke.mindustry.world.blocks.types.power.PowerGenerator { public Liquid generateLiquid; public float powerPerLiquid = 0.13f; /**Maximum liquid used per frame.*/ diff --git a/core/src/io/anuke/mindustry/world/blocks/types/generation/NuclearReactor.java b/core/src/io/anuke/mindustry/world/blocks/types/power/NuclearReactor.java similarity index 97% rename from core/src/io/anuke/mindustry/world/blocks/types/generation/NuclearReactor.java rename to core/src/io/anuke/mindustry/world/blocks/types/power/NuclearReactor.java index cdfc9c19d0..417fa05551 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/generation/NuclearReactor.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/power/NuclearReactor.java @@ -1,4 +1,4 @@ -package io.anuke.mindustry.world.blocks.types.generation; +package io.anuke.mindustry.world.blocks.types.power; import com.badlogic.gdx.graphics.Color; import io.anuke.mindustry.content.Liquids; @@ -24,7 +24,7 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.tilesize; -public class NuclearReactor extends LiquidPowerGenerator{ +public class NuclearReactor extends io.anuke.mindustry.world.blocks.types.power.LiquidPowerGenerator { protected final int timerFuel = timers++; protected final Translator tr = new Translator(); diff --git a/core/src/io/anuke/mindustry/world/blocks/types/generation/PowerDistributor.java b/core/src/io/anuke/mindustry/world/blocks/types/power/PowerDistributor.java similarity index 98% rename from core/src/io/anuke/mindustry/world/blocks/types/generation/PowerDistributor.java rename to core/src/io/anuke/mindustry/world/blocks/types/power/PowerDistributor.java index 9d87790b43..401c41200d 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/generation/PowerDistributor.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/power/PowerDistributor.java @@ -1,4 +1,4 @@ -package io.anuke.mindustry.world.blocks.types.generation; +package io.anuke.mindustry.world.blocks.types.power; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.math.Vector2; @@ -258,7 +258,8 @@ public class PowerDistributor extends PowerBlock{ return Vector2.dst(tile.worldx(), tile.worldy(), link.worldx(), link.worldy()) <= Math.max(laserRange * tilesize, ((PowerDistributor)link.block()).laserRange * tilesize) - tilesize/2f; }else{ - return Vector2.dst(tile.worldx(), tile.worldy(), link.worldx(), link.worldy()) <= laserRange * tilesize - tilesize/2f; + return Vector2.dst(tile.worldx(), tile.worldy(), link.worldx(), link.worldy()) + <= laserRange * tilesize - tilesize/2f + (link.block().size-1)*tilesize; } } diff --git a/core/src/io/anuke/mindustry/world/blocks/types/generation/PowerGenerator.java b/core/src/io/anuke/mindustry/world/blocks/types/power/PowerGenerator.java similarity index 97% rename from core/src/io/anuke/mindustry/world/blocks/types/generation/PowerGenerator.java rename to core/src/io/anuke/mindustry/world/blocks/types/power/PowerGenerator.java index ddc7788362..d29f99dd55 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/generation/PowerGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/power/PowerGenerator.java @@ -1,4 +1,4 @@ -package io.anuke.mindustry.world.blocks.types.generation; +package io.anuke.mindustry.world.blocks.types.power; import com.badlogic.gdx.math.GridPoint2; import io.anuke.mindustry.entities.TileEntity; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/generation/SolarGenerator.java b/core/src/io/anuke/mindustry/world/blocks/types/power/SolarGenerator.java similarity index 72% rename from core/src/io/anuke/mindustry/world/blocks/types/generation/SolarGenerator.java rename to core/src/io/anuke/mindustry/world/blocks/types/power/SolarGenerator.java index 028f6ff075..59acb61ba8 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/generation/SolarGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/power/SolarGenerator.java @@ -1,9 +1,9 @@ -package io.anuke.mindustry.world.blocks.types.generation; +package io.anuke.mindustry.world.blocks.types.power; import io.anuke.mindustry.world.Tile; import io.anuke.ucore.core.Timers; -public class SolarGenerator extends PowerGenerator { +public class SolarGenerator extends io.anuke.mindustry.world.blocks.types.power.PowerGenerator { /**power generated per frame*/ protected float generation = 0.005f; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/UnitFactory.java b/core/src/io/anuke/mindustry/world/blocks/types/production/UnitFactory.java index 825b3d1184..5daba0fe80 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/UnitFactory.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/UnitFactory.java @@ -1,13 +1,22 @@ package io.anuke.mindustry.world.blocks.types.production; +import com.badlogic.gdx.graphics.g2d.TextureRegion; +import io.anuke.mindustry.Vars; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.entities.units.UnitType; +import io.anuke.mindustry.resource.Item; import io.anuke.mindustry.resource.ItemStack; +import io.anuke.mindustry.world.BarType; import io.anuke.mindustry.world.Block; +import io.anuke.mindustry.world.BlockBar; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.types.modules.InventoryModule; import io.anuke.ucore.core.Timers; +import io.anuke.ucore.graphics.Draw; +import io.anuke.ucore.graphics.Lines; +import io.anuke.ucore.util.Mathf; +import io.anuke.ucore.util.Tmp; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -18,6 +27,7 @@ public class UnitFactory extends Block { protected ItemStack[] requirements; protected float produceTime = 1000f; protected float powerUse = 0.1f; + protected String unitRegion; public UnitFactory(String name) { super(name); @@ -26,6 +36,43 @@ public class UnitFactory extends Block { hasPower = true; } + @Override + public void setBars() { + super.setBars(); + + bars.add(new BlockBar(BarType.production, true, tile -> tile.entity().buildTime / produceTime)); + bars.remove(BarType.inventory); + } + + @Override + public void draw(Tile tile) { + UnitFactoryEntity entity = tile.entity(); + TextureRegion region = Draw.region(unitRegion == null ? type.name : unitRegion); + + int w = (int)(entity.buildTime/produceTime * region.getRegionWidth()); + + Draw.rect(name(), tile.drawx(), tile.drawy()); + + Draw.alpha(0.2f); + //Draw.rect(region, tile.drawx(), tile.drawy()); + Draw.color(); + + Tmp.tr1.setRegion(region, region.getRegionWidth() - w, 0, w, region.getRegionHeight()); + Draw.rect(Tmp.tr1, tile.drawx(), tile.drawy()); + + Draw.color("accent"); + + Lines.lineAngleCenter( + tile.drawx() + Mathf.sin(Timers.time(), 5f, Vars.tilesize/2f*size - 2f), + tile.drawy(), + 90, + size * Vars.tilesize - 4f); + + Draw.reset(); + + Draw.rect(name + "-top", tile.drawx(), tile.drawy()); + } + @Override public void update(Tile tile) { UnitFactoryEntity entity = tile.entity(); @@ -40,7 +87,8 @@ public class UnitFactory extends Block { if(entity.buildTime >= produceTime){ BaseUnit unit = new BaseUnit(type, tile.getTeam()); - unit.set(tile.drawx(), tile.drawy()); + unit.set(tile.drawx(), tile.drawy()).add(); + unit.velocity.y = 4f; entity.buildTime = 0f; for(ItemStack stack : requirements){ @@ -50,6 +98,16 @@ public class UnitFactory extends Block { } } + @Override + public boolean acceptItem(Item item, Tile tile, Tile source) { + for(ItemStack stack : requirements){ + if(item == stack.item && tile.entity.inventory.getItem(item) <= stack.amount*2){ + return true; + } + } + return false; + } + @Override public TileEntity getEntity() { return new UnitFactoryEntity();