From 9a444da3438075bf4606dcaf885c47cf5f1d1d92 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 23 Jan 2019 23:43:31 -0500 Subject: [PATCH] Unfinished block / Bugfixes --- core/assets-raw/sprites/units/crawler-base.png | Bin 0 -> 93 bytes core/assets-raw/sprites/units/crawler-leg.png | Bin 0 -> 98 bytes core/assets-raw/sprites/units/crawler.png | Bin 0 -> 169 bytes .../src/io/anuke/mindustry/content/Blocks.java | 17 ++++++++++++++++- .../io/anuke/mindustry/content/Bullets.java | 2 +- core/src/io/anuke/mindustry/content/Zones.java | 2 +- core/src/io/anuke/mindustry/core/UI.java | 2 +- core/src/io/anuke/mindustry/core/World.java | 1 + .../maps/generators/MapGenerator.java | 4 ++-- 9 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 core/assets-raw/sprites/units/crawler-base.png create mode 100644 core/assets-raw/sprites/units/crawler-leg.png create mode 100644 core/assets-raw/sprites/units/crawler.png diff --git a/core/assets-raw/sprites/units/crawler-base.png b/core/assets-raw/sprites/units/crawler-base.png new file mode 100644 index 0000000000000000000000000000000000000000..dd62bbf01e654b20332400fad97462a6600088e2 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k6;Bt(kcwN$2@-b{badX@b3A_Z q_^Qjaq^4OJ>l<_ICy023uru5Wc5~*sbL%lsJ%gvKpUXO@geCwlN*lQV literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/units/crawler-leg.png b/core/assets-raw/sprites/units/crawler-leg.png new file mode 100644 index 0000000000000000000000000000000000000000..40d363b816ce78b6df11c92682e02bad14f805fa GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kO-~ockcwN$2@(YYV$;6OPvKR` vcxE#jp>8Et_vI@KQQ3i&Izr=heE8CR;H8FU)`njxgN@xNA1tb_l literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/units/crawler.png b/core/assets-raw/sprites/units/crawler.png new file mode 100644 index 0000000000000000000000000000000000000000..42456d86811f624fd13a2e685b90f9531d254d6f GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a)40#6smkcwN$2@AMqm}ZL|J~dVQ z;h#NCZT}T`9+#JtEI83DVvuvA^npD`{0Y8)_Q}_T4A?d%K2k8{IiYqy<)6Oy-~Qg- zB<2ey8;l*e93;}1d-x|YuRQolrGz(PE(_C%x&z0KNkwhA(0H>!E~;6CfuXl?e#o_l Sv(^FaX7F_Nb6Mw<&;$UMqCPMH literal 0 HcmV?d00001 diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index 961f11127e..4a2ea6e6aa 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -36,7 +36,7 @@ public class Blocks implements ContentList{ grass, shrub, rock, icerock, blackrock, rocks, pine, //crafting - siliconSmelter, plastaniumCompressor, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer, + siliconSmelter, graphitePress, plastaniumCompressor, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer, melter, separator, centrifuge, biomatterCompressor, pulverizer, incinerator, //sandbox @@ -234,6 +234,21 @@ public class Blocks implements ContentList{ consumes.power(0.05f); }}; + graphitePress = new PowerSmelter("graphite-press"){{ + requirements(Category.crafting, ItemStack.with(Items.copper, 200, Items.lead, 50)); + + health = 90; + craftEffect = Fx.smeltsmoke; + result = Items.graphite; + craftTime = 50f; + size = 2; + hasLiquids = false; + flameColor = Color.valueOf("ffef99"); + + consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)); + consumes.power(0.05f); + }}; + plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{ requirements(Category.crafting, ItemStack.with(Items.silicon, 160, Items.lead, 230, Items.graphite, 120, Items.titanium, 160)); hasItems = true; diff --git a/core/src/io/anuke/mindustry/content/Bullets.java b/core/src/io/anuke/mindustry/content/Bullets.java index a63a9aec74..439387c198 100644 --- a/core/src/io/anuke/mindustry/content/Bullets.java +++ b/core/src/io/anuke/mindustry/content/Bullets.java @@ -645,7 +645,7 @@ public class Bullets implements ContentList{ explode = new BombBulletType(2f, 3f, "clear"){{ hitEffect = Fx.pulverize; - lifetime = 20f; + lifetime = 23f; speed = 1f; splashDamageRadius = 60f; splashDamage = 30f; diff --git a/core/src/io/anuke/mindustry/content/Zones.java b/core/src/io/anuke/mindustry/content/Zones.java index 37a83685a5..e301e404f9 100644 --- a/core/src/io/anuke/mindustry/content/Zones.java +++ b/core/src/io/anuke/mindustry/content/Zones.java @@ -58,7 +58,7 @@ public class Zones implements ContentList{ }}; }}; - craters = new Zone("craters", new MapGenerator("craters", 1){{ distortion = 1.44f; }}){{ //TODO implement + craters = new Zone("craters", new MapGenerator("craters", 1){{ distortion = 1.44f; }}){{ alwaysUnlocked = true; deployCost = ItemStack.with(Items.copper, 300); diff --git a/core/src/io/anuke/mindustry/core/UI.java b/core/src/io/anuke/mindustry/core/UI.java index e1db7dcfd8..881ea4b0a1 100644 --- a/core/src/io/anuke/mindustry/core/UI.java +++ b/core/src/io/anuke/mindustry/core/UI.java @@ -238,7 +238,7 @@ public class UI implements ApplicationListener{ Table table = new Table(); table.setFillParent(true); table.actions(Actions.fadeOut(7f, Interpolation.fade), Actions.removeActor()); - table.top().add(info).padTop(40); + table.top().add(info).padTop(10); Core.scene.add(table); } diff --git a/core/src/io/anuke/mindustry/core/World.java b/core/src/io/anuke/mindustry/core/World.java index b3436c8d51..1be624f8c6 100644 --- a/core/src/io/anuke/mindustry/core/World.java +++ b/core/src/io/anuke/mindustry/core/World.java @@ -237,6 +237,7 @@ public class World implements ApplicationListener{ } } state.rules.zone = zone.id; + state.set(State.playing); control.saves.zoneSave(); logic.play(); }); diff --git a/core/src/io/anuke/mindustry/maps/generators/MapGenerator.java b/core/src/io/anuke/mindustry/maps/generators/MapGenerator.java index 4b78e02bd0..fba9d0b628 100644 --- a/core/src/io/anuke/mindustry/maps/generators/MapGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generators/MapGenerator.java @@ -95,8 +95,8 @@ public class MapGenerator extends Generator{ int rad = 10, frad = 12; - for(int x = rad; x <= rad; x++){ - for(int y = rad; y <= rad; y++){ + for(int x = -rad; x <= rad; x++){ + for(int y = -rad; y <= rad; y++){ int wx = x + point.x, wy = y + point.y; double dst = Mathf.dst(x, y); if(dst < frad && Structs.inBounds(wx, wy, tiles) && (dst <= rad || Mathf.chance(0.5))){