plasma bore

This commit is contained in:
Anuken
2021-10-25 20:51:45 -04:00
parent d01404d7ca
commit bc0b9e9eb3
8 changed files with 16 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -408,3 +408,4 @@
63300=scuttler|unit-scuttler-ui 63300=scuttler|unit-scuttler-ui
63299=breach|block-breach-ui 63299=breach|block-breach-ui
63298=core-bastion|block-core-bastion-ui 63298=core-bastion|block-core-bastion-ui
63297=plasma-bore|block-plasma-bore-ui

Binary file not shown.

View File

@@ -81,7 +81,7 @@ public class Blocks implements ContentList{
//production //production
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator, mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator,
cliffCrusher, beamDrill, cliffCrusher, plasmaBore,
//storage //storage
coreShard, coreFoundation, coreNucleus, vault, container, unloader, coreShard, coreFoundation, coreNucleus, vault, container, unloader,
@@ -1603,12 +1603,12 @@ public class Blocks implements ContentList{
output = Items.sand; output = Items.sand;
}}; }};
beamDrill = new BeamDrill("beam-drill"){{ plasmaBore = new BeamDrill("plasma-bore"){{
requirements(Category.production, with(Items.copper, 10)); requirements(Category.production, with(Items.graphite, 20, Items.beryllium, 10, Items.lead, 20));
consumes.power(0.2f); consumes.power(0.2f);
tier = 4; tier = 4;
size = 2; size = 2;
range = 4; range = 2;
}}; }};
//endregion //endregion

View File

@@ -23,6 +23,7 @@ public class BeamDrill extends Block{
public @Load("drill-laser") TextureRegion laser; public @Load("drill-laser") TextureRegion laser;
public @Load("drill-laser-end") TextureRegion laserEnd; public @Load("drill-laser-end") TextureRegion laserEnd;
public @Load("drill-laser-center") TextureRegion laserCenter;
public @Load("@-top") TextureRegion topRegion; public @Load("@-top") TextureRegion topRegion;
public float drillTime = 200f; public float drillTime = 200f;
@@ -33,7 +34,7 @@ public class BeamDrill extends Block{
public Color sparkColor = Color.valueOf("fd9e81"), glowColor = Color.white; public Color sparkColor = Color.valueOf("fd9e81"), glowColor = Color.white;
public float glowIntensity = 0.2f, pulseIntensity = 0.07f; public float glowIntensity = 0.2f, pulseIntensity = 0.07f;
public float glowScl = 3f; public float glowScl = 3f;
public int sparks = 11; public int sparks = 8;
public float sparkRange = 10f, sparkLife = 27f, sparkRecurrence = 4f, sparkSpread = 45f, sparkSize = 3.5f; public float sparkRange = 10f, sparkLife = 27f, sparkRecurrence = 4f, sparkSpread = 45f, sparkSize = 3.5f;
public BeamDrill(String name){ public BeamDrill(String name){
@@ -189,12 +190,11 @@ public class BeamDrill extends Block{
super.updateTile(); super.updateTile();
if(lasers[0] == null) updateLasers(); if(lasers[0] == null) updateLasers();
boolean cons = shouldConsume();
warmup = Mathf.approachDelta(warmup, Mathf.num(consValid()), 1f / 60f); warmup = Mathf.approachDelta(warmup, Mathf.num(consValid()), 1f / 60f);
lastItem = null; lastItem = null;
boolean multiple = false; boolean multiple = false;
int dx = Geometry.d4x(rotation), dy = Geometry.d4y(rotation), ddx = Geometry.d4x(rotation + 1), ddy = Geometry.d4y(rotation + 1); int dx = Geometry.d4x(rotation), dy = Geometry.d4y(rotation);
//update facing tiles //update facing tiles
for(int p = 0; p < size; p++){ for(int p = 0; p < size; p++){
@@ -262,13 +262,19 @@ public class BeamDrill extends Block{
Point2 p = lasers[i]; Point2 p = lasers[i];
float lx = face.worldx() - (dir.x/2f)*tilesize, ly = face.worldy() - (dir.y/2f)*tilesize; float lx = face.worldx() - (dir.x/2f)*tilesize, ly = face.worldy() - (dir.y/2f)*tilesize;
float width = (laserWidth + Mathf.absin(Time.time + i*5 + id*9, glowScl, pulseIntensity)) * warmup;
Draw.z(Layer.power - 1); Draw.z(Layer.power - 1);
Draw.mixcol(glowColor, Mathf.absin(Time.time + i*5 + id*9, glowScl, glowIntensity)); Draw.mixcol(glowColor, Mathf.absin(Time.time + i*5 + id*9, glowScl, glowIntensity));
Drawf.laser(team, laser, laserEnd, if(Math.abs(p.x - face.x) + Math.abs(p.y - face.y) == 0){
Draw.rect(laserCenter, lx, ly, width * laserCenter.width * Draw.scl, width * laserCenter.height * Draw.scl);
}else{
Drawf.laser(team, laser, laserEnd,
(p.x - dir.x/2f) * tilesize, (p.x - dir.x/2f) * tilesize,
(p.y - dir.y/2f) * tilesize, (p.y - dir.y/2f) * tilesize,
lx, ly, lx, ly,
(laserWidth + Mathf.absin(Time.time + i*5 + id*9, glowScl, pulseIntensity)) * warmup); width);
}
Draw.mixcol(); Draw.mixcol();
Draw.z(Layer.effect); Draw.z(Layer.effect);