mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Added plasma drill
This commit is contained in:
parent
4ff3517343
commit
dd0ad495f7
BIN
core/assets-raw/sprites/blocks/production/plasmadrill-rim.png
Normal file
BIN
core/assets-raw/sprites/blocks/production/plasmadrill-rim.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 408 B |
Binary file not shown.
After Width: | Height: | Size: 354 B |
BIN
core/assets-raw/sprites/blocks/production/plasmadrill-top.png
Normal file
BIN
core/assets-raw/sprites/blocks/production/plasmadrill-top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 296 B |
BIN
core/assets-raw/sprites/blocks/production/plasmadrill.png
Normal file
BIN
core/assets-raw/sprites/blocks/production/plasmadrill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 558 B |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 100 KiB |
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Sat Mar 31 13:42:41 EDT 2018
|
||||
#Sat Mar 31 14:50:44 EDT 2018
|
||||
version=release
|
||||
androidBuildCode=757
|
||||
androidBuildCode=766
|
||||
name=Mindustry
|
||||
code=3.4
|
||||
build=custom build
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.content.blocks;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.content.Liquids;
|
||||
import io.anuke.mindustry.graphics.Fx;
|
||||
@ -43,7 +44,7 @@ public class ProductionBlocks {
|
||||
}},
|
||||
|
||||
nucleardrill = new Drill("nucleardrill") {{
|
||||
drillTime = 170;
|
||||
drillTime = 160;
|
||||
size = 3;
|
||||
powerUse = 0.5f;
|
||||
drawRim = true;
|
||||
@ -57,19 +58,22 @@ public class ProductionBlocks {
|
||||
}},
|
||||
|
||||
plasmadrill = new Drill("plasmadrill") {{
|
||||
inputLiquid = Liquids.plasma;
|
||||
liquidRequired = true;
|
||||
heatColor = Color.valueOf("ff461b");
|
||||
//TODO
|
||||
//inputLiquid = Liquids.plasma;
|
||||
//liquidRequired = true;
|
||||
drillTime = 110;
|
||||
size = 4;
|
||||
powerUse = 0.7f;
|
||||
hasLiquids = true;
|
||||
hasPower = true;
|
||||
tier = 5;
|
||||
rotateSpeed = 8f;
|
||||
rotateSpeed = 9f;
|
||||
drawRim = true;
|
||||
updateEffect = Fx.pulverizeRed;
|
||||
updateEffectChance = 0.03f;
|
||||
updateEffect = Fx.pulverizeRedder;
|
||||
updateEffectChance = 0.04f;
|
||||
drillEffect = Fx.mineHuge;
|
||||
warmupSpeed = 0.005f;
|
||||
}},
|
||||
|
||||
waterextractor = new SolidPump("waterextractor") {{
|
||||
|
@ -204,6 +204,14 @@ public class Fx{
|
||||
});
|
||||
}),
|
||||
|
||||
pulverizeRedder = new Effect(40, e -> {
|
||||
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*9f, (x, y)->{
|
||||
Draw.color(Color.valueOf("ff7b69"), stoneGray, e.ifract());
|
||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2.5f + 0.5f, 45);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
pulverizeSmall = new Effect(30, e -> {
|
||||
Angles.randLenVectors(e.id, 3, e.ifract()*5f, (x, y)->{
|
||||
Draw.color(stoneGray);
|
||||
@ -400,6 +408,14 @@ public class Fx{
|
||||
});
|
||||
}),
|
||||
|
||||
mineMassive = new Effect(50, e -> {
|
||||
Angles.randLenVectors(e.id, 8, 5f + e.ifract()*14f, (x, y)->{
|
||||
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2.5f + 0.5f, 45);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
sparkbig = new Effect(11, e -> {
|
||||
Lines.stroke(1f);
|
||||
Draw.color(lightRed, Color.GRAY, e.ifract());
|
||||
|
@ -150,16 +150,16 @@ public class Drill extends Block{
|
||||
}
|
||||
|
||||
entity.warmup = Mathf.lerpDelta(entity.warmup, speed, warmupSpeed);
|
||||
entity.progress += Timers.delta() * multiplier * speed;
|
||||
entity.progress += Timers.delta() * multiplier * speed * entity.warmup;
|
||||
|
||||
if(Mathf.chance(Timers.delta() * updateEffectChance))
|
||||
if(Mathf.chance(Timers.delta() * updateEffectChance * entity.warmup))
|
||||
Effects.effect(updateEffect, entity.x + Mathf.range(size*2f), entity.y + Mathf.range(size*2f));
|
||||
}else{
|
||||
entity.warmup = Mathf.lerpDelta(entity.warmup, 0f, warmupSpeed);
|
||||
return;
|
||||
}
|
||||
|
||||
if(toAdd.size > 0 && entity.progress >= drillTime + hardnessDrillMultiplier*totalHardness
|
||||
if(toAdd.size > 0 && entity.progress >= drillTime + hardnessDrillMultiplier*Math.max(totalHardness, 1f)/multiplier
|
||||
&& tile.entity.inventory.totalItems() < itemCapacity){
|
||||
|
||||
int index = entity.index % toAdd.size;
|
||||
@ -168,7 +168,8 @@ public class Drill extends Block{
|
||||
entity.index ++;
|
||||
entity.progress = 0f;
|
||||
|
||||
Effects.effect(drillEffect, toAdd.get(index).color, tile.drawx(), tile.drawy());
|
||||
Effects.effect(drillEffect, toAdd.get(index).color,
|
||||
entity.x + Mathf.range(size), entity.y + Mathf.range(size));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user