WIP arkycite
This commit is contained in:
BIN
core/assets-raw/sprites/blocks/environment/arkycite-floor.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/arkycite-floor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 275 B |
BIN
core/assets-raw/sprites/items/liquid-arkycite.png
Normal file
BIN
core/assets-raw/sprites/items/liquid-arkycite.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 496 B |
@@ -796,6 +796,7 @@ ability.energyfield = Energy Field: [accent]{0}[] damage ~ [accent]{1}[] blocks
|
|||||||
bar.drilltierreq = Better Drill Required
|
bar.drilltierreq = Better Drill Required
|
||||||
bar.noresources = Missing Resources
|
bar.noresources = Missing Resources
|
||||||
bar.corereq = Core Base Required
|
bar.corereq = Core Base Required
|
||||||
|
bar.cargounitcap = Cargo Unit Cap Reached
|
||||||
bar.drillspeed = Drill Speed: {0}/s
|
bar.drillspeed = Drill Speed: {0}/s
|
||||||
bar.pumpspeed = Pump Speed: {0}/s
|
bar.pumpspeed = Pump Speed: {0}/s
|
||||||
bar.efficiency = Efficiency: {0}%
|
bar.efficiency = Efficiency: {0}%
|
||||||
|
|||||||
@@ -465,3 +465,5 @@
|
|||||||
63241=unit-cargo-loader|block-unit-cargo-loader-ui
|
63241=unit-cargo-loader|block-unit-cargo-loader-ui
|
||||||
63240=unit-cargo-unload-point|block-unit-cargo-unload-point-ui
|
63240=unit-cargo-unload-point|block-unit-cargo-unload-point-ui
|
||||||
63239=manifold|unit-manifold-ui
|
63239=manifold|unit-manifold-ui
|
||||||
|
63238=arkycite-floor|block-arkycite-floor-ui
|
||||||
|
63237=arkycite|liquid-arkycite-ui
|
||||||
|
|||||||
Binary file not shown.
55
core/assets/shaders/arkycite.frag
Normal file
55
core/assets/shaders/arkycite.frag
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
#define HIGHP
|
||||||
|
|
||||||
|
//shades of slag
|
||||||
|
#define S2 vec3(89.0, 150.0, 62.0) / 255.0
|
||||||
|
#define S1 vec3(112.0, 181.0, 81.0) / 255.0
|
||||||
|
#define MINSHADE vec4(68.0, 118.0, 66.0, 255.0) / 255.0
|
||||||
|
|
||||||
|
#define NSCALE 170.0 / 2.0
|
||||||
|
#define DSCALE 160.0 / 2.0
|
||||||
|
|
||||||
|
uniform sampler2D u_texture;
|
||||||
|
uniform sampler2D u_noise;
|
||||||
|
|
||||||
|
uniform vec2 u_campos;
|
||||||
|
uniform vec2 u_resolution;
|
||||||
|
uniform float u_time;
|
||||||
|
|
||||||
|
varying vec2 v_texCoords;
|
||||||
|
|
||||||
|
void main(){
|
||||||
|
vec2 c = v_texCoords.xy;
|
||||||
|
vec2 coords = vec2(c.x * u_resolution.x + u_campos.x, c.y * u_resolution.y + u_campos.y);
|
||||||
|
|
||||||
|
vec4 orig = texture2D(u_texture, c);
|
||||||
|
|
||||||
|
float atime = u_time / 15000.0;
|
||||||
|
float noise = (texture2D(u_noise, (coords) / DSCALE + vec2(atime) * vec2(-0.9, 0.8)).r + texture2D(u_noise, (coords) / DSCALE + vec2(atime * 1.1) * vec2(0.8, -1.0)).r) / 2.0;
|
||||||
|
|
||||||
|
noise = abs(noise - 0.5) * 7.0 + 0.23;
|
||||||
|
|
||||||
|
float btime = u_time / 9000.0;
|
||||||
|
|
||||||
|
c += (vec2(
|
||||||
|
texture2D(u_noise, (coords) / NSCALE + vec2(btime) * vec2(-0.9, 0.8)).r,
|
||||||
|
texture2D(u_noise, (coords) / NSCALE + vec2(btime * 1.1) * vec2(0.8, -1.0)).r
|
||||||
|
) - vec2(0.5)) * 20.0 / u_resolution;
|
||||||
|
|
||||||
|
vec4 color = texture2D(u_texture, c);
|
||||||
|
|
||||||
|
if(noise > 0.85){
|
||||||
|
if(color.g >= (S2).g - 0.1){
|
||||||
|
color.rgb = S1;
|
||||||
|
}else{
|
||||||
|
color.rgb = S2;
|
||||||
|
}
|
||||||
|
}else if(noise > 0.5){
|
||||||
|
color.rgb = S2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(orig.r > 0.01){
|
||||||
|
color = max(MINSHADE, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
gl_FragColor = color;
|
||||||
|
}
|
||||||
@@ -57,6 +57,13 @@ public class CargoAI extends AIController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}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);
|
moveTo(unloadTarget, moveRange, moveSmoothing);
|
||||||
|
|
||||||
//deposit in bursts, unloading can take a while
|
//deposit in bursts, unloading can take a while
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class Blocks{
|
|||||||
//environment
|
//environment
|
||||||
air, spawn, cliff, deepwater, water, taintedWater, deepTaintedWater, tar, slag, cryofluid, stone, craters, charr, sand, darksand, dirt, mud, ice, snow, darksandTaintedWater, space, empty,
|
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,
|
dacite, rhyolite, rhyoliteCrater, regolith, yellowStone, redIce,
|
||||||
|
arkyciteFloor,
|
||||||
redmat, bluemat,
|
redmat, bluemat,
|
||||||
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
||||||
redweed, purbush, coralChunk, yellowCoral,
|
redweed, purbush, coralChunk, yellowCoral,
|
||||||
@@ -388,6 +389,20 @@ public class Blocks{
|
|||||||
attributes.set(Attribute.water, 0.4f);
|
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");
|
redmat = new Floor("redmat");
|
||||||
bluemat = new Floor("bluemat");
|
bluemat = new Floor("bluemat");
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import mindustry.type.*;
|
|||||||
|
|
||||||
public class Liquids{
|
public class Liquids{
|
||||||
public static Liquid water, slag, oil, cryofluid, neoplasm,
|
public static Liquid water, slag, oil, cryofluid, neoplasm,
|
||||||
gallium,
|
arkycite, gallium,
|
||||||
ozone, hydrogen, nitrogen, cyanogen;
|
ozone, hydrogen, nitrogen, cyanogen;
|
||||||
|
|
||||||
public static void load(){
|
public static void load(){
|
||||||
@@ -56,6 +56,12 @@ public class Liquids{
|
|||||||
colorTo = Color.valueOf("9e172c");
|
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")){{
|
gallium = new Liquid("gallium", Color.valueOf("9a9dbf")){{
|
||||||
|
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -2637,6 +2637,9 @@ public class UnitTypes{
|
|||||||
engineSize = 2.3f;
|
engineSize = 2.3f;
|
||||||
engineOffset = 6.5f;
|
engineOffset = 6.5f;
|
||||||
|
|
||||||
|
//should not appear anywhere, it's for internal use only and will despawn
|
||||||
|
hidden = true;
|
||||||
|
|
||||||
setEnginesMirror(
|
setEnginesMirror(
|
||||||
new UnitEngine(24 / 4f, -24 / 4f, 2.3f, 315f)
|
new UnitEngine(24 / 4f, -24 / 4f, 2.3f, 315f)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import static mindustry.Vars.*;
|
|||||||
public class CacheLayer{
|
public class CacheLayer{
|
||||||
public static 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 = {};
|
public static CacheLayer[] all = {};
|
||||||
|
|
||||||
@@ -37,6 +37,7 @@ public class CacheLayer{
|
|||||||
mud = new ShaderLayer(Shaders.mud),
|
mud = new ShaderLayer(Shaders.mud),
|
||||||
tar = new ShaderLayer(Shaders.tar),
|
tar = new ShaderLayer(Shaders.tar),
|
||||||
slag = new ShaderLayer(Shaders.slag),
|
slag = new ShaderLayer(Shaders.slag),
|
||||||
|
arkycite = new ShaderLayer(Shaders.arkycite),
|
||||||
cryofluid = new ShaderLayer(Shaders.cryofluid),
|
cryofluid = new ShaderLayer(Shaders.cryofluid),
|
||||||
space = new ShaderLayer(Shaders.space),
|
space = new ShaderLayer(Shaders.space),
|
||||||
normal = new CacheLayer(),
|
normal = new CacheLayer(),
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class Shaders{
|
|||||||
public static UnitBuildShader build;
|
public static UnitBuildShader build;
|
||||||
public static DarknessShader darkness;
|
public static DarknessShader darkness;
|
||||||
public static LightShader light;
|
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 PlanetShader planet;
|
||||||
public static CloudShader clouds;
|
public static CloudShader clouds;
|
||||||
public static PlanetGridShader planetGrid;
|
public static PlanetGridShader planetGrid;
|
||||||
@@ -45,6 +45,7 @@ public class Shaders{
|
|||||||
darkness = new DarknessShader();
|
darkness = new DarknessShader();
|
||||||
light = new LightShader();
|
light = new LightShader();
|
||||||
water = new SurfaceShader("water");
|
water = new SurfaceShader("water");
|
||||||
|
arkycite = new SurfaceShader("arkycite");
|
||||||
mud = new SurfaceShader("mud");
|
mud = new SurfaceShader("mud");
|
||||||
tar = new SurfaceShader("tar");
|
tar = new SurfaceShader("tar");
|
||||||
slag = new SurfaceShader("slag");
|
slag = new SurfaceShader("slag");
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
float noise = noise(x + 782, y, 7, 0.8f, 280f, 1f);
|
float noise = noise(x + 782, y, 7, 0.8f, 280f, 1f);
|
||||||
if(noise > 0.62f){
|
if(noise > 0.62f){
|
||||||
if(noise > 0.635f){
|
if(noise > 0.635f){
|
||||||
//TODO slag must be rounded, no single occurrences
|
|
||||||
floor = Blocks.slag;
|
floor = Blocks.slag;
|
||||||
}else{
|
}else{
|
||||||
floor = Blocks.yellowStone;
|
floor = Blocks.yellowStone;
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ import arc.graphics.g2d.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
|
import mindustry.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.type.*;
|
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{
|
public class UnitTransportSourceBuild extends Building{
|
||||||
//needs to be "unboxed" after reading, since units are read after buildings.
|
//needs to be "unboxed" after reading, since units are read after buildings.
|
||||||
public int readUnitId = -1;
|
public int readUnitId = -1;
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=00d1f312
|
archash=f9abed08
|
||||||
|
|||||||
Reference in New Issue
Block a user