Merge branch 'master' into ground-support-heal

This commit is contained in:
genNAowl
2020-10-30 12:37:33 -07:00
committed by GitHub
433 changed files with 12068 additions and 7130 deletions

View File

@@ -14,6 +14,8 @@ import mindustry.world.blocks.*;
import mindustry.world.blocks.campaign.*;
import mindustry.world.blocks.defense.*;
import mindustry.world.blocks.defense.turrets.*;
import mindustry.world.blocks.defense.turrets.PointDefenseTurret;
import mindustry.world.blocks.defense.turrets.TractorBeamTurret;
import mindustry.world.blocks.distribution.*;
import mindustry.world.blocks.environment.*;
import mindustry.world.blocks.experimental.*;
@@ -37,8 +39,8 @@ public class Blocks implements ContentList{
//environment
air, spawn, cliff, deepwater, water, taintedWater, tar, slag, stone, craters, charr, sand, darksand, dirt, mud, ice, snow, darksandTaintedWater, space,
dacite, stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, shaleBoulder, sandBoulder, daciteBoulder, grass, salt,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, basalt, magmarock, hotrock, snowWall, boulder, snowBoulder, saltWall,
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, grass, salt,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
pebbles, tendrils,
@@ -100,6 +102,8 @@ public class Blocks implements ContentList{
{
alwaysReplace = true;
hasShadow = false;
useColor = false;
wall = this;
}
@Override public void drawBase(Tile tile){}
@@ -119,6 +123,7 @@ public class Blocks implements ContentList{
spawn = new OverlayFloor("spawn"){
{
variants = 0;
needsSurface = false;
}
@Override
public void drawBase(Tile tile){}
@@ -169,12 +174,14 @@ public class Blocks implements ContentList{
isLiquid = true;
cacheLayer = CacheLayer.water;
albedo = 0.5f;
attributes.set(Attribute.spores, 0.15f);
}};
darksandTaintedWater = new ShallowLiquid("darksand-tainted-water"){{
speedMultiplier = 0.75f;
statusDuration = 60f;
albedo = 0.5f;
attributes.set(Attribute.spores, 0.1f);
}};
sandWater = new ShallowLiquid("sand-water"){{
@@ -315,6 +322,11 @@ public class Blocks implements ContentList{
attributes.set(Attribute.water, 0.3f);
}};
shale = new Floor("shale"){{
variants = 3;
attributes.set(Attribute.oil, 1f);
}};
stoneWall = new StaticWall("stone-wall"){{
variants = 2;
}};
@@ -323,15 +335,6 @@ public class Blocks implements ContentList{
variants = 2;
}};
boulder = new Boulder("boulder"){{
variants = 2;
}};
snowBoulder = new Boulder("snow-boulder"){{
variants = 2;
snow.asFloor().decoration = ice.asFloor().decoration = iceSnow.asFloor().decoration = this;
}};
dirtWall = new StaticWall("dirt-wall"){{
variants = 2;
}};
@@ -361,6 +364,12 @@ public class Blocks implements ContentList{
saltWall = new StaticWall("salt-wall");
shrubs = new StaticWall("shrubs");
shaleWall = new StaticWall("shale-wall"){{
variants = 2;
}};
sporePine = new StaticTree("spore-pine"){{
variants = 0;
}};
@@ -373,8 +382,6 @@ public class Blocks implements ContentList{
variants = 0;
}};
shrubs = new StaticWall("shrubs");
whiteTreeDead = new TreeBlock("white-tree-dead");
whiteTree = new TreeBlock("white-tree");
@@ -383,13 +390,13 @@ public class Blocks implements ContentList{
variants = 3;
}};
shale = new Floor("shale"){{
variants = 3;
attributes.set(Attribute.oil, 1f);
boulder = new Boulder("boulder"){{
variants = 2;
}};
shaleWall = new StaticWall("shale-wall"){{
snowBoulder = new Boulder("snow-boulder"){{
variants = 2;
snow.asFloor().decoration = ice.asFloor().decoration = iceSnow.asFloor().decoration = salt.asFloor().decoration = this;
}};
shaleBoulder = new Boulder("shale-boulder"){{
@@ -579,7 +586,7 @@ public class Blocks implements ContentList{
phaseWeaver = new GenericCrafter("phase-weaver"){{
requirements(Category.crafting, with(Items.silicon, 130, Items.lead, 120, Items.thorium, 75));
craftEffect = Fx.smeltsmoke;
outputItem = new ItemStack(Items.phasefabric, 1);
outputItem = new ItemStack(Items.phaseFabric, 1);
craftTime = 120f;
size = 2;
hasPower = true;
@@ -593,7 +600,7 @@ public class Blocks implements ContentList{
surgeSmelter = new GenericSmelter("alloy-smelter"){{
requirements(Category.crafting, with(Items.silicon, 80, Items.lead, 80, Items.thorium, 70));
craftEffect = Fx.smeltsmoke;
outputItem = new ItemStack(Items.surgealloy, 1);
outputItem = new ItemStack(Items.surgeAlloy, 1);
craftTime = 75f;
size = 3;
hasPower = true;
@@ -672,7 +679,7 @@ public class Blocks implements ContentList{
}};
disassembler = new Separator("disassembler"){{
requirements(Category.crafting, with(Items.graphite, 140, Items.titanium, 100, Items.silicon, 150, Items.surgealloy, 70));
requirements(Category.crafting, with(Items.graphite, 140, Items.titanium, 100, Items.silicon, 150, Items.surgeAlloy, 70));
results = with(
Items.sand, 4,
Items.graphite, 2,
@@ -790,20 +797,22 @@ public class Blocks implements ContentList{
}};
phaseWall = new Wall("phase-wall"){{
requirements(Category.defense, with(Items.phasefabric, 6));
requirements(Category.defense, with(Items.phaseFabric, 6));
health = 150 * wallHealthMultiplier;
flashHit = deflect = true;
chanceDeflect = 10f;
flashHit = true;
}};
phaseWallLarge = new Wall("phase-wall-large"){{
requirements(Category.defense, ItemStack.mult(phaseWall.requirements, 4));
health = 150 * 4 * wallHealthMultiplier;
size = 2;
flashHit = deflect = true;
chanceDeflect = 10f;
flashHit = true;
}};
surgeWall = new Wall("surge-wall"){{
requirements(Category.defense, with(Items.surgealloy, 6));
requirements(Category.defense, with(Items.surgeAlloy, 6));
health = 230 * wallHealthMultiplier;
lightningChance = 0.05f;
}};
@@ -881,25 +890,25 @@ public class Blocks implements ContentList{
healPercent = 11f;
phaseBoost = 15f;
health = 80 * size * size;
consumes.item(Items.phasefabric).boost();
consumes.item(Items.phaseFabric).boost();
}};
overdriveProjector = new OverdriveProjector("overdrive-projector"){{
requirements(Category.effect, with(Items.lead, 100, Items.titanium, 75, Items.silicon, 75, Items.plastanium, 30));
consumes.power(3.50f);
size = 2;
consumes.item(Items.phasefabric).boost();
consumes.item(Items.phaseFabric).boost();
}};
overdriveDome = new OverdriveProjector("overdrive-dome"){{
requirements(Category.effect, with(Items.lead, 200, Items.titanium, 130, Items.silicon, 130, Items.plastanium, 80, Items.surgealloy, 120));
requirements(Category.effect, with(Items.lead, 200, Items.titanium, 130, Items.silicon, 130, Items.plastanium, 80, Items.surgeAlloy, 120));
consumes.power(10f);
size = 3;
range = 200f;
speedBoost = 2.5f;
useTime = 300f;
hasBoost = false;
consumes.items(with(Items.phasefabric, 1, Items.silicon, 1));
consumes.items(with(Items.phaseFabric, 1, Items.silicon, 1));
}};
forceProjector = new ForceProjector("force-projector"){{
@@ -912,15 +921,15 @@ public class Blocks implements ContentList{
cooldownLiquid = 1.2f;
cooldownBrokenBase = 0.35f;
consumes.item(Items.phasefabric).boost();
consumes.item(Items.phaseFabric).boost();
consumes.power(4f);
}};
shockMine = new ShockMine("shock-mine"){{
requirements(Category.effect, with(Items.lead, 25, Items.silicon, 12));
hasShadow = false;
health = 40;
damage = 23;
health = 50;
damage = 25;
tileDamage = 7f;
length = 10;
tendrils = 4;
@@ -974,7 +983,7 @@ public class Blocks implements ContentList{
}};
phaseConveyor = new ItemBridge("phase-conveyor"){{
requirements(Category.distribution, with(Items.phasefabric, 5, Items.silicon, 7, Items.lead, 10, Items.graphite, 10));
requirements(Category.distribution, with(Items.phaseFabric, 5, Items.silicon, 7, Items.lead, 10, Items.graphite, 10));
range = 12;
canOverdrive = false;
hasPower = true;
@@ -1100,7 +1109,7 @@ public class Blocks implements ContentList{
}};
phaseConduit = new LiquidBridge("phase-conduit"){{
requirements(Category.liquid, with(Items.phasefabric, 5, Items.silicon, 7, Items.metaglass, 20, Items.titanium, 10));
requirements(Category.liquid, with(Items.phaseFabric, 5, Items.silicon, 7, Items.metaglass, 20, Items.titanium, 10));
range = 12;
hasPower = true;
canOverdrive = false;
@@ -1124,7 +1133,7 @@ public class Blocks implements ContentList{
}};
surgeTower = new PowerNode("surge-tower"){{
requirements(Category.power, with(Items.titanium, 7, Items.lead, 10, Items.silicon, 15, Items.surgealloy, 15));
requirements(Category.power, with(Items.titanium, 7, Items.lead, 10, Items.silicon, 15, Items.surgeAlloy, 15));
size = 2;
maxNodes = 2;
laserRange = 40f;
@@ -1181,7 +1190,7 @@ public class Blocks implements ContentList{
}};
rtgGenerator = new DecayGenerator("rtg-generator"){{
requirements(Category.power, with(Items.lead, 100, Items.silicon, 75, Items.phasefabric, 25, Items.plastanium, 75, Items.thorium, 50));
requirements(Category.power, with(Items.lead, 100, Items.silicon, 75, Items.phaseFabric, 25, Items.plastanium, 75, Items.thorium, 50));
size = 2;
powerProduction = 4.5f;
itemDuration = 60 * 15f;
@@ -1193,7 +1202,7 @@ public class Blocks implements ContentList{
}};
largeSolarPanel = new SolarGenerator("solar-panel-large"){{
requirements(Category.power, with(Items.lead, 100, Items.silicon, 145, Items.phasefabric, 15));
requirements(Category.power, with(Items.lead, 100, Items.silicon, 145, Items.phaseFabric, 15));
size = 3;
powerProduction = 0.95f;
}};
@@ -1210,7 +1219,7 @@ public class Blocks implements ContentList{
}};
impactReactor = new ImpactReactor("impact-reactor"){{
requirements(Category.power, with(Items.lead, 500, Items.silicon, 300, Items.graphite, 400, Items.thorium, 100, Items.surgealloy, 250, Items.metaglass, 250));
requirements(Category.power, with(Items.lead, 500, Items.silicon, 300, Items.graphite, 400, Items.thorium, 100, Items.surgeAlloy, 250, Items.metaglass, 250));
size = 4;
health = 900;
powerProduction = 130f;
@@ -1321,7 +1330,7 @@ public class Blocks implements ContentList{
//region storage
coreShard = new CoreBlock("core-shard"){{
requirements(Category.effect, BuildVisibility.hidden, with(Items.copper, 2000, Items.lead, 1000));
requirements(Category.effect, BuildVisibility.editorOnly, with(Items.copper, 2000, Items.lead, 1000));
alwaysUnlocked = true;
unitType = UnitTypes.alpha;
@@ -1353,19 +1362,21 @@ public class Blocks implements ContentList{
size = 5;
unitCapModifier = 20;
researchCostMultiplier = 0.06f;
researchCostMultiplier = 0.05f;
}};
vault = new StorageBlock("vault"){{
requirements(Category.effect, with(Items.titanium, 250, Items.thorium, 125));
size = 3;
itemCapacity = 1000;
flags = EnumSet.of(BlockFlag.storage);
}};
container = new StorageBlock("container"){{
requirements(Category.effect, with(Items.titanium, 100));
size = 2;
itemCapacity = 300;
flags = EnumSet.of(BlockFlag.storage);
}};
unloader = new Unloader("unloader"){{
@@ -1534,10 +1545,10 @@ public class Blocks implements ContentList{
hasPower = true;
size = 2;
force = 5f;
scaledForce = 5.5f;
range = 160f;
damage = 0.4f;
force = 7f;
scaledForce = 7f;
range = 220f;
damage = 0.3f;
health = 160 * size * size;
rotateSpeed = 10;
@@ -1549,7 +1560,7 @@ public class Blocks implements ContentList{
ammo(
Items.blastCompound, Bullets.missileExplosive,
Items.pyratite, Bullets.missileIncendiary,
Items.surgealloy, Bullets.missileSurge
Items.surgeAlloy, Bullets.missileSurge
);
reloadTime = 30f;
shots = 4;
@@ -1588,7 +1599,7 @@ public class Blocks implements ContentList{
}};
segment = new PointDefenseTurret("segment"){{
requirements(Category.turret, with(Items.silicon, 130, Items.thorium, 80, Items.phasefabric, 40));
requirements(Category.turret, with(Items.silicon, 130, Items.thorium, 80, Items.phaseFabric, 40));
health = 250 * size * size;
range = 160f;
@@ -1642,11 +1653,22 @@ public class Blocks implements ContentList{
float brange = range + 10f;
ammo(Items.thorium, new ShrapnelBulletType(){{
ammo(
Items.titanium, new ShrapnelBulletType(){{
length = brange;
damage = 66f;
ammoMultiplier = 4f;
width = 17f;
reloadMultiplier = 1.3f;
}},
Items.thorium, new ShrapnelBulletType(){{
length = brange;
damage = 105f;
ammoMultiplier = 6f;
}});
ammoMultiplier = 5f;
toColor = Pal.thoriumPink;
shootEffect = smokeEffect = Fx.thoriumShoot;
}}
);
}};
ripple = new ItemTurret("ripple"){{
@@ -1685,7 +1707,7 @@ public class Blocks implements ContentList{
Items.metaglass, Bullets.fragGlass,
Items.blastCompound, Bullets.fragExplosive,
Items.plastanium, Bullets.fragPlastic,
Items.surgealloy, Bullets.fragSurge
Items.surgeAlloy, Bullets.fragSurge
);
xRand = 4f;
reloadTime = 8f;
@@ -1703,9 +1725,9 @@ public class Blocks implements ContentList{
foreshadow = new ItemTurret("foreshadow"){{
float brange = range = 500f;
requirements(Category.turret, with(Items.copper, 1000, Items.metaglass, 600, Items.surgealloy, 300, Items.plastanium, 200, Items.silicon, 600));
requirements(Category.turret, with(Items.copper, 1000, Items.metaglass, 600, Items.surgeAlloy, 300, Items.plastanium, 200, Items.silicon, 600));
ammo(
Items.surgealloy, new PointBulletType(){{
Items.surgeAlloy, new PointBulletType(){{
shootEffect = Fx.instShoot;
hitEffect = Fx.instHit;
smokeEffect = Fx.smokeCloud;
@@ -1743,7 +1765,7 @@ public class Blocks implements ContentList{
}};
spectre = new ItemTurret("spectre"){{
requirements(Category.turret, with(Items.copper, 900, Items.graphite, 300, Items.surgealloy, 250, Items.plastanium, 175, Items.thorium, 250));
requirements(Category.turret, with(Items.copper, 900, Items.graphite, 300, Items.surgeAlloy, 250, Items.plastanium, 175, Items.thorium, 250));
ammo(
Items.graphite, Bullets.standardDenseBig,
Items.pyratite, Bullets.standardIncendiaryBig,
@@ -1769,7 +1791,7 @@ public class Blocks implements ContentList{
}};
meltdown = new LaserTurret("meltdown"){{
requirements(Category.turret, with(Items.copper, 1200, Items.lead, 350, Items.graphite, 300, Items.surgealloy, 325, Items.silicon, 325));
requirements(Category.turret, with(Items.copper, 1200, Items.lead, 350, Items.graphite, 300, Items.surgeAlloy, 325, Items.silicon, 325));
shootEffect = Fx.shootBigSmoke2;
shootCone = 40f;
recoilAmount = 4f;
@@ -1877,7 +1899,7 @@ public class Blocks implements ContentList{
}};
exponentialReconstructor = new Reconstructor("exponential-reconstructor"){{
requirements(Category.units, with(Items.lead, 2000, Items.silicon, 1000, Items.titanium, 2000, Items.thorium, 750, Items.plastanium, 450, Items.phasefabric, 600));
requirements(Category.units, with(Items.lead, 2000, Items.silicon, 1000, Items.titanium, 2000, Items.thorium, 750, Items.plastanium, 450, Items.phaseFabric, 600));
size = 7;
consumes.power(13f);
@@ -1898,11 +1920,11 @@ public class Blocks implements ContentList{
}};
tetrativeReconstructor = new Reconstructor("tetrative-reconstructor"){{
requirements(Category.units, with(Items.lead, 4000, Items.silicon, 3000, Items.thorium, 1000, Items.plastanium, 600, Items.phasefabric, 600, Items.surgealloy, 800));
requirements(Category.units, with(Items.lead, 4000, Items.silicon, 3000, Items.thorium, 1000, Items.plastanium, 600, Items.phaseFabric, 600, Items.surgeAlloy, 800));
size = 9;
consumes.power(25f);
consumes.items(with(Items.silicon, 1000, Items.plastanium, 600, Items.surgealloy, 500, Items.phasefabric, 350));
consumes.items(with(Items.silicon, 1000, Items.plastanium, 600, Items.surgeAlloy, 500, Items.phaseFabric, 350));
consumes.liquid(Liquids.cryofluid, 3f);
constructTime = 60f * 60f * 4;
@@ -1912,7 +1934,7 @@ public class Blocks implements ContentList{
new UnitType[]{UnitTypes.antumbra, UnitTypes.eclipse},
new UnitType[]{UnitTypes.arkyid, UnitTypes.toxopid},
new UnitType[]{UnitTypes.scepter, UnitTypes.reign},
new UnitType[] {UnitTypes.sei, UnitTypes.omura},
new UnitType[]{UnitTypes.sei, UnitTypes.omura},
new UnitType[]{UnitTypes.quad, UnitTypes.oct},
new UnitType[]{UnitTypes.vela, UnitTypes.corvus}
);
@@ -1971,8 +1993,8 @@ public class Blocks implements ContentList{
illuminator = new LightBlock("illuminator"){{
requirements(Category.effect, BuildVisibility.lightingOnly, with(Items.graphite, 12, Items.silicon, 8));
brightness = 0.67f;
radius = 140f;
brightness = 0.75f;
radius = 160f;
consumes.power(0.06f);
}};
@@ -2017,7 +2039,7 @@ public class Blocks implements ContentList{
}};
microProcessor = new LogicBlock("micro-processor"){{
requirements(Category.logic, with(Items.copper, 80, Items.lead, 50, Items.silicon, 50));
requirements(Category.logic, with(Items.copper, 80, Items.lead, 50, Items.silicon, 30));
instructionsPerTick = 2;
@@ -2025,7 +2047,7 @@ public class Blocks implements ContentList{
}};
logicProcessor = new LogicBlock("logic-processor"){{
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 100, Items.graphite, 60, Items.thorium, 50));
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 60, Items.graphite, 60, Items.thorium, 50));
instructionsPerTick = 8;
@@ -2035,7 +2057,7 @@ public class Blocks implements ContentList{
}};
hyperProcessor = new LogicBlock("hyper-processor"){{
requirements(Category.logic, with(Items.lead, 450, Items.silicon, 150, Items.thorium, 75, Items.surgealloy, 50));
requirements(Category.logic, with(Items.lead, 450, Items.silicon, 130, Items.thorium, 75, Items.surgeAlloy, 50));
consumes.liquid(Liquids.cryofluid, 0.08f);
hasLiquids = true;
@@ -2054,7 +2076,7 @@ public class Blocks implements ContentList{
}};
memoryBank = new MemoryBlock("memory-bank"){{
requirements(Category.logic, with(Items.graphite, 80, Items.silicon, 80, Items.phasefabric, 30));
requirements(Category.logic, with(Items.graphite, 80, Items.silicon, 80, Items.phaseFabric, 30));
memoryCapacity = 512;
size = 2;
@@ -2069,7 +2091,7 @@ public class Blocks implements ContentList{
}};
largeLogicDisplay = new LogicDisplay("large-logic-display"){{
requirements(Category.logic, with(Items.lead, 200, Items.silicon, 150, Items.metaglass, 100, Items.phasefabric, 75));
requirements(Category.logic, with(Items.lead, 200, Items.silicon, 150, Items.metaglass, 100, Items.phaseFabric, 75));
displaySize = 176;

View File

@@ -30,14 +30,14 @@ public class Bullets implements ContentList{
missileExplosive, missileIncendiary, missileSurge,
//standard
standardCopper, standardDense, standardThorium, standardHoming, standardIncendiary, standardMechSmall,
standardGlaive, standardDenseBig, standardThoriumBig, standardIncendiaryBig,
standardCopper, standardDense, standardThorium, standardHoming, standardIncendiary,
standardDenseBig, standardThoriumBig, standardIncendiaryBig,
//liquid
waterShot, cryoShot, slagShot, oilShot, heavyWaterShot, heavyCryoShot, heavySlagShot, heavyOilShot,
//environment, misc.
damageLightning, damageLightningGround, fireball, basicFlame, pyraFlame, driverBolt, healBullet, healBulletBig, frag;
damageLightning, damageLightningGround, fireball, basicFlame, pyraFlame, driverBolt, healBullet, healBulletBig;
@Override
public void load(){
@@ -102,6 +102,7 @@ public class Bullets implements ContentList{
status = StatusEffects.burning;
frontColor = Pal.lightishOrange;
backColor = Pal.lightOrange;
makeFire = true;
trailEffect = Fx.incendTrail;
}};
@@ -265,6 +266,7 @@ public class Bullets implements ContentList{
homingPower = 0.08f;
splashDamageRadius = 20f;
splashDamage = 20f;
makeFire = true;
hitEffect = Fx.blastExplosion;
status = StatusEffects.burning;
}};
@@ -278,6 +280,7 @@ public class Bullets implements ContentList{
splashDamage = 25f;
hitEffect = Fx.blastExplosion;
despawnEffect = Fx.blastExplosion;
lightningDamage = 10;
lightning = 2;
lightningLength = 10;
}};
@@ -323,27 +326,11 @@ public class Bullets implements ContentList{
frontColor = Pal.lightishOrange;
backColor = Pal.lightOrange;
status = StatusEffects.burning;
makeFire = true;
inaccuracy = 3f;
lifetime = 60f;
}};
standardGlaive = new BasicBulletType(4f, 7.5f, "bullet"){{
width = 10f;
height = 12f;
frontColor = Color.valueOf("feb380");
backColor = Color.valueOf("ea8878");
status = StatusEffects.burning;
lifetime = 60f;
}};
standardMechSmall = new BasicBulletType(4f, 9, "bullet"){{
width = 11f;
height = 14f;
lifetime = 40f;
inaccuracy = 5f;
despawnEffect = Fx.hitBulletSmall;
}};
standardDenseBig = new BasicBulletType(7f, 55, "bullet"){{
width = 15f;
height = 21f;
@@ -365,6 +352,7 @@ public class Bullets implements ContentList{
backColor = Pal.lightOrange;
status = StatusEffects.burning;
shootEffect = Fx.shootBig;
makeFire = true;
pierceCap = 2;
pierceBuilding = true;
}};
@@ -437,7 +425,7 @@ public class Bullets implements ContentList{
}
};
basicFlame = new BulletType(3.35f, 15f){{
basicFlame = new BulletType(3.35f, 16f){{
ammoMultiplier = 3f;
hitSize = 7f;
lifetime = 18f;
@@ -452,7 +440,7 @@ public class Bullets implements ContentList{
hittable = false;
}};
pyraFlame = new BulletType(3.35f, 22f){{
pyraFlame = new BulletType(3.35f, 25f){{
ammoMultiplier = 4f;
hitSize = 7f;
lifetime = 18f;
@@ -491,7 +479,7 @@ public class Bullets implements ContentList{
drag = 0.001f;
ammoMultiplier = 2f;
statusDuration = 60f * 4f;
damage = 0.1f;
damage = 0.2f;
}};
heavyCryoShot = new LiquidBulletType(Liquids.cryofluid){{
@@ -502,7 +490,7 @@ public class Bullets implements ContentList{
drag = 0.001f;
ammoMultiplier = 2f;
statusDuration = 60f * 4f;
damage = 0.1f;
damage = 0.2f;
}};
heavySlagShot = new LiquidBulletType(Liquids.slag){{
@@ -524,17 +512,9 @@ public class Bullets implements ContentList{
drag = 0.001f;
ammoMultiplier = 2f;
statusDuration = 60f * 4f;
damage = 0.1f;
damage = 0.2f;
}};
driverBolt = new MassDriverBolt();
frag = new BasicBulletType(5f, 8, "bullet"){{
width = 8f;
height = 9f;
shrinkY = 0.5f;
lifetime = 50f;
drag = 0.04f;
}};
}
}

View File

@@ -56,7 +56,7 @@ public class Fx{
mixcol(Pal.accent, 1f);
alpha(e.fout());
rect(block ? ((BlockUnitc)select).tile().block.icon(Cicon.full) : select.type().icon(Cicon.full), select.x, select.y, block ? 0f : select.rotation - 90f);
rect(block ? ((BlockUnitc)select).tile().block.icon(Cicon.full) : select.type.icon(Cicon.full), select.x, select.y, block ? 0f : select.rotation - 90f);
alpha(1f);
Lines.stroke(e.fslope() * 1f);
Lines.square(select.x, select.y, e.fout() * select.hitSize * 2f, 45);
@@ -66,7 +66,7 @@ public class Fx{
}),
unitDespawn = new Effect(100f, e -> {
if(!(e.data instanceof Unit) || e.<Unit>data().type() == null) return;
if(!(e.data instanceof Unit) || e.<Unit>data().type == null) return;
Unit select = e.data();
float scl = e.fout(Interp.pow2Out);
@@ -74,7 +74,7 @@ public class Fx{
Draw.scl *= scl;
mixcol(Pal.accent, 1f);
rect(select.type().icon(Cicon.full), select.x, select.y, select.rotation - 90f);
rect(select.type.icon(Cicon.full), select.x, select.y, select.rotation - 90f);
reset();
Draw.scl = p;
@@ -257,33 +257,33 @@ public class Fx{
randLenVectors(e.id, 9, 3 + 20f * e.finpow(), (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.4f);
});
}).ground(),
}).layer(Layer.debris),
unitLand = new Effect(30, e -> {
color(Tmp.c1.set(e.color).mul(1.1f));
randLenVectors(e.id, 6, 17f * e.finpow(), (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.3f);
});
}).ground(),
}).layer(Layer.debris),
unitLandSmall = new Effect(30, e -> {
color(Tmp.c1.set(e.color).mul(1.1f));
randLenVectors(e.id, (int)(6 * e.rotation), 12f * e.finpow() * e.rotation, (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.1f);
});
}).ground(),
}).layer(Layer.debris),
unitPickup = new Effect(18, e -> {
color(Pal.lightishGray);
stroke(e.fin() * 2f);
Lines.poly(e.x, e.y, 4, 13f * e.fout());
}).ground(),
}).layer(Layer.debris),
landShock = new Effect(12, e -> {
color(Pal.lancerLaser);
stroke(e.fout() * 3f);
Lines.poly(e.x, e.y, 12, 20f * e.fout());
}).ground(),
}).layer(Layer.debris),
pickup = new Effect(18, e -> {
color(Pal.lightishGray);
@@ -1076,7 +1076,7 @@ public class Fx{
e.y + trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
1f, 2f, rot + e.fin() * 50f * i);
}).ground(400f),
}).layer(Layer.debris, 400f),
shellEjectMedium = new Effect(34f, e -> {
color(Pal.lightOrange, Color.lightGray, Pal.lightishGray, e.fin());
@@ -1099,7 +1099,7 @@ public class Fx{
});
}
}).ground(400f),
}).layer(Layer.debris, 400f),
shellEjectBig = new Effect(22f, e -> {
color(Pal.lightOrange, Color.lightGray, Pal.lightishGray, e.fin());
@@ -1123,7 +1123,7 @@ public class Fx{
});
}
}).ground(400f),
}).layer(Layer.debris, 400f),
railShoot = new Effect(24f, e -> {
e.scaled(10f, b -> {
@@ -1217,7 +1217,15 @@ public class Fx{
randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 50f, (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 5f + 2f);
});
}),
thoriumShoot = new Effect(12f, e -> {
color(Color.white, Pal.thoriumPink, e.fin());
stroke(e.fout() * 1.2f + 0.5f);
randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 50f, (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 5f + 2f);
});
}),
reactorsmoke = new Effect(17, e -> {
@@ -1293,6 +1301,14 @@ public class Fx{
});
}),
coreBurn = new Effect(23, e -> {
randLenVectors(e.id, 5, e.fin() * 9f, (x, y) -> {
float len = e.fout() * 4f;
color(Pal.accent, Color.gray, e.fin());
Fill.circle(e.x + x, e.y + y, len/2f);
});
}),
plasticburn = new Effect(40, e -> {
randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> {
color(Color.valueOf("e9ead3"), Color.gray, e.fin());
@@ -1484,7 +1500,7 @@ public class Fx{
color(Tmp.c1.set(e.color).mul(1.5f));
stroke(e.fout() * 1.4f);
Lines.circle(e.x, e.y, (2f + e.fin() * 4f) * e.rotation);
}).ground(),
}).layer(Layer.debris),
bubble = new Effect(20, e -> {
color(Tmp.c1.set(e.color).shiftValue(0.1f));

View File

@@ -5,7 +5,7 @@ import mindustry.ctype.*;
import mindustry.type.*;
public class Items implements ContentList{
public static Item scrap, copper, lead, graphite, coal, titanium, thorium, silicon, plastanium, phasefabric, surgealloy,
public static Item scrap, copper, lead, graphite, coal, titanium, thorium, silicon, plastanium, phaseFabric, surgeAlloy,
sporePod, sand, blastCompound, pyratite, metaglass;
@Override
@@ -66,12 +66,12 @@ public class Items implements ContentList{
cost = 1.3f;
}};
phasefabric = new Item("phase-fabric", Color.valueOf("f4ba6e")){{
phaseFabric = new Item("phase-fabric", Color.valueOf("f4ba6e")){{
cost = 1.3f;
radioactivity = 0.6f;
}};
surgealloy = new Item("surge-alloy", Color.valueOf("f3e979")){{
surgeAlloy = new Item("surge-alloy", Color.valueOf("f3e979")){{
}};
sporePod = new Item("spore-pod", Color.valueOf("7457ce")){{

View File

@@ -17,8 +17,9 @@ public class SectorPresets implements ContentList{
groundZero = new SectorPreset("groundZero", serpulo, 15){{
alwaysUnlocked = true;
addStartingItems = true;
captureWave = 10;
difficulty = 0;
difficulty = 1;
}};
saltFlats = new SectorPreset("saltFlats", serpulo, 101){{
@@ -26,23 +27,23 @@ public class SectorPresets implements ContentList{
}};
frozenForest = new SectorPreset("frozenForest", serpulo, 86){{
captureWave = 40;
difficulty = 1;
captureWave = 20;
difficulty = 2;
}};
craters = new SectorPreset("craters", serpulo, 18){{
captureWave = 40;
captureWave = 20;
difficulty = 2;
}};
ruinousShores = new SectorPreset("ruinousShores", serpulo, 19){{
captureWave = 40;
captureWave = 30;
difficulty = 3;
}};
stainedMountains = new SectorPreset("stainedMountains", serpulo, 20){{
captureWave = 30;
difficulty = 2;
difficulty = 3;
}};
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
@@ -54,7 +55,7 @@ public class SectorPresets implements ContentList{
}};
tarFields = new SectorPreset("tarFields", serpulo, 23){{
captureWave = 40;
captureWave = 50;
difficulty = 5;
}};

View File

@@ -6,6 +6,8 @@ import arc.math.*;
import mindustry.ctype.*;
import mindustry.game.EventType.*;
import mindustry.type.*;
import mindustry.graphics.*;
import static mindustry.Vars.*;
@@ -18,6 +20,7 @@ public class StatusEffects implements ContentList{
none = new StatusEffect("none");
burning = new StatusEffect("burning"){{
color = Pal.lightFlame;
damage = 0.12f; //over 8 seconds, this would be 60 damage
effect = Fx.burning;
@@ -32,6 +35,7 @@ public class StatusEffects implements ContentList{
}};
freezing = new StatusEffect("freezing"){{
color = Color.valueOf("6ecdec");
speedMultiplier = 0.6f;
healthMultiplier = 0.8f;
effect = Fx.freezing;
@@ -47,10 +51,12 @@ public class StatusEffects implements ContentList{
}};
unmoving = new StatusEffect("unmoving"){{
color = Pal.gray;
speedMultiplier = 0.001f;
}};
slow = new StatusEffect("slow"){{
color = Pal.lightishGray;
speedMultiplier = 0.4f;
}};
@@ -80,6 +86,7 @@ public class StatusEffects implements ContentList{
}};
melting = new StatusEffect("melting"){{
color = Color.valueOf("ffa166");
speedMultiplier = 0.8f;
healthMultiplier = 0.8f;
damage = 0.3f;
@@ -92,6 +99,7 @@ public class StatusEffects implements ContentList{
}};
sapped = new StatusEffect("sapped"){{
color = Pal.sap;
speedMultiplier = 0.7f;
healthMultiplier = 0.8f;
effect = Fx.sapped;
@@ -99,12 +107,14 @@ public class StatusEffects implements ContentList{
}};
sporeSlowed = new StatusEffect("spore-slowed"){{
color = Pal.spore;
speedMultiplier = 0.8f;
effect = Fx.sapped;
effectChance = 0.04f;
}};
tarred = new StatusEffect("tarred"){{
color = Color.valueOf("313131");
speedMultiplier = 0.6f;
effect = Fx.oily;
@@ -115,6 +125,7 @@ public class StatusEffects implements ContentList{
}};
overdrive = new StatusEffect("overdrive"){{
color = Pal.accent;
healthMultiplier = 0.95f;
speedMultiplier = 1.15f;
damageMultiplier = 1.4f;
@@ -124,6 +135,7 @@ public class StatusEffects implements ContentList{
}};
overclock = new StatusEffect("overclock"){{
color = Pal.accent;
speedMultiplier = 1.15f;
damageMultiplier = 1.15f;
reloadMultiplier = 1.25f;
@@ -132,20 +144,27 @@ public class StatusEffects implements ContentList{
}};
shielded = new StatusEffect("shielded"){{
color = Pal.accent;
healthMultiplier = 3f;
}};
boss = new StatusEffect("boss"){{
color = Pal.health;
permanent = true;
damageMultiplier = 2f;
healthMultiplier = 2f;
damageMultiplier = 1.5f;
healthMultiplier = 1.5f;
}};
shocked = new StatusEffect("shocked");
shocked = new StatusEffect("shocked"){{
color = Pal.lancerLaser;
}};
blasted = new StatusEffect("blasted");
blasted = new StatusEffect("blasted"){{
color = Color.valueOf("ff795e");
}};
corroded = new StatusEffect("corroded"){{
color = Pal.plastanium;
damage = 0.1f;
}};
}

View File

@@ -112,7 +112,7 @@ public class TechTree implements ContentList{
node(Items.graphite, with(Items.coal, 1000), () -> {
node(graphitePress, () -> {
node(Items.titanium, with(Items.graphite, 6000, Items.copper, 10000, Items.lead, 10000), () -> {
node(Items.titanium, with(Items.graphite, 3000, Items.copper, 7000, Items.lead, 7000), () -> {
node(pneumaticDrill, () -> {
node(Items.sporePod, with(Items.coal, 5000, Items.graphite, 5000, Items.lead, 5000), () -> {
node(cultivator, () -> {
@@ -161,7 +161,7 @@ public class TechTree implements ContentList{
node(Items.plastanium, with(Items.titanium, 10000, Items.silicon, 10000), () -> {
node(plastaniumCompressor, () -> {
node(Items.phasefabric, with(Items.thorium, 15000, Items.sand, 30000, Items.silicon, 5000), () -> {
node(Items.phaseFabric, with(Items.thorium, 15000, Items.sand, 30000, Items.silicon, 5000), () -> {
node(phaseWeaver, () -> {
});
@@ -177,7 +177,7 @@ public class TechTree implements ContentList{
node(Items.scrap, with(Items.copper, 20000, Items.sand, 10000), () -> {
node(Liquids.slag, with(Items.scrap, 4000), () -> {
node(melter, () -> {
node(Items.surgealloy, with(Items.thorium, 20000, Items.silicon, 30000, Items.lead, 40000), () -> {
node(Items.surgeAlloy, with(Items.thorium, 20000, Items.silicon, 30000, Items.lead, 40000), () -> {
node(surgeSmelter, () -> {
});
@@ -605,8 +605,6 @@ public class TechTree implements ContentList{
public final ItemStack[] finishedRequirements;
/** Extra objectives needed to research this. */
public Seq<Objective> objectives = new Seq<>();
/** Time required to research this content, in seconds. */
public float time;
/** Nodes that depend on this node. */
public final Seq<TechNode> children = new Seq<>();
@@ -617,7 +615,6 @@ public class TechTree implements ContentList{
this.content = content;
this.requirements = requirements;
this.depth = parent == null ? 0 : parent.depth + 1;
this.time = Seq.with(requirements).mapFloat(i -> i.item.cost * i.amount).sum() * 10;
this.finishedRequirements = new ItemStack[requirements.length];
//load up the requirements that have been finished if settings are available
@@ -632,6 +629,14 @@ public class TechTree implements ContentList{
all.add(this);
}
/** Resets finished requirements and saves. */
public void reset(){
for(ItemStack stack : finishedRequirements){
stack.amount = 0;
}
save();
}
/** Removes this node from the tech tree. */
public void remove(){
all.remove(this);

View File

@@ -10,6 +10,7 @@ import mindustry.entities.bullet.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.type.*;
import mindustry.world.meta.*;
import static mindustry.Vars.*;
@@ -275,7 +276,7 @@ public class UnitTypes implements ContentList{
armor = 1f;
commandLimit = 8;
abilities.add(new HealFieldAbility(10f, 60f * 4, 60f));
abilities.add(new RepairFieldAbility(10f, 60f * 4, 60f));
ammoType = AmmoTypes.power;
weapons.add(new Weapon("heal-weapon"){{
@@ -304,7 +305,7 @@ public class UnitTypes implements ContentList{
mineSpeed = 5f;
commandLimit = 8;
abilities.add(new ShieldFieldAbility(20f, 40f, 60f * 5, 60f));
abilities.add(new ShieldRegenFieldAbility(20f, 40f, 60f * 5, 60f));
ammoType = AmmoTypes.power;
weapons.add(new Weapon("heal-shotgun-weapon"){{
@@ -892,9 +893,9 @@ public class UnitTypes implements ContentList{
drag = 0.01f;
flying = true;
health = 75;
faceTarget = false;
engineOffset = 5.5f;
range = 140f;
targetAir = false;
weapons.add(new Weapon(){{
y = 0f;
@@ -918,6 +919,7 @@ public class UnitTypes implements ContentList{
range = 140f;
faceTarget = false;
armor = 4f;
targetFlag = BlockFlag.factory;
weapons.add(new Weapon(){{
minShootVelocity = 0.75f;
@@ -998,6 +1000,7 @@ public class UnitTypes implements ContentList{
engineOffset = 21;
engineSize = 5.3f;
hitSize = 56f;
targetFlag = BlockFlag.battery;
BulletType missiles = new MissileBulletType(2.7f, 10){{
width = 8f;
@@ -1072,6 +1075,7 @@ public class UnitTypes implements ContentList{
hitSize = 58f;
destructibleWreck = false;
armor = 13f;
targetFlag = BlockFlag.reactor;
BulletType fragBullet = new FlakBulletType(4f, 5){{
shootEffect = Fx.shootBig;
@@ -1144,7 +1148,7 @@ public class UnitTypes implements ContentList{
flying = true;
drag = 0.06f;
accel = 0.12f;
speed = 1.1f;
speed = 1.5f;
health = 100;
engineSize = 1.8f;
engineOffset = 5.7f;
@@ -1162,7 +1166,7 @@ public class UnitTypes implements ContentList{
flying = true;
drag = 0.05f;
speed = 1.9f;
speed = 2.6f;
rotateSpeed = 15f;
accel = 0.1f;
range = 130f;
@@ -1171,14 +1175,13 @@ public class UnitTypes implements ContentList{
engineOffset = 6.5f;
hitSize = 8f;
lowAltitude = true;
isCounted = false;
ammoType = AmmoTypes.power;
mineTier = 2;
mineSpeed = 3.5f;
abilities.add(new HealFieldAbility(5f, 60f * 5, 50f));
abilities.add(new RepairFieldAbility(5f, 60f * 5, 50f));
weapons.add(new Weapon("heal-weapon-mount"){{
top = false;
@@ -1217,9 +1220,8 @@ public class UnitTypes implements ContentList{
mineTier = 3;
health = 500;
armor = 2f;
armor = 5f;
speed = 1.8f;
speed = 2.4f;
accel = 0.06f;
drag = 0.017f;
lowAltitude = true;
@@ -1253,7 +1255,7 @@ public class UnitTypes implements ContentList{
quad = new UnitType("quad"){{
armor = 8f;
health = 6000;
speed = 1.2f;
speed = 1.4f;
rotateSpeed = 2f;
accel = 0.05f;
drag = 0.017f;
@@ -1267,6 +1269,7 @@ public class UnitTypes implements ContentList{
buildSpeed = 2.5f;
range = 140f;
targetAir = false;
targetFlag = BlockFlag.battery;
ammoType = AmmoTypes.powerHigh;
@@ -1308,7 +1311,7 @@ public class UnitTypes implements ContentList{
collides = false;
healPercent = 15f;
splashDamage = 320f;
splashDamage = 240f;
splashDamageRadius = 120f;
}};
}});
@@ -1317,7 +1320,7 @@ public class UnitTypes implements ContentList{
oct = new UnitType("oct"){{
armor = 16f;
health = 24000;
speed = 0.6f;
speed = 0.8f;
rotateSpeed = 1f;
accel = 0.04f;
drag = 0.018f;
@@ -1335,7 +1338,7 @@ public class UnitTypes implements ContentList{
ammoCapacity = 1300;
ammoResupplyAmount = 20;
abilities.add(new ForceFieldAbility(140f, 4f, 7000f, 60f * 8), new HealFieldAbility(130f, 60f * 2, 140f));
abilities.add(new ForceFieldAbility(140f, 4f, 7000f, 60f * 8), new RepairFieldAbility(130f, 60f * 2, 140f));
}};
//endregion
@@ -1447,7 +1450,7 @@ public class UnitTypes implements ContentList{
trailY = -9f;
trailScl = 1.5f;
abilities.add(new ShieldFieldAbility(20f, 40f, 60f * 4, 60f));
abilities.add(new ShieldRegenFieldAbility(20f, 40f, 60f * 4, 60f));
weapons.add(new Weapon("large-artillery"){{
reload = 65f;
@@ -1469,13 +1472,13 @@ public class UnitTypes implements ContentList{
trailMult = 0.8f;
hitEffect = Fx.massiveExplosion;
knockback = 1.5f;
lifetime = 140f;
lifetime = 100f;
height = 15.5f;
width = 15f;
collidesTiles = false;
ammoMultiplier = 4f;
splashDamageRadius = 60f;
splashDamage = 85f;
splashDamage = 80f;
backColor = Pal.missileYellowBack;
frontColor = Pal.missileYellow;
trailEffect = Fx.artilleryTrail;
@@ -1564,7 +1567,7 @@ public class UnitTypes implements ContentList{
xRand = 8f;
shotDelay = 1f;
bullet = new MissileBulletType(4.2f, 30){{
bullet = new MissileBulletType(4.2f, 40){{
homingPower = 0.12f;
width = 8f;
height = 8f;
@@ -1572,8 +1575,8 @@ public class UnitTypes implements ContentList{
drag = -0.003f;
homingRange = 80f;
keepVelocity = false;
splashDamageRadius = 30f;
splashDamage = 35f;
splashDamageRadius = 35f;
splashDamage = 45f;
lifetime = 56f;
trailColor = Pal.bulletYellowBack;
backColor = Pal.bulletYellowBack;
@@ -1586,7 +1589,7 @@ public class UnitTypes implements ContentList{
}});
weapons.add(new Weapon("large-bullet-mount"){{
reload = 80f;
reload = 60f;
cooldownTime = 90f;
x = 70f/4f;
y = -66f/4f;
@@ -1601,7 +1604,7 @@ public class UnitTypes implements ContentList{
shots = 3;
shotDelay = 4f;
inaccuracy = 1f;
bullet = new BasicBulletType(7f, 50){{
bullet = new BasicBulletType(7f, 55){{
width = 13f;
height = 19f;
shootEffect = Fx.shootBig;
@@ -1667,15 +1670,15 @@ public class UnitTypes implements ContentList{
isCounted = false;
flying = true;
mineSpeed = 6f;
mineSpeed = 6.5f;
mineTier = 1;
buildSpeed = 0.5f;
drag = 0.05f;
speed = 2.8f;
speed = 3f;
rotateSpeed = 15f;
accel = 0.1f;
itemCapacity = 30;
health = 120f;
health = 150f;
engineOffset = 6f;
hitSize = 8f;
commandLimit = 3;
@@ -1686,13 +1689,13 @@ public class UnitTypes implements ContentList{
y = 1f;
top = false;
bullet = new BasicBulletType(2.5f, 9){{
bullet = new BasicBulletType(2.5f, 10){{
width = 7f;
height = 9f;
lifetime = 60f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.09f;
tileDamageMultiplier = 0.03f;
}};
}});
}};
@@ -1706,11 +1709,11 @@ public class UnitTypes implements ContentList{
mineTier = 1;
buildSpeed = 0.75f;
drag = 0.05f;
speed = 3f;
speed = 3.3f;
rotateSpeed = 17f;
accel = 0.1f;
itemCapacity = 50;
health = 150f;
health = 170f;
engineOffset = 6f;
hitSize = 9f;
rotateShooting = false;
@@ -1727,13 +1730,13 @@ public class UnitTypes implements ContentList{
shotDelay = 4f;
spacing = 0f;
bullet = new BasicBulletType(3f, 9){{
bullet = new BasicBulletType(3f, 10){{
width = 7f;
height = 9f;
lifetime = 60f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.1f;
tileDamageMultiplier = 0.03f;
}};
}});
}};
@@ -1747,13 +1750,13 @@ public class UnitTypes implements ContentList{
mineTier = 2;
buildSpeed = 1f;
drag = 0.05f;
speed = 3.5f;
speed = 3.55f;
rotateSpeed = 19f;
accel = 0.11f;
itemCapacity = 70;
health = 190f;
health = 220f;
engineOffset = 6f;
hitSize = 10f;
hitSize = 11f;
commandLimit = 7;
weapons.add(new Weapon("small-mount-weapon"){{
@@ -1766,13 +1769,13 @@ public class UnitTypes implements ContentList{
inaccuracy = 3f;
shotDelay = 3f;
bullet = new BasicBulletType(3.5f, 9){{
bullet = new BasicBulletType(3.5f, 10){{
width = 6.5f;
height = 11f;
lifetime = 70f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.1f;
tileDamageMultiplier = 0.03f;
homingPower = 0.04f;
}};
}});
@@ -1788,6 +1791,7 @@ public class UnitTypes implements ContentList{
health = 1;
rotateSpeed = 360f;
itemCapacity = 0;
commandLimit = 0;
}
@Override

View File

@@ -1,339 +1,89 @@
package mindustry.content;
import arc.*;
import arc.graphics.*;
import arc.graphics.Texture.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.util.*;
import mindustry.ctype.*;
import mindustry.gen.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.type.weather.*;
import mindustry.world.meta.*;
import static mindustry.Vars.*;
public class Weathers implements ContentList{
public static Weather
rain,
snow,
sandstorm,
sporestorm;
sporestorm,
fog;
@Override
public void load(){
snow = new Weather("snow"){
TextureRegion region;
float yspeed = 2f, xspeed = 0.25f, padding = 16f, size = 12f, density = 1200f;
snow = new ParticleWeather("snow"){{
sizeMax = 13f;
sizeMin = 2.6f;
density = 1200f;
attrs.set(Attribute.light, -0.15f);
}};
{
attrs.set(Attribute.light, -0.15f);
}
rain = new RainWeather("rain"){{
attrs.set(Attribute.light, -0.2f);
attrs.set(Attribute.water, 0.2f);
status = StatusEffects.wet;
}};
@Override
public void load(){
super.load();
sandstorm = new ParticleWeather("sandstorm"){{
color = noiseColor = Color.valueOf("f7cba4");
drawNoise = true;
useWindVector = true;
sizeMax = 140f;
sizeMin = 70f;
minAlpha = 0f;
maxAlpha = 0.2f;
density = 1500f;
baseSpeed = 5.4f;
attrs.set(Attribute.light, -0.1f);
attrs.set(Attribute.water, -0.1f);
opacityMultiplier = 0.8f;
force = 0.1f;
}};
region = Core.atlas.find("circle-shadow");
}
sporestorm = new ParticleWeather("sporestorm"){{
color = noiseColor = Color.valueOf("7457ce");
particleRegion = "circle";
drawNoise = true;
statusGround = false;
useWindVector = true;
sizeMax = 5f;
sizeMin = 2.5f;
minAlpha = 0.1f;
maxAlpha = 0.8f;
density = 2000f;
baseSpeed = 4.3f;
attrs.set(Attribute.spores, 1f);
attrs.set(Attribute.light, -0.15f);
status = StatusEffects.sporeSlowed;
opacityMultiplier = 0.85f;
force = 0.1f;
}};
@Override
public void drawOver(WeatherState state){
rand.setSeed(0);
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
Tmp.r1.grow(padding);
Core.camera.bounds(Tmp.r2);
int total = (int)(Tmp.r1.area() / density * state.intensity());
for(int i = 0; i < total; i++){
float scl = rand.random(0.5f, 1f);
float scl2 = rand.random(0.5f, 1f);
float sscl = rand.random(0.2f, 1f);
float x = (rand.random(0f, world.unitWidth()) + Time.time() * xspeed * scl2);
float y = (rand.random(0f, world.unitHeight()) - Time.time() * yspeed * scl);
x += Mathf.sin(y, rand.random(30f, 80f), rand.random(1f, 7f));
x -= Tmp.r1.x;
y -= Tmp.r1.y;
x = Mathf.mod(x, Tmp.r1.width);
y = Mathf.mod(y, Tmp.r1.height);
x += Tmp.r1.x;
y += Tmp.r1.y;
if(Tmp.r3.setCentered(x, y, size * sscl).overlaps(Tmp.r2)){
Draw.rect(region, x, y, size * sscl, size * sscl);
}
}
}
};
rain = new Weather("rain"){
float yspeed = 5f, xspeed = 1.5f, padding = 16f, size = 40f, density = 1200f;
TextureRegion[] splashes = new TextureRegion[12];
{
attrs.set(Attribute.light, -0.2f);
attrs.set(Attribute.water, 0.2f);
status = StatusEffects.wet;
}
@Override
public void load(){
super.load();
for(int i = 0; i < splashes.length; i++){
splashes[i] = Core.atlas.find("splash-" + i);
}
}
@Override
public void drawOver(WeatherState state){
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
Tmp.r1.grow(padding);
Core.camera.bounds(Tmp.r2);
int total = (int)(Tmp.r1.area() / density * state.intensity());
Lines.stroke(0.75f);
float alpha = Draw.getColor().a;
Draw.color(Color.royal, Color.white, 0.3f);
for(int i = 0; i < total; i++){
float scl = rand.random(0.5f, 1f);
float scl2 = rand.random(0.5f, 1f);
float sscl = rand.random(0.2f, 1f);
float x = (rand.random(0f, world.unitWidth()) + Time.time() * xspeed * scl2);
float y = (rand.random(0f, world.unitHeight()) - Time.time() * yspeed * scl);
float tint = rand.random(1f) * alpha;
x -= Tmp.r1.x;
y -= Tmp.r1.y;
x = Mathf.mod(x, Tmp.r1.width);
y = Mathf.mod(y, Tmp.r1.height);
x += Tmp.r1.x;
y += Tmp.r1.y;
if(Tmp.r3.setCentered(x, y, size * sscl).overlaps(Tmp.r2)){
Draw.alpha(tint);
Lines.lineAngle(x, y, Angles.angle(xspeed * scl2, - yspeed * scl), size*sscl/2f);
}
}
}
@Override
public void drawUnder(WeatherState state){
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
Tmp.r1.grow(padding);
Core.camera.bounds(Tmp.r2);
int total = (int)(Tmp.r1.area() / density * state.intensity()) / 2;
Lines.stroke(0.75f);
float t = Time.time() / 22f;
for(int i = 0; i < total; i++){
float offset = rand.random(0f, 1f);
float time = t + offset;
int pos = (int)((time));
float life = time % 1f;
float x = (rand.random(0f, world.unitWidth()) + pos*953);
float y = (rand.random(0f, world.unitHeight()) - pos*453);
x -= Tmp.r1.x;
y -= Tmp.r1.y;
x = Mathf.mod(x, Tmp.r1.width);
y = Mathf.mod(y, Tmp.r1.height);
x += Tmp.r1.x;
y += Tmp.r1.y;
if(Tmp.r3.setCentered(x, y, life * 4f).overlaps(Tmp.r2)){
Tile tile = world.tileWorld(x, y);
if(tile != null && tile.floor().liquidDrop == Liquids.water){
Draw.color(Tmp.c1.set(tile.floor().mapColor).mul(1.5f).a(state.opacity()));
Draw.rect(splashes[(int)(life * (splashes.length - 1))], x, y);
}else if(tile != null && tile.floor().liquidDrop == null && !tile.floor().solid){
Draw.color(Color.royal, Color.white, 0.3f);
Draw.alpha(Mathf.slope(life) * state.opacity());
float space = 45f;
for(int j : new int[]{-1, 1}){
Tmp.v1.trns(90f + j*space, 1f + 5f * life);
Lines.lineAngle(x + Tmp.v1.x, y + Tmp.v1.y, 90f + j*space, 3f * (1f - life));
}
}
}
}
}
};
sandstorm = new Weather("sandstorm"){
TextureRegion region;
float size = 140f, padding = size, invDensity = 1500f, baseSpeed = 6.1f;
float force = 0.4f * 0;
Color color = Color.valueOf("f7cba4");
Texture noise;
{
attrs.set(Attribute.light, -0.1f);
opacityMultiplier = 0.8f;
}
@Override
public void load(){
region = Core.atlas.find("circle-shadow");
noise = new Texture("sprites/noiseAlpha.png");
noise.setWrap(TextureWrap.repeat);
noise.setFilter(TextureFilter.linear);
}
@Override
public void dispose(){
noise.dispose();
}
@Override
public void update(WeatherState state){
float speed = force * state.intensity;
float windx = state.windVector.x * speed, windy = state.windVector.y * speed;
for(Unit unit : Groups.unit){
unit.impulse(windx, windy);
}
}
@Override
public void drawOver(WeatherState state){
Draw.tint(color);
float speed = baseSpeed * state.intensity;
float windx = state.windVector.x * speed, windy = state.windVector.y * speed;
float scale = 1f / 2000f;
float scroll = Time.time() * scale;
Tmp.tr1.texture = noise;
Core.camera.bounds(Tmp.r1);
Tmp.tr1.set(Tmp.r1.x*scale, Tmp.r1.y*scale, (Tmp.r1.x + Tmp.r1.width)*scale, (Tmp.r1.y + Tmp.r1.height)*scale);
Tmp.tr1.scroll(-windx * scroll, windy * scroll);
Draw.rect(Tmp.tr1, Core.camera.position.x, Core.camera.position.y, Core.camera.width, -Core.camera.height);
rand.setSeed(0);
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
Tmp.r1.grow(padding);
Core.camera.bounds(Tmp.r2);
int total = (int)(Tmp.r1.area() / invDensity * state.intensity());
Draw.tint(color);
float baseAlpha = Draw.getColor().a;
for(int i = 0; i < total; i++){
float scl = rand.random(0.5f, 1f);
float scl2 = rand.random(0.5f, 1f);
float sscl = rand.random(0.5f, 1f);
float x = (rand.random(0f, world.unitWidth()) + Time.time() * windx * scl2);
float y = (rand.random(0f, world.unitHeight()) + Time.time() * windy * scl);
float alpha = rand.random(0.2f);
x += Mathf.sin(y, rand.random(30f, 80f), rand.random(1f, 7f));
x -= Tmp.r1.x;
y -= Tmp.r1.y;
x = Mathf.mod(x, Tmp.r1.width);
y = Mathf.mod(y, Tmp.r1.height);
x += Tmp.r1.x;
y += Tmp.r1.y;
if(Tmp.r3.setCentered(x, y, size * sscl).overlaps(Tmp.r2)){
Draw.alpha(alpha * baseAlpha);
Draw.rect(region, x, y, size * sscl, size * sscl);
}
}
}
};
sporestorm = new Weather("sporestorm"){
TextureRegion region;
float size = 5f, padding = size, invDensity = 2000f, baseSpeed = 4.3f, force = 0.28f * 0;
Color color = Color.valueOf("7457ce");
Texture noise;
{
attrs.set(Attribute.spores, 1f);
attrs.set(Attribute.light, -0.15f);
status = StatusEffects.sporeSlowed;
statusGround = false;
opacityMultiplier = 0.85f;
}
@Override
public void load(){
region = Core.atlas.find("circle-shadow");
noise = new Texture("sprites/noiseAlpha.png");
noise.setWrap(TextureWrap.repeat);
noise.setFilter(TextureFilter.linear);
}
@Override
public void update(WeatherState state){
float speed = force * state.intensity;
float windx = state.windVector.x * speed, windy = state.windVector.y * speed;
for(Unit unit : Groups.unit){
unit.impulse(windx, windy);
}
}
@Override
public void dispose(){
noise.dispose();
}
@Override
public void drawOver(WeatherState state){
Draw.alpha(state.opacity * 0.8f);
Draw.tint(color);
float speed = baseSpeed * state.intensity;
float windx = state.windVector.x * speed, windy = state.windVector.y * speed;
float scale = 1f / 2000f;
float scroll = Time.time() * scale;
Tmp.tr1.texture = noise;
Core.camera.bounds(Tmp.r1);
Tmp.tr1.set(Tmp.r1.x*scale, Tmp.r1.y*scale, (Tmp.r1.x + Tmp.r1.width)*scale, (Tmp.r1.y + Tmp.r1.height)*scale);
Tmp.tr1.scroll(-windx * scroll, windy * scroll);
Draw.rect(Tmp.tr1, Core.camera.position.x, Core.camera.position.y, Core.camera.width, -Core.camera.height);
rand.setSeed(0);
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
Tmp.r1.grow(padding);
Core.camera.bounds(Tmp.r2);
int total = (int)(Tmp.r1.area() / invDensity * state.intensity());
Draw.tint(color);
float baseAlpha = state.opacity;
Draw.alpha(baseAlpha);
for(int i = 0; i < total; i++){
float scl = rand.random(0.5f, 1f);
float scl2 = rand.random(0.5f, 1f);
float sscl = rand.random(0.5f, 1f);
float x = (rand.random(0f, world.unitWidth()) + Time.time() * windx * scl2);
float y = (rand.random(0f, world.unitHeight()) + Time.time() * windy * scl);
float alpha = rand.random(0.1f, 0.8f);
x += Mathf.sin(y, rand.random(30f, 80f), rand.random(1f, 7f));
x -= Tmp.r1.x;
y -= Tmp.r1.y;
x = Mathf.mod(x, Tmp.r1.width);
y = Mathf.mod(y, Tmp.r1.height);
x += Tmp.r1.x;
y += Tmp.r1.y;
if(Tmp.r3.setCentered(x, y, size * sscl).overlaps(Tmp.r2)){
Draw.alpha(alpha * baseAlpha);
Fill.circle(x, y, size * sscl / 2f);
}
}
}
};
fog = new ParticleWeather("fog"){{
duration = 15f * Time.toMinutes;
noiseLayers = 3;
noiseLayerSclM = 0.8f;
noiseLayerAlphaM = 0.7f;
noiseLayerSpeedM = 2f;
noiseLayerSclM = 0.6f;
baseSpeed = 0.05f;
color = noiseColor = Color.grays(0.4f);
noiseScale = 1100f;
noisePath = "fog";
drawParticles = false;
drawNoise = true;
useWindVector = false;
xspeed = 1f;
yspeed = 0.01f;
attrs.set(Attribute.light, -0.3f);
attrs.set(Attribute.water, 0.05f);
opacityMultiplier = 0.47f;
}};
}
}