WIP arkycite
This commit is contained in:
@@ -57,6 +57,13 @@ public class CargoAI extends AIController{
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
//what if some prankster reconfigures the source while the unit is moving? we can't have that!
|
||||
if(unloadTarget.item != itemTarget){
|
||||
unloadTarget = null;
|
||||
return;
|
||||
}
|
||||
|
||||
moveTo(unloadTarget, moveRange, moveSmoothing);
|
||||
|
||||
//deposit in bursts, unloading can take a while
|
||||
|
||||
@@ -39,6 +39,7 @@ public class Blocks{
|
||||
//environment
|
||||
air, spawn, cliff, deepwater, water, taintedWater, deepTaintedWater, tar, slag, cryofluid, stone, craters, charr, sand, darksand, dirt, mud, ice, snow, darksandTaintedWater, space, empty,
|
||||
dacite, rhyolite, rhyoliteCrater, regolith, yellowStone, redIce,
|
||||
arkyciteFloor,
|
||||
redmat, bluemat,
|
||||
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
||||
redweed, purbush, coralChunk, yellowCoral,
|
||||
@@ -388,6 +389,20 @@ public class Blocks{
|
||||
attributes.set(Attribute.water, 0.4f);
|
||||
}};
|
||||
|
||||
arkyciteFloor = new Floor("arkycite-floor"){{
|
||||
speedMultiplier = 0.3f;
|
||||
variants = 0;
|
||||
liquidDrop = Liquids.arkycite;
|
||||
liquidMultiplier = 1.5f;
|
||||
isLiquid = true;
|
||||
//TODO status, cache layer for this crap
|
||||
status = StatusEffects.wet;
|
||||
statusDuration = 120f;
|
||||
drownTime = 200f;
|
||||
cacheLayer = CacheLayer.arkycite;
|
||||
albedo = 0.9f;
|
||||
}};
|
||||
|
||||
redmat = new Floor("redmat");
|
||||
bluemat = new Floor("bluemat");
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import mindustry.type.*;
|
||||
|
||||
public class Liquids{
|
||||
public static Liquid water, slag, oil, cryofluid, neoplasm,
|
||||
gallium,
|
||||
arkycite, gallium,
|
||||
ozone, hydrogen, nitrogen, cyanogen;
|
||||
|
||||
public static void load(){
|
||||
@@ -56,6 +56,12 @@ public class Liquids{
|
||||
colorTo = Color.valueOf("9e172c");
|
||||
}};
|
||||
|
||||
//TODO
|
||||
arkycite = new Liquid("arkycite", Color.valueOf("59963e")){{
|
||||
flammability = 0.4f;
|
||||
viscosity = 0.7f;
|
||||
}};
|
||||
|
||||
gallium = new Liquid("gallium", Color.valueOf("9a9dbf")){{
|
||||
|
||||
}};
|
||||
|
||||
@@ -2637,6 +2637,9 @@ public class UnitTypes{
|
||||
engineSize = 2.3f;
|
||||
engineOffset = 6.5f;
|
||||
|
||||
//should not appear anywhere, it's for internal use only and will despawn
|
||||
hidden = true;
|
||||
|
||||
setEnginesMirror(
|
||||
new UnitEngine(24 / 4f, -24 / 4f, 2.3f, 315f)
|
||||
);
|
||||
|
||||
@@ -10,7 +10,7 @@ import static mindustry.Vars.*;
|
||||
public class CacheLayer{
|
||||
public static CacheLayer
|
||||
|
||||
water, mud, cryofluid, tar, slag, space, normal, walls;
|
||||
water, mud, cryofluid, tar, slag, arkycite, space, normal, walls;
|
||||
|
||||
public static CacheLayer[] all = {};
|
||||
|
||||
@@ -37,6 +37,7 @@ public class CacheLayer{
|
||||
mud = new ShaderLayer(Shaders.mud),
|
||||
tar = new ShaderLayer(Shaders.tar),
|
||||
slag = new ShaderLayer(Shaders.slag),
|
||||
arkycite = new ShaderLayer(Shaders.arkycite),
|
||||
cryofluid = new ShaderLayer(Shaders.cryofluid),
|
||||
space = new ShaderLayer(Shaders.space),
|
||||
normal = new CacheLayer(),
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Shaders{
|
||||
public static UnitBuildShader build;
|
||||
public static DarknessShader darkness;
|
||||
public static LightShader light;
|
||||
public static SurfaceShader water, mud, tar, slag, cryofluid, space, caustics;
|
||||
public static SurfaceShader water, mud, tar, slag, cryofluid, space, caustics, arkycite;
|
||||
public static PlanetShader planet;
|
||||
public static CloudShader clouds;
|
||||
public static PlanetGridShader planetGrid;
|
||||
@@ -45,6 +45,7 @@ public class Shaders{
|
||||
darkness = new DarknessShader();
|
||||
light = new LightShader();
|
||||
water = new SurfaceShader("water");
|
||||
arkycite = new SurfaceShader("arkycite");
|
||||
mud = new SurfaceShader("mud");
|
||||
tar = new SurfaceShader("tar");
|
||||
slag = new SurfaceShader("slag");
|
||||
|
||||
@@ -112,7 +112,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
float noise = noise(x + 782, y, 7, 0.8f, 280f, 1f);
|
||||
if(noise > 0.62f){
|
||||
if(noise > 0.635f){
|
||||
//TODO slag must be rounded, no single occurrences
|
||||
floor = Blocks.slag;
|
||||
}else{
|
||||
floor = Blocks.yellowStone;
|
||||
|
||||
@@ -6,8 +6,10 @@ import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
@@ -49,6 +51,20 @@ public class UnitCargoLoader extends Block{
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceOn(Tile tile, Team team, int rotation){
|
||||
return super.canPlaceOn(tile, team, rotation) && Units.canCreate(team, unitType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
super.drawPlace(x, y, rotation, valid);
|
||||
|
||||
if(!Units.canCreate(Vars.player.team(), unitType)){
|
||||
drawPlaceText(Core.bundle.get("@bar.cargounitcap"), x, y, valid);
|
||||
}
|
||||
}
|
||||
|
||||
public class UnitTransportSourceBuild extends Building{
|
||||
//needs to be "unboxed" after reading, since units are read after buildings.
|
||||
public int readUnitId = -1;
|
||||
|
||||
Reference in New Issue
Block a user