Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
done with liquids, ig
Browse files Browse the repository at this point in the history
  • Loading branch information
GlennFolker committed Oct 11, 2020
1 parent 143a7cb commit d017413
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mw/MechanicalWarfare.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import mw.content.*;

public class MechanicalWarfare extends Mod{
ContentList[] contents = {
new MWItems()
private ContentList[] contents = {
new MWItems(),
new MWLiquids(),
new MWBlocks()
};

@Override
Expand Down
120 changes: 120 additions & 0 deletions src/mw/content/MWBlocks.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
package mw.content;

import mindustry.content.*;
import mindustry.ctype.*;
import mindustry.graphics.*;
import mindustry.world.*;
import mindustry.world.blocks.environment.*;

public class MWBlocks implements ContentList{
public static Block

//environment
lava, contaminatedWater, deepContaminatedWater, darksandContaminatedWater, sandContaminatedWater,

//ores
oreIron, oreAluminum, oreUranium;

@Override
public void load(){
//region environment

lava = new Floor("lava"){{
liquidDrop = MWLiquids.lava;
speedMultiplier = 0.15f;
variants = 0;
isLiquid = true;
status = StatusEffects.melting;
statusDuration = 180f;
drownUpdateEffect = Fx.burning;
walkEffect = Fx.melting;
blendGroup = Blocks.water;
drownTime = 40f;
cacheLayer = CacheLayer.slag;
albedo = 0.5f;
}};

contaminatedWater = new Floor("contaminated-water"){{
liquidDrop = MWLiquids.contaminatedWater;
speedMultiplier = 0.5f;
variants = 0;
isLiquid = true;
status = StatusEffects.wet;
statusDuration = 90f;
drownUpdateEffect = Fx.burning;
walkEffect = Fx.wet;
cacheLayer = CacheLayer.water;
albedo = 0.5f;
}};

deepContaminatedWater = new Floor("deep-contaminated-water"){{
liquidDrop = MWLiquids.contaminatedWater;
speedMultiplier = 0.2f;
variants = 0;
isLiquid = true;
status = StatusEffects.wet;
statusDuration = 120f;
drownUpdateEffect = Fx.burning;
walkEffect = Fx.wet;
blendGroup = contaminatedWater;
cacheLayer = CacheLayer.water;
drownTime = 140f;
albedo = 0.5f;
}};

darksandContaminatedWater = new ShallowLiquid("darksand-contaminated-water"){{
liquidDrop = MWLiquids.contaminatedWater;
speedMultiplier = 0.5f;
variants = 0;
isLiquid = true;
status = StatusEffects.wet;
statusDuration = 90f;
drownUpdateEffect = Fx.burning;
walkEffect = Fx.wet;
blendGroup = contaminatedWater;
cacheLayer = CacheLayer.water;
albedo = 0.5f;

set(contaminatedWater, Blocks.darksand);
}};

sandContaminatedWater = new ShallowLiquid("sand-contaminated-water"){{
liquidDrop = MWLiquids.contaminatedWater;
speedMultiplier = 0.5f;
variants = 0;
isLiquid = true;
status = StatusEffects.wet;
statusDuration = 90f;
drownUpdateEffect = Fx.burning;
walkEffect = Fx.wet;
blendGroup = contaminatedWater;
cacheLayer = CacheLayer.water;
albedo = 0.5f;

set(contaminatedWater, Blocks.sand);
}};

//end region
//region ores

oreIron = new OreBlock(MWItems.iron){{
oreDefault = true;
oreThreshold = 0.864f;
oreScale = 24.904762f;
}};

oreAluminum = new OreBlock(MWItems.aluminum){{
oreDefault = true;
oreThreshold = 0.89f;
oreScale = 25.828543f;
}};

oreUranium = new OreBlock(MWItems.uranium){{
oreDefault = true;
oreThreshold = 0.89f;
oreScale = 25.828543f;
}};

//end region
}
}
37 changes: 37 additions & 0 deletions src/mw/content/MWLiquids.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package mw.content;

import arc.graphics.*;
import mindustry.content.*;
import mindustry.ctype.*;
import mindustry.type.*;

public class MWLiquids implements ContentList{
public static Liquid

lava, contaminatedWater, acid, gas;

@Override
public void load(){
lava = new Liquid("liquid-lava", Color.valueOf("d95f34")){{
temperature = 1.4f;
viscosity = 0.9f;
effect = StatusEffects.melting;
}};

contaminatedWater = new Liquid("liquid-contaminated-water", Color.valueOf("588a4c")){{
temperature = 0.6f;
effect = StatusEffects.wet;
}};

acid = new Liquid("liquid-acid", Color.valueOf("c9eb86")){{
temperature = 0.6f;
viscosity = 0.8f;
effect = StatusEffects.corroded;
}};

gas = new Liquid("liquid-gas", Color.valueOf("b33eb3")){{
flammability = 1.25f;
explosiveness = 1f;
}};
}
}

0 comments on commit d017413

Please sign in to comment.