New power node type / Bugfixes / Random item caches
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 983 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 1022 B After Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 1023 B After Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 1022 B After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 965 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 134 B After Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 293 B |
BIN
core/assets-raw/sprites/blocks/power/surge-tower.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
@ -58,7 +58,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
//power
|
||||
combustionGenerator, thermalGenerator, turbineGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor,
|
||||
fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge,
|
||||
fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge, surgeTower,
|
||||
|
||||
//production
|
||||
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, plasmaDrill, waterExtractor, oilExtractor, cultivator,
|
||||
@ -741,12 +741,18 @@ public class Blocks implements ContentList{
|
||||
|
||||
powerNodeLarge = new PowerNode("power-node-large"){{
|
||||
requirements(Category.power, ItemStack.with(Items.titanium, 10, Items.lead, 20, Items.silicon, 6));
|
||||
requirements(Category.power, ItemStack.with(Items.copper, 2, Items.lead, 6));
|
||||
size = 2;
|
||||
maxNodes = 6;
|
||||
laserRange = 9.5f;
|
||||
}};
|
||||
|
||||
surgeTower = new PowerNode("surge-tower"){{
|
||||
requirements(Category.power, ItemStack.with(Items.titanium, 15, Items.lead, 20, Items.silicon, 30, Items.surgealloy, 10));
|
||||
size = 2;
|
||||
maxNodes = 2;
|
||||
laserRange = 40f;
|
||||
}};
|
||||
|
||||
battery = new Battery("battery"){{
|
||||
requirements(Category.power, ItemStack.with(Items.copper, 8, Items.lead, 30, Items.silicon, 4));
|
||||
consumes.powerBuffered(3200f, 1f);
|
||||
|
@ -28,6 +28,7 @@ public class LiquidBulletType extends BulletType{
|
||||
statusDuration = 90f;
|
||||
despawnEffect = Fx.none;
|
||||
hitEffect = Fx.hitLiquid;
|
||||
shootEffect = Fx.none;
|
||||
drag = 0.01f;
|
||||
knockback = 0.5f;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import io.anuke.mindustry.content.Fx;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.entities.effect.ItemTransfer;
|
||||
import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.net.ValidateException;
|
||||
@ -184,7 +185,7 @@ public abstract class InputHandler implements InputProcessor{
|
||||
//consume tap event if necessary
|
||||
if(tile.getTeam() == player.getTeam() && tile.block().consumesTap){
|
||||
consumed = true;
|
||||
}else if(tile.getTeam() == player.getTeam() && tile.block().synthetic() && !consumed){
|
||||
}else if((tile.getTeam() == player.getTeam() || tile.getTeam() == Team.none) && tile.block().synthetic() && !consumed){
|
||||
if(tile.block().hasItems && tile.entity.items.total() > 0){
|
||||
frag.inv.showFor(tile);
|
||||
consumed = true;
|
||||
|
@ -6,15 +6,19 @@ import io.anuke.arc.math.geom.Point2;
|
||||
import io.anuke.arc.util.Structs;
|
||||
import io.anuke.arc.util.noise.Simplex;
|
||||
import io.anuke.mindustry.content.Blocks;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.io.MapIO;
|
||||
import io.anuke.mindustry.maps.Map;
|
||||
import io.anuke.mindustry.maps.MapTileData;
|
||||
import io.anuke.mindustry.maps.MapTileData.TileDataMarker;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.OreBlock;
|
||||
import io.anuke.mindustry.world.blocks.StaticWall;
|
||||
import io.anuke.mindustry.world.blocks.storage.CoreBlock;
|
||||
import io.anuke.mindustry.world.blocks.storage.StorageBlock;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
@ -27,8 +31,9 @@ public class MapGenerator extends Generator{
|
||||
/**The amount of final enemy spawns used. -1 to use everything in the map.
|
||||
* This amount of enemy spawns is selected randomly from the map.*/
|
||||
public int enemySpawns = -1;
|
||||
|
||||
/*Whether floor is distorted along with blocks.*/
|
||||
public boolean distortFloor = false;
|
||||
public ItemStack[] storageDrops = ItemStack.with(Items.copper, 300, Items.lead, 300, Items.silicon, 200, Items.graphite, 200, Items.blastCompound, 200);
|
||||
|
||||
public MapGenerator(String mapName){
|
||||
this.mapName = mapName;
|
||||
@ -114,6 +119,14 @@ public class MapGenerator extends Generator{
|
||||
tile.setBlock(decor.wall);
|
||||
}
|
||||
}
|
||||
|
||||
if(tile.getTeam() == Team.none && tile.block() instanceof StorageBlock){
|
||||
for(ItemStack stack : storageDrops){
|
||||
if(Mathf.chance(0.3)){
|
||||
tile.entity.items.add(stack.item, Mathf.random(stack.amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|