Waveskip / Stat fixes / 3x3 thermalpump / Removed liquid tiers

This commit is contained in:
Anuken 2019-03-01 23:01:12 -05:00
parent 1e111d29d9
commit d82d0ae923
18 changed files with 20 additions and 35 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 510 B

View File

@ -727,7 +727,6 @@ public class Blocks implements ContentList{
mechanicalPump = new Pump("mechanical-pump"){{
requirements(Category.liquid, ItemStack.with(Items.copper, 30, Items.lead, 20));
pumpAmount = 0.1f;
tier = 0;
}};
rotaryPump = new Pump("rotary-pump"){{
@ -737,17 +736,15 @@ public class Blocks implements ContentList{
liquidCapacity = 30f;
hasPower = true;
size = 2;
tier = 1;
}};
thermalPump = new Pump("thermal-pump"){{
requirements(Category.liquid, ItemStack.with(Items.copper, 160, Items.lead, 130, Items.silicon, 60, Items.titanium, 80, Items.thorium, 70));
pumpAmount = 0.275f;
pumpAmount = 0.22f;
consumes.power(0.30f);
liquidCapacity = 40f;
hasPower = true;
size = 2;
tier = 2;
size = 3;
}};
conduit = new Conduit("conduit"){{
@ -949,7 +946,7 @@ public class Blocks implements ContentList{
waterExtractor = new SolidPump("water-extractor"){{
requirements(Category.production, ItemStack.with(Items.copper, 50, Items.graphite, 50, Items.lead, 40));
result = Liquids.water;
pumpAmount = 0.065f;
pumpAmount = 0.13f;
size = 2;
liquidCapacity = 30f;
rotateSpeed = 1.4f;
@ -963,7 +960,7 @@ public class Blocks implements ContentList{
updateEffect = Fx.pulverize;
liquidCapacity = 50f;
updateEffectChance = 0.05f;
pumpAmount = 0.09f;
pumpAmount = 0.25f;
size = 3;
liquidCapacity = 30f;

View File

@ -12,14 +12,12 @@ public class Liquids implements ContentList{
water = new Liquid("water", Color.valueOf("596ab8")){{
heatCapacity = 0.4f;
tier = 0;
effect = StatusEffects.wet;
}};
slag = new Liquid("slag", Color.valueOf("ffa166")){{
temperature = 1f;
viscosity = 0.8f;
tier = 2;
effect = StatusEffects.melting;
}};
@ -28,14 +26,12 @@ public class Liquids implements ContentList{
flammability = 1.2f;
explosiveness = 1.2f;
heatCapacity = 0.7f;
tier = 1;
effect = StatusEffects.tarred;
}};
cryofluid = new Liquid("cryofluid", Color.valueOf("6ecdec")){{
heatCapacity = 0.9f;
temperature = 0.25f;
tier = 1;
effect = StatusEffects.freezing;
}};
}

View File

@ -143,16 +143,21 @@ public class Units{
/**Returns the closest target enemy. First, units are checked, then tile entities.*/
public static TargetTrait getClosestTarget(Team team, float x, float y, float range){
return getClosestTarget(team, x, y, range, u -> !u.isDead() && u.isAdded());
return getClosestTarget(team, x, y, range, Unit::isValid);
}
/**Returns the closest target enemy. First, units are checked, then tile entities.*/
public static TargetTrait getClosestTarget(Team team, float x, float y, float range, Predicate<Unit> unitPred){
return getClosestTarget(team, x, y, range, unitPred, t -> true);
}
/**Returns the closest target enemy. First, units are checked, then tile entities.*/
public static TargetTrait getClosestTarget(Team team, float x, float y, float range, Predicate<Unit> unitPred, Predicate<Tile> tilePred){
Unit unit = getClosestEnemy(team, x, y, range, unitPred);
if(unit != null){
return unit;
}else{
return findEnemyTile(team, x, y, range, tile -> true);
return findEnemyTile(team, x, y, range, tilePred);
}
}

View File

@ -462,11 +462,8 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
//region update methods
Vector2 last = new Vector2();
@Override
public void update(){
last.set(this);
hitTime -= Time.delta();
@ -685,7 +682,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
if(target == null){
isShooting = false;
if(Core.settings.getBool("autotarget")){
target = Units.getClosestTarget(team, x, y, getWeapon().bullet.range(), u -> u.getTeam() != Team.none);
target = Units.getClosestTarget(team, x, y, getWeapon().bullet.range(), u -> u.getTeam() != Team.none, u -> u.getTeam() != Team.none);
if(mech.canHeal && target == null){
target = Geometry.findClosest(x, y, world.indexer.getDamaged(Team.blue));

View File

@ -25,8 +25,6 @@ public class Liquid extends UnlockableContent{
public Color flameColor = Color.valueOf("ffb763");
/**The associated status effect.*/
public StatusEffect effect = StatusEffects.none;
/**Pump tier. Controls which pumps can use this liquid.*/
public int tier;
/**Displayed icon. TODO fix it by removing autogen, draw icons manually*/
public TextureRegion iconRegion;

View File

@ -23,7 +23,6 @@ import io.anuke.arc.util.Time;
import io.anuke.arc.util.Tmp;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.game.EventType.StateChangeEvent;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.game.UnlockableContent;
import io.anuke.mindustry.gen.Call;
import io.anuke.mindustry.graphics.Pal;
@ -466,12 +465,8 @@ public class HudFragment extends Fragment{
}else{
state.wavetime = 0f;
}
}).growY().fillX().right().width(40f).update(l -> {
boolean vis = !state.rules.waveTimer && ((Net.server() || players[0].isAdmin) || !Net.active());
boolean paused = state.is(State.paused) || !vis;
l.getStyle().imageUp = Core.scene.skin.getDrawable(vis ? "icon-play" : "clear");
l.touchable(!paused ? Touchable.enabled : Touchable.disabled);
}).visible(() -> !state.rules.waveTimer && ((Net.server() || players[0].isAdmin) || !Net.active()) && unitGroups[Team.red.ordinal()].size() == 0);
}).growY().fillX().right().width(40f)
.visible(() -> state.rules.waves && ((Net.server() || players[0].isAdmin) || !Net.active()) && state.enemies() == 0
&& state.wavetime < state.rules.waveSpacing - 60);
}
}

View File

@ -28,7 +28,6 @@ import static io.anuke.mindustry.Vars.*;
public class Conveyor extends Block{
private static final float itemSpace = 0.135f * 3f;
private static final float offsetScl = 128f * 3f;
private static final float minmove = 1f / (Short.MAX_VALUE - 2);
private static ItemPos drawpos = new ItemPos();
private static ItemPos pos1 = new ItemPos();

View File

@ -160,7 +160,7 @@ public class Drill extends Block{
}
});
stats.add(BlockStat.drillSpeed, 60f / drillTime, StatUnit.itemsSecond);
stats.add(BlockStat.drillSpeed, 60f / drillTime * size * size, StatUnit.itemsSecond);
}
@Override

View File

@ -21,8 +21,6 @@ public class Pump extends LiquidBlock{
/**Pump amount per tile this block is on.*/
protected float pumpAmount = 1f;
/**Maximum liquid tier this pump can use.*/
protected int tier = 0;
public Pump(String name){
super(name);
@ -42,7 +40,7 @@ public class Pump extends LiquidBlock{
@Override
public void setStats(){
super.setStats();
stats.add(BlockStat.liquidOutputSpeed, 60f * pumpAmount, StatUnit.liquidSecond);
stats.add(BlockStat.liquidOutputSpeed, 60f * pumpAmount * size * size, StatUnit.liquidSecond);
}
@Override
@ -115,7 +113,7 @@ public class Pump extends LiquidBlock{
}
protected boolean isValid(Tile tile){
return tile != null && tile.floor().liquidDrop != null && tier >= tile.floor().liquidDrop.tier;
return tile != null && tile.floor().liquidDrop != null;
}
}

View File

@ -69,7 +69,7 @@ public class SolidPump extends Pump{
if(isMultiblock()){
for(Tile other : tile.getLinkedTiles(tempTiles)){
if(isValid(other)){
fraction += 1f / size;
fraction += 1f / (size * size);
}
}
}else{

View File

@ -222,7 +222,7 @@ public class MechPad extends Block{
player.rotation = 90f;
player.baseRotation = 90f;
player.set(x, y);
player.setNet(x, y);
player.beginRespawning(this);
}
}