1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-22 13:57:46 +03:00

New resources, blocks, core no longer accepts fuel materials

This commit is contained in:
Anuken 2018-02-22 20:12:20 -05:00
parent eae07c15a7
commit 81de9875d3
29 changed files with 497 additions and 417 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

View File

@ -449,6 +449,9 @@ block.oilrefinery.name=oil refinery
block.oilrefinery.fulldescription=Refines large amounts of oil into coal items. Useful for fueling coal-based turrets when coal veins are scarce. block.oilrefinery.fulldescription=Refines large amounts of oil into coal items. Useful for fueling coal-based turrets when coal veins are scarce.
block.stoneformer.name=stone former block.stoneformer.name=stone former
block.stoneformer.fulldescription=Soldifies liquid lava into stone. Useful for producing massive amounts of stone for coal purifiers. block.stoneformer.fulldescription=Soldifies liquid lava into stone. Useful for producing massive amounts of stone for coal purifiers.
block.siliconextractor.name=silicon extractor
block.pulverizer.name=pulverizer
block.quartzextractor.name=quartz extractor
block.lavasmelter.name=lava smelter block.lavasmelter.name=lava smelter
block.lavasmelter.fulldescription=Uses lava to convert iron to steel. An alternative to smelteries. Useful in situations where coal is scarce. block.lavasmelter.fulldescription=Uses lava to convert iron to steel. An alternative to smelteries. Useful in situations where coal is scarce.
block.stonedrill.name=stone drill block.stonedrill.name=stone drill

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -1,7 +1,7 @@
#Autogenerated file. Do not modify. #Autogenerated file. Do not modify.
#Wed Feb 21 23:25:11 EST 2018 #Thu Feb 22 20:02:56 EST 2018
version=release version=release
androidBuildCode=269 androidBuildCode=280
name=Mindustry name=Mindustry
code=3.3 code=3.3
build=custom build build=custom build

View File

@ -8,7 +8,7 @@ import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.BulletEntity; import io.anuke.ucore.entities.BulletEntity;
import io.anuke.ucore.entities.Entities; import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.entities.Entity; import io.anuke.ucore.entities.Entity;
import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.Fill;
import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Mathf;
import static io.anuke.mindustry.Vars.bulletGroup; import static io.anuke.mindustry.Vars.bulletGroup;
@ -71,13 +71,12 @@ public class Shield extends Entity{
if(!(tile.block() instanceof ShieldBlock) || radius <= 1f){ if(!(tile.block() instanceof ShieldBlock) || radius <= 1f){
return; return;
} }
float rad = drawRadius(); Fill.circle(x, y, drawRadius());
Draw.rect("circle2", x, y, rad, rad);
} }
float drawRadius(){ float drawRadius(){
return (radius*2 + Mathf.sin(Timers.time(), 25f, 2f)); return (radius + Mathf.sin(Timers.time(), 25f, 1f));
} }
public void removeDelay(){ public void removeDelay(){

View File

@ -3,10 +3,7 @@ package io.anuke.mindustry.graphics;
import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Colors; import com.badlogic.gdx.graphics.Colors;
import io.anuke.ucore.core.Effects.Effect; import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.*;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.graphics.Shapes;
import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Mathf;
@ -166,7 +163,6 @@ public class Fx{
Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{ Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{
float len = e.fract()*4f; float len = e.fract()*4f;
Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.ifract()); Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.ifract());
//Draw.alpha(e.fract());
Draw.rect("circle", e.x + x, e.y + y, len, len); Draw.rect("circle", e.x + x, e.y + y, len, len);
Draw.reset(); Draw.reset();
}); });
@ -176,11 +172,18 @@ public class Fx{
Angles.randLenVectors(e.id, 5, e.ifract()*9f, (x, y)->{ Angles.randLenVectors(e.id, 5, e.ifract()*9f, (x, y)->{
float len = e.fract()*4f; float len = e.fract()*4f;
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract()); Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
//Draw.alpha(e.fract());
Draw.rect("circle", e.x + x, e.y + y, len, len); Draw.rect("circle", e.x + x, e.y + y, len, len);
Draw.reset(); Draw.reset();
}); });
}), }),
pulverize = new Effect(25, e -> {
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*5f, (x, y)->{
Draw.color(Color.valueOf("eae4f0"), Color.GRAY, e.ifract());
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.5f, 45);
Draw.reset();
});
}),
laserspark = new Effect(14, e -> { laserspark = new Effect(14, e -> {
Angles.randLenVectors(e.id, 8, 1f + e.ifract()*11f, (x, y)->{ Angles.randLenVectors(e.id, 8, 1f + e.ifract()*11f, (x, y)->{
@ -403,29 +406,14 @@ public class Fx{
Draw.reset(); Draw.reset();
}), }),
titanExplosion = new Effect(11, 48f, e -> {
Lines.stroke(2f*e.fract()+0.5f);
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
Lines.circle(e.x, e.y, 5f + e.powfract() * 8f);
Draw.color(e.ifract() < 0.5f ? whiteOrange : Color.DARK_GRAY);
float rad = e.fract()*10f + 5f;
Angles.randLenVectors(e.id, 5, 9f, (x, y)->{
Draw.rect("circle2", e.x + x, e.y + y, rad, rad);
});
Draw.reset();
}),
explosion = new Effect(11, e -> { explosion = new Effect(11, e -> {
Lines.stroke(2f*e.fract()+0.5f); Lines.stroke(2f*e.fract()+0.5f);
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract()); Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
Lines.circle(e.x, e.y, 5f + e.powfract() * 6f); Lines.circle(e.x, e.y, 5f + e.powfract() * 6f);
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY); Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
float rad = e.fract()*10f + 5f;
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{ Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
Draw.rect("circle2", e.x + x, e.y + y, rad, rad); Fill.circle(e.x + x, e.y + y, e.fract()*5f + 2.5f);
}); });
Draw.reset(); Draw.reset();
@ -445,9 +433,8 @@ public class Fx{
Lines.circle(e.x, e.y, 2f + e.powfract() * 9f); Lines.circle(e.x, e.y, 2f + e.powfract() * 9f);
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY); Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
float rad = e.fract()*10f + 2f;
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{ Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
Draw.rect("circle2", e.x + x, e.y + y, rad, rad); Fill.circle(e.x + x, e.y + y, e.fract()*5f + 1f);
}); });
Draw.reset(); Draw.reset();

View File

@ -11,20 +11,41 @@ public class Item{
public static final Item public static final Item
stone = new Item("stone"), stone = new Item("stone"),
iron = new Item("iron"), iron = new Item("iron"),
coal = new Item("coal"), coal = new Item("coal"){
{
explosiveness = 0.2f;
flammability = 0.5f;
material = false;
}
},
steel = new Item("steel"), steel = new Item("steel"),
titanium = new Item("titanium"), titanium = new Item("titanium"),
dirium = new Item("dirium"), dirium = new Item("dirium"),
uranium = new Item("uranium"), uranium = new Item("uranium"){
sand = new Item("sand"); {
/*glass = new Item("glass"), explosiveness = 0.1f;
silicon = new Item("silicon");*/ material = false;
}
},
quartz = new Item("quartz") {
{
material = false;
}
},
glass = new Item("glass"),
silicon = new Item("silicon"){
{
material = false;
}
};
public final int id; public final int id;
public final String name; public final String name;
public TextureRegion region; public TextureRegion region;
public float explosiveness = 0f; public float explosiveness = 0f;
public float flammability = 0f; public float flammability = 0f;
public boolean material = true;
public Item(String name) { public Item(String name) {
this.id = items.size; this.id = items.size;

View File

@ -51,6 +51,8 @@ public class Recipes {
new Recipe(crafting, ProductionBlocks.oilrefinery, stack(Item.steel, 15), stack(Item.iron, 15)), new Recipe(crafting, ProductionBlocks.oilrefinery, stack(Item.steel, 15), stack(Item.iron, 15)),
new Recipe(crafting, ProductionBlocks.stoneformer, stack(Item.steel, 10), stack(Item.iron, 10)), new Recipe(crafting, ProductionBlocks.stoneformer, stack(Item.steel, 10), stack(Item.iron, 10)),
new Recipe(crafting, ProductionBlocks.lavasmelter, stack(Item.steel, 30), stack(Item.titanium, 15)), new Recipe(crafting, ProductionBlocks.lavasmelter, stack(Item.steel, 30), stack(Item.titanium, 15)),
new Recipe(crafting, ProductionBlocks.pulverizer, stack(Item.steel, 30), stack(Item.titanium, 15)),
new Recipe(crafting, ProductionBlocks.siliconextractor, stack(Item.steel, 30), stack(Item.titanium, 15)),
new Recipe(crafting, ProductionBlocks.weaponFactory, stack(Item.steel, 60), stack(Item.iron, 60)).setDesktop(), new Recipe(crafting, ProductionBlocks.weaponFactory, stack(Item.steel, 60), stack(Item.iron, 60)).setDesktop(),
new Recipe(production, ProductionBlocks.stonedrill, stack(Item.stone, 12)), new Recipe(production, ProductionBlocks.stonedrill, stack(Item.stone, 12)),
@ -58,6 +60,7 @@ public class Recipes {
new Recipe(production, ProductionBlocks.coaldrill, stack(Item.stone, 25), stack(Item.iron, 40)), new Recipe(production, ProductionBlocks.coaldrill, stack(Item.stone, 25), stack(Item.iron, 40)),
new Recipe(production, ProductionBlocks.titaniumdrill, stack(Item.iron, 50), stack(Item.steel, 50)), new Recipe(production, ProductionBlocks.titaniumdrill, stack(Item.iron, 50), stack(Item.steel, 50)),
new Recipe(production, ProductionBlocks.uraniumdrill, stack(Item.iron, 40), stack(Item.steel, 40)), new Recipe(production, ProductionBlocks.uraniumdrill, stack(Item.iron, 40), stack(Item.steel, 40)),
new Recipe(production, ProductionBlocks.quartzextractor, stack(Item.titanium, 40), stack(Item.dirium, 40)),
new Recipe(production, ProductionBlocks.omnidrill, stack(Item.titanium, 40), stack(Item.dirium, 40)), new Recipe(production, ProductionBlocks.omnidrill, stack(Item.titanium, 40), stack(Item.dirium, 40)),
new Recipe(power, ProductionBlocks.coalgenerator, stack(Item.iron, 30), stack(Item.stone, 20)), new Recipe(power, ProductionBlocks.coalgenerator, stack(Item.iron, 30), stack(Item.stone, 20)),
@ -82,8 +85,8 @@ public class Recipes {
new Recipe(liquid, DistributionBlocks.liquidrouter, stack(Item.steel, 2)), new Recipe(liquid, DistributionBlocks.liquidrouter, stack(Item.steel, 2)),
new Recipe(liquid, DistributionBlocks.liquidjunction, stack(Item.steel, 2)), new Recipe(liquid, DistributionBlocks.liquidjunction, stack(Item.steel, 2)),
new Recipe(production, ProductionBlocks.pump, stack(Item.steel, 10)), new Recipe(liquid, ProductionBlocks.pump, stack(Item.steel, 10)),
new Recipe(production, ProductionBlocks.fluxpump, stack(Item.steel, 10), stack(Item.dirium, 5)), new Recipe(liquid, ProductionBlocks.fluxpump, stack(Item.steel, 10), stack(Item.dirium, 5)),
new Recipe(units, DebugBlocks.powerVoid, stack(Item.steel, 10)).setDebug(), new Recipe(units, DebugBlocks.powerVoid, stack(Item.steel, 10)).setDebug(),
new Recipe(units, DebugBlocks.powerInfinite, stack(Item.steel, 10), stack(Item.dirium, 5)).setDebug() new Recipe(units, DebugBlocks.powerInfinite, stack(Item.steel, 10), stack(Item.dirium, 5)).setDebug()

View File

@ -103,7 +103,9 @@ public class Blocks{
dirt = new Floor("dirt"){}, dirt = new Floor("dirt"){},
sand = new Floor("sand"){}, sand = new Floor("sand"){{
drops = new ItemStack(Item.quartz, 1);
}},
ice = new Floor("ice"){}, ice = new Floor("ice"){},

View File

@ -108,20 +108,21 @@ public class ProductionBlocks{
pulverizer = new PowerSmelter("pulverizer"){ pulverizer = new PowerSmelter("pulverizer"){
{ {
inputs = new ItemStack[]{new ItemStack(Item.stone, 5)}; inputs = new ItemStack[]{new ItemStack(Item.stone, 5)};
result = Item.sand; result = Item.quartz;
health = 50; health = 50;
craftTime = 60f; craftTime = 60f;
powerDrain = 0.02f; powerDrain = 0.02f;
craftEffect = Fx.pulverize;
} }
}, },
siliconextractor = new LiquidCrafter("siliconextractor"){ siliconextractor = new LiquidCrafter("siliconextractor"){
{ {
input = Item.sand; input = Item.quartz;
inputAmount = 5; inputAmount = 5;
inputLiquid = Liquid.water; inputLiquid = Liquid.water;
liquidAmount = 18.99f; liquidAmount = 18.99f;
output = Item.sand; output = Item.silicon;
health = 50; health = 50;
purifyTime = 50; purifyTime = 50;
} }
@ -172,9 +173,11 @@ public class ProductionBlocks{
} }
}, },
sandextractor = new Omnidrill("sandextractor"){ quartzextractor = new Drill("quartzextractor"){
{ {
time = 4; resource = Blocks.sand;
result = Item.quartz;
time = 5;
} }
}, },

View File

@ -35,8 +35,7 @@ public abstract class PowerBlock extends Block implements PowerAcceptor{
return entity.power + 0.001f <= powerCapacity; return entity.power + 0.001f <= powerCapacity;
} }
//TODO voltage requirement so blocks need specific voltage
@Override @Override
public float addPower(Tile tile, float amount){ public float addPower(Tile tile, float amount){
if(amount < voltage){ if(amount < voltage){

View File

@ -32,6 +32,6 @@ public class CoreBlock extends Block {
@Override @Override
public boolean acceptItem(Item item, Tile tile, Tile source){ public boolean acceptItem(Item item, Tile tile, Tile source){
return true; return item.material;
} }
} }