Partial 7.0 merge - API preview

This commit is contained in:
Anuken
2021-06-02 11:08:08 -04:00
parent ea75a357ca
commit 28b235ef07
531 changed files with 12356 additions and 6286 deletions

View File

@@ -20,6 +20,7 @@ import mindustry.world.blocks.experimental.*;
import mindustry.world.blocks.legacy.*;
import mindustry.world.blocks.liquid.*;
import mindustry.world.blocks.logic.*;
import mindustry.world.blocks.payloads.*;
import mindustry.world.blocks.power.*;
import mindustry.world.blocks.production.*;
import mindustry.world.blocks.sandbox.*;
@@ -36,7 +37,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,
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, boulder, snowBoulder, basaltBoulder, grass, salt,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
@@ -50,7 +52,7 @@ public class Blocks implements ContentList{
melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge,
//sandbox
powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, illuminator,
powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, payloadVoid, payloadSource, illuminator,
//defense
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, plastaniumWall, plastaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
@@ -59,7 +61,8 @@ public class Blocks implements ContentList{
//transport
conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router,
overflowGate, underflowGate, massDriver, payloadConveyor, payloadRouter,
overflowGate, underflowGate, massDriver,
duct, ductRouter, ductBridge,
//liquid
mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, platedConduit, liquidRouter, liquidTank, liquidJunction, bridgeConduit, phaseConduit,
@@ -81,16 +84,20 @@ public class Blocks implements ContentList{
commandCenter,
groundFactory, airFactory, navalFactory,
additiveReconstructor, multiplicativeReconstructor, exponentialReconstructor, tetrativeReconstructor,
repairPoint, resupplyPoint,
repairPoint, repairTurret, resupplyPoint,
//payloads
payloadConveyor, payloadRouter, payloadPropulsionTower,
//logic
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
//campaign
launchPad, launchPadLarge, interplanetaryAccelerator,
launchPad, interplanetaryAccelerator,
//misc experimental
blockForge, blockLoader, blockUnloader;
blockForge, blockLoader, blockUnloader
;
@Override
public void load(){
@@ -361,32 +368,37 @@ public class Blocks implements ContentList{
whiteTree = new TreeBlock("white-tree");
sporeCluster = new Boulder("spore-cluster"){{
sporeCluster = new Prop("spore-cluster"){{
variants = 3;
}};
boulder = new Boulder("boulder"){{
//glowBlob = new Prop("glowblob"){{
// variants = 1;
//}};
boulder = new Prop("boulder"){{
variants = 2;
stone.asFloor().decoration = this;
}};
snowBoulder = new Boulder("snow-boulder"){{
snowBoulder = new Prop("snow-boulder"){{
variants = 2;
snow.asFloor().decoration = ice.asFloor().decoration = iceSnow.asFloor().decoration = salt.asFloor().decoration = this;
}};
shaleBoulder = new Boulder("shale-boulder"){{
shaleBoulder = new Prop("shale-boulder"){{
variants = 2;
}};
sandBoulder = new Boulder("sand-boulder"){{
sandBoulder = new Prop("sand-boulder"){{
variants = 2;
}};
daciteBoulder = new Boulder("dacite-boulder"){{
daciteBoulder = new Prop("dacite-boulder"){{
variants = 2;
}};
basaltBoulder = new Boulder("basalt-boulder"){{
basaltBoulder = new Prop("basalt-boulder"){{
variants = 2;
}};
@@ -491,6 +503,7 @@ public class Blocks implements ContentList{
craftEffect = Fx.pulverizeMedium;
outputItem = new ItemStack(Items.graphite, 2);
craftTime = 30f;
itemCapacity = 20;
size = 3;
hasItems = true;
hasLiquids = true;
@@ -501,7 +514,7 @@ public class Blocks implements ContentList{
consumes.liquid(Liquids.water, 0.1f);
}};
siliconSmelter = new GenericSmelter("silicon-smelter"){{
siliconSmelter = new GenericCrafter("silicon-smelter"){{
requirements(Category.crafting, with(Items.copper, 30, Items.lead, 25));
craftEffect = Fx.smeltsmoke;
outputItem = new ItemStack(Items.silicon, 1);
@@ -509,13 +522,13 @@ public class Blocks implements ContentList{
size = 2;
hasPower = true;
hasLiquids = false;
flameColor = Color.valueOf("ffef99");
drawer = new DrawSmelter(Color.valueOf("ffef99"));
consumes.items(with(Items.coal, 1, Items.sand, 2));
consumes.power(0.50f);
}};
siliconCrucible = new AttributeSmelter("silicon-crucible"){{
siliconCrucible = new AttributeCrafter("silicon-crucible"){{
requirements(Category.crafting, with(Items.titanium, 120, Items.metaglass, 80, Items.plastanium, 35, Items.silicon, 60));
craftEffect = Fx.smeltsmoke;
outputItem = new ItemStack(Items.silicon, 8);
@@ -523,22 +536,22 @@ public class Blocks implements ContentList{
size = 3;
hasPower = true;
hasLiquids = false;
flameColor = Color.valueOf("ffef99");
itemCapacity = 30;
boostScale = 0.15f;
drawer = new DrawSmelter(Color.valueOf("ffef99"));
consumes.items(with(Items.coal, 4, Items.sand, 6, Items.pyratite, 1));
consumes.power(4f);
}};
kiln = new GenericSmelter("kiln"){{
kiln = new GenericCrafter("kiln"){{
requirements(Category.crafting, with(Items.copper, 60, Items.graphite, 30, Items.lead, 30));
craftEffect = Fx.smeltsmoke;
outputItem = new ItemStack(Items.metaglass, 1);
craftTime = 30f;
size = 2;
hasPower = hasItems = true;
flameColor = Color.valueOf("ffc099");
drawer = new DrawSmelter(Color.valueOf("ffc099"));
consumes.items(with(Items.lead, 1, Items.sand, 1));
consumes.power(0.60f);
@@ -579,7 +592,7 @@ public class Blocks implements ContentList{
itemCapacity = 20;
}};
surgeSmelter = new GenericSmelter("alloy-smelter"){{
surgeSmelter = new GenericCrafter("alloy-smelter"){{
requirements(Category.crafting, with(Items.silicon, 80, Items.lead, 80, Items.thorium, 70));
craftEffect = Fx.smeltsmoke;
outputItem = new ItemStack(Items.surgeAlloy, 1);
@@ -587,6 +600,7 @@ public class Blocks implements ContentList{
size = 3;
hasPower = true;
itemCapacity = 20;
drawer = new DrawSmelter();
consumes.power(4f);
consumes.items(with(Items.copper, 3, Items.lead, 4, Items.titanium, 2, Items.silicon, 3));
@@ -610,9 +624,8 @@ public class Blocks implements ContentList{
consumes.liquid(Liquids.water, 0.2f);
}};
pyratiteMixer = new GenericSmelter("pyratite-mixer"){{
pyratiteMixer = new GenericCrafter("pyratite-mixer"){{
requirements(Category.crafting, with(Items.copper, 50, Items.lead, 25));
flameColor = Color.clear;
hasItems = true;
hasPower = true;
outputItem = new ItemStack(Items.pyratite, 1);
@@ -757,7 +770,7 @@ public class Blocks implements ContentList{
plastaniumWall = new Wall("plastanium-wall"){{
requirements(Category.defense, with(Items.plastanium, 5, Items.metaglass, 2));
health = 130 * wallHealthMultiplier;
health = 125 * wallHealthMultiplier;
insulated = true;
absorbLasers = true;
schematicPriority = 10;
@@ -765,7 +778,7 @@ public class Blocks implements ContentList{
plastaniumWallLarge = new Wall("plastanium-wall-large"){{
requirements(Category.defense, ItemStack.mult(plastaniumWall.requirements, 4));
health = 130 * wallHealthMultiplier * 4;
health = 125 * wallHealthMultiplier * 4;
size = 2;
insulated = true;
absorbLasers = true;
@@ -972,7 +985,6 @@ 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));
range = 12;
canOverdrive = false;
hasPower = true;
consumes.power(0.30f);
}};
@@ -1018,14 +1030,20 @@ public class Blocks implements ContentList{
consumes.power(1.75f);
}};
payloadConveyor = new PayloadConveyor("payload-conveyor"){{
requirements(Category.distribution, with(Items.graphite, 10, Items.copper, 20));
canOverdrive = false;
//special transport blocks
duct = new Duct("duct"){{
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 5, Items.copper, 5));
speed = 5f;
}};
payloadRouter = new PayloadRouter("payload-router"){{
requirements(Category.distribution, with(Items.graphite, 15, Items.copper, 20));
canOverdrive = false;
ductRouter = new DuctRouter("duct-router"){{
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 10, Items.copper, 5));
speed = 5f;
}};
ductBridge = new DuctBridge("duct-bridge"){{
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 20, Items.copper, 15));
}};
//endregion
@@ -1294,21 +1312,30 @@ public class Blocks implements ContentList{
liquidCapacity = 30f;
rotateSpeed = 1.4f;
attribute = Attribute.water;
envRequired |= Env.groundWater;
consumes.power(1.5f);
}};
cultivator = new Cultivator("cultivator"){{
cultivator = new AttributeCrafter("cultivator"){{
requirements(Category.production, with(Items.copper, 25, Items.lead, 25, Items.silicon, 10));
outputItem = new ItemStack(Items.sporePod, 1);
craftTime = 140;
craftTime = 100;
size = 2;
hasLiquids = true;
hasPower = true;
hasItems = true;
consumes.power(0.9f);
consumes.liquid(Liquids.water, 0.2f);
craftEffect = Fx.none;
envRequired |= Env.spores;
attribute = Attribute.spores;
legacyReadWarmup = true;
drawer = new DrawCultivator();
maxBoost = 2f;
consumes.power(80f / 60f);
consumes.liquid(Liquids.water, 20f / 60f);
}};
oilExtractor = new Fracker("oil-extractor"){{
@@ -1353,7 +1380,7 @@ public class Blocks implements ContentList{
size = 4;
unitCapModifier = 16;
researchCostMultiplier = 0.04f;
researchCostMultiplier = 0.07f;
}};
coreNucleus = new CoreBlock("core-nucleus"){{
@@ -1365,24 +1392,26 @@ public class Blocks implements ContentList{
size = 5;
unitCapModifier = 24;
researchCostMultiplier = 0.06f;
researchCostMultiplier = 0.11f;
}};
vault = new StorageBlock("vault"){{
requirements(Category.effect, with(Items.titanium, 250, Items.thorium, 125));
size = 3;
itemCapacity = 1000;
health = size * size * 55;
}};
container = new StorageBlock("container"){{
requirements(Category.effect, with(Items.titanium, 100));
size = 2;
itemCapacity = 300;
health = size * size * 55;
}};
unloader = new Unloader("unloader"){{
requirements(Category.effect, with(Items.titanium, 25, Items.silicon, 30));
speed = 6f;
speed = 60f / 11f;
group = BlockGroup.transportation;
}};
@@ -1403,12 +1432,14 @@ public class Blocks implements ContentList{
alternate = true;
reloadTime = 20f;
restitution = 0.03f;
range = 100;
range = 110;
shootCone = 15f;
ammoUseEffect = Fx.casing1;
health = 250;
inaccuracy = 2f;
rotateSpeed = 10f;
limitRange();
}};
scatter = new ItemTurret("scatter"){{
@@ -1419,7 +1450,7 @@ public class Blocks implements ContentList{
Items.metaglass, Bullets.flakGlass
);
reloadTime = 18f;
range = 160f;
range = 220f;
size = 2;
burstSpacing = 5f;
shots = 2;
@@ -1432,6 +1463,8 @@ public class Blocks implements ContentList{
health = 200 * size * size;
shootSound = Sounds.shootSnap;
limitRange(2);
}};
scorch = new ItemTurret("scorch"){{
@@ -1461,11 +1494,12 @@ public class Blocks implements ContentList{
targetAir = false;
reloadTime = 60f;
recoilAmount = 2f;
range = 230f;
range = 235f;
inaccuracy = 1f;
shootCone = 10f;
health = 260;
shootSound = Sounds.bang;
limitRange(0f);
}};
wave = new LiquidTurret("wave"){{
@@ -1478,7 +1512,7 @@ public class Blocks implements ContentList{
);
size = 2;
recoilAmount = 0f;
reloadTime = 2f;
reloadTime = 3f;
inaccuracy = 5f;
shootCone = 50f;
liquidCapacity = 10f;
@@ -1512,12 +1546,12 @@ public class Blocks implements ContentList{
shootType = new LaserBulletType(140){{
colors = new Color[]{Pal.lancerLaser.cpy().a(0.4f), Pal.lancerLaser, Color.white};
hitEffect = Fx.hitLancer;
despawnEffect = Fx.none;
hitSize = 4;
lifetime = 16f;
drawSize = 400f;
collidesAir = false;
length = 173f;
ammoMultiplier = 1f;
}};
}};
@@ -1527,6 +1561,7 @@ public class Blocks implements ContentList{
damage = 20;
lightningLength = 25;
collidesAir = false;
ammoMultiplier = 1f;
}};
reloadTime = 35f;
shootCone = 40f;
@@ -1547,9 +1582,9 @@ public class Blocks implements ContentList{
hasPower = true;
size = 2;
force = 8f;
scaledForce = 7f;
range = 230f;
force = 12f;
scaledForce = 6f;
range = 240f;
damage = 0.3f;
health = 160 * size * size;
rotateSpeed = 10;
@@ -1568,15 +1603,17 @@ public class Blocks implements ContentList{
shots = 4;
burstSpacing = 5;
inaccuracy = 10f;
range = 200f;
range = 210f;
xRand = 6f;
size = 2;
health = 300 * size * size;
shootSound = Sounds.missile;
limitRange(2f);
}};
salvo = new ItemTurret("salvo"){{
requirements(Category.turret, with(Items.copper, 100, Items.graphite, 90, Items.titanium, 60));
requirements(Category.turret, with(Items.copper, 100, Items.graphite, 80, Items.titanium, 50));
ammo(
Items.copper, Bullets.standardCopper,
Items.graphite, Bullets.standardDense,
@@ -1586,7 +1623,7 @@ public class Blocks implements ContentList{
);
size = 2;
range = 150f;
range = 180f;
reloadTime = 38f;
restitution = 0.03f;
ammoEjectBack = 3f;
@@ -1598,6 +1635,8 @@ public class Blocks implements ContentList{
ammoUseEffect = Fx.casing2;
health = 240 * size * size;
shootSound = Sounds.shootBig;
limitRange();
}};
segment = new PointDefenseTurret("segment"){{
@@ -1610,7 +1649,7 @@ public class Blocks implements ContentList{
size = 2;
shootLength = 5f;
bulletDamage = 30f;
reloadTime = 9f;
reloadTime = 8f;
}};
tsunami = new LiquidTurret("tsunami"){{
@@ -1622,7 +1661,7 @@ public class Blocks implements ContentList{
Liquids.oil, Bullets.heavyOilShot
);
size = 3;
reloadTime = 2f;
reloadTime = 3f;
shots = 2;
velocityInaccuracy = 0.1f;
inaccuracy = 4f;
@@ -1721,6 +1760,7 @@ public class Blocks implements ContentList{
shootSound = Sounds.shootSnap;
health = 145 * size * size;
limitRange();
}};
foreshadow = new ItemTurret("foreshadow"){{
@@ -1736,7 +1776,7 @@ public class Blocks implements ContentList{
despawnEffect = Fx.instBomb;
trailSpacing = 20f;
damage = 1350;
buildingDamageMultiplier = 0.3f;
buildingDamageMultiplier = 0.25f;
speed = brange;
hitShake = 6f;
ammoMultiplier = 1f;
@@ -1744,7 +1784,7 @@ public class Blocks implements ContentList{
);
maxAmmo = 40;
ammoPerShot = 4;
ammoPerShot = 5;
rotateSpeed = 2f;
reloadTime = 200f;
ammoUseEffect = Fx.casing3Double;
@@ -1773,11 +1813,11 @@ public class Blocks implements ContentList{
Items.pyratite, Bullets.standardIncendiaryBig,
Items.thorium, Bullets.standardThoriumBig
);
reloadTime = 6f;
reloadTime = 7f;
coolantMultiplier = 0.5f;
restitution = 0.1f;
ammoUseEffect = Fx.casing3;
range = 200f;
range = 260f;
inaccuracy = 3f;
recoilAmount = 3f;
spread = 8f;
@@ -1790,6 +1830,8 @@ public class Blocks implements ContentList{
health = 160 * size * size;
coolantUsage = 1f;
limitRange();
}};
meltdown = new LaserTurret("meltdown"){{
@@ -1799,7 +1841,7 @@ public class Blocks implements ContentList{
recoilAmount = 4f;
size = 4;
shootShake = 2f;
range = 190f;
range = 195f;
reloadTime = 90f;
firingMoveFract = 0.5f;
shootDuration = 220f;
@@ -1817,6 +1859,7 @@ public class Blocks implements ContentList{
incendChance = 0.4f;
incendSpread = 5f;
incendAmount = 1;
ammoMultiplier = 1f;
}};
health = 200 * size * size;
@@ -1856,7 +1899,8 @@ public class Blocks implements ContentList{
navalFactory = new UnitFactory("naval-factory"){{
requirements(Category.units, with(Items.copper, 150, Items.lead, 130, Items.metaglass, 120));
plans = Seq.with(
new UnitPlan(UnitTypes.risso, 60f * 45f, with(Items.silicon, 20, Items.metaglass, 35))
new UnitPlan(UnitTypes.risso, 60f * 45f, with(Items.silicon, 20, Items.metaglass, 35)),
new UnitPlan(UnitTypes.retusa, 60f * 60f, with(Items.silicon, 15, Items.metaglass, 25, Items.titanium, 20))
);
size = 3;
consumes.power(1.2f);
@@ -1878,7 +1922,8 @@ public class Blocks implements ContentList{
new UnitType[]{UnitTypes.crawler, UnitTypes.atrax},
new UnitType[]{UnitTypes.flare, UnitTypes.horizon},
new UnitType[]{UnitTypes.mono, UnitTypes.poly},
new UnitType[]{UnitTypes.risso, UnitTypes.minke}
new UnitType[]{UnitTypes.risso, UnitTypes.minke},
new UnitType[]{UnitTypes.retusa, UnitTypes.oxynoe}
);
}};
@@ -1944,10 +1989,26 @@ public class Blocks implements ContentList{
}};
repairPoint = new RepairPoint("repair-point"){{
requirements(Category.units, with(Items.lead, 15, Items.copper, 15, Items.silicon, 15));
requirements(Category.units, with(Items.lead, 20, Items.copper, 20, Items.silicon, 15));
repairSpeed = 0.5f;
repairRadius = 65f;
beamWidth = 0.73f;
powerUse = 1f;
pulseRadius = 5f;
}};
repairTurret = new RepairPoint("repair-turret"){{
requirements(Category.units, with(Items.silicon, 70, Items.thorium, 60, Items.plastanium, 60));
size = 2;
length = 6f;
repairSpeed = 5f;
repairRadius = 140f;
powerUse = 5f;
beamWidth = 1.1f;
pulseRadius = 6.1f;
coolantUse = 0.15f;
coolantMultiplier = 1.7f;
acceptCoolant = true;
}};
resupplyPoint = new ResupplyPoint("resupply-point"){{
@@ -1961,6 +2022,28 @@ public class Blocks implements ContentList{
consumes.item(Items.copper, 1);
}};
//endregion
//region payloads
payloadConveyor = new PayloadConveyor("payload-conveyor"){{
requirements(Category.units, with(Items.graphite, 10, Items.copper, 20));
canOverdrive = false;
}};
payloadRouter = new PayloadRouter("payload-router"){{
requirements(Category.units, with(Items.graphite, 15, Items.copper, 20));
canOverdrive = false;
}};
payloadPropulsionTower = new PayloadMassDriver("payload-propulsion-tower"){{
requirements(Category.units, with(Items.thorium, 300, Items.silicon, 200, Items.plastanium, 200, Items.phaseFabric, 50));
size = 5;
reloadTime = 150f;
chargeTime = 100f;
range = 300f;
consumes.power(10f);
}};
//endregion
//region sandbox
@@ -1995,10 +2078,21 @@ public class Blocks implements ContentList{
alwaysUnlocked = true;
}};
payloadVoid = new PayloadVoid("payload-void"){{
requirements(Category.units, BuildVisibility.sandboxOnly, with());
size = 5;
}};
payloadSource = new PayloadSource("payload-source"){{
requirements(Category.units, BuildVisibility.sandboxOnly, with());
size = 5;
}};
//TODO move
illuminator = new LightBlock("illuminator"){{
requirements(Category.effect, BuildVisibility.lightingOnly, with(Items.graphite, 12, Items.silicon, 8));
brightness = 0.75f;
radius = 120f;
radius = 140f;
consumes.power(0.05f);
}};
@@ -2027,16 +2121,6 @@ public class Blocks implements ContentList{
consumes.power(4f);
}};
//TODO remove
launchPadLarge = new LaunchPad("launch-pad-large"){{
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with(Items.titanium, 200, Items.silicon, 150, Items.lead, 250, Items.plastanium, 75));
size = 4;
itemCapacity = 300;
launchTime = 60f * 35;
hasPower = true;
consumes.power(6f);
}};
interplanetaryAccelerator = new Accelerator("interplanetary-accelerator"){{
requirements(Category.effect, BuildVisibility.campaignOnly, with(Items.copper, 16000, Items.silicon, 11000, Items.thorium, 13000, Items.titanium, 12000, Items.surgeAlloy, 6000, Items.phaseFabric, 5000));
researchCostMultiplier = 0.1f;
@@ -2059,7 +2143,7 @@ public class Blocks implements ContentList{
}};
microProcessor = new LogicBlock("micro-processor"){{
requirements(Category.logic, with(Items.copper, 80, Items.lead, 50, Items.silicon, 30));
requirements(Category.logic, with(Items.copper, 90, Items.lead, 50, Items.silicon, 50));
instructionsPerTick = 2;
@@ -2067,7 +2151,7 @@ public class Blocks implements ContentList{
}};
logicProcessor = new LogicBlock("logic-processor"){{
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 60, Items.graphite, 60, Items.thorium, 50));
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 80, Items.graphite, 60, Items.thorium, 50));
instructionsPerTick = 8;
@@ -2077,7 +2161,7 @@ public class Blocks implements ContentList{
}};
hyperProcessor = new LogicBlock("hyper-processor"){{
requirements(Category.logic, with(Items.lead, 450, Items.silicon, 130, Items.thorium, 75, Items.surgeAlloy, 50));
requirements(Category.logic, with(Items.lead, 450, Items.silicon, 150, Items.thorium, 75, Items.surgeAlloy, 50));
consumes.liquid(Liquids.cryofluid, 0.08f);
hasLiquids = true;
@@ -2122,21 +2206,21 @@ public class Blocks implements ContentList{
//region experimental
blockForge = new BlockForge("block-forge"){{
requirements(Category.crafting, BuildVisibility.debugOnly, with(Items.thorium, 100));
requirements(Category.units, BuildVisibility.debugOnly, with(Items.thorium, 100));
hasPower = true;
consumes.power(2f);
size = 3;
}};
blockLoader = new BlockLoader("block-loader"){{
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.thorium, 100));
requirements(Category.units, BuildVisibility.debugOnly, with(Items.thorium, 100));
hasPower = true;
consumes.power(2f);
size = 3;
}};
blockUnloader = new BlockUnloader("block-unloader"){{
requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.thorium, 100));
requirements(Category.units, BuildVisibility.debugOnly, with(Items.thorium, 100));
hasPower = true;
consumes.power(2f);
size = 3;

View File

@@ -9,7 +9,6 @@ import mindustry.entities.*;
import mindustry.entities.bullet.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.io.*;
import mindustry.world.*;
import static mindustry.Vars.*;
@@ -53,8 +52,7 @@ public class Bullets implements ContentList{
}};
//this is just a copy of the damage lightning bullet that doesn't damage air units
damageLightningGround = new BulletType(0.0001f, 0f){};
JsonIO.copy(damageLightning, damageLightningGround);
damageLightningGround = damageLightning.copy();
damageLightningGround.collidesAir = false;
artilleryDense = new ArtilleryBulletType(3f, 20, "shell"){{
@@ -262,7 +260,7 @@ public class Bullets implements ContentList{
drag = -0.01f;
splashDamageRadius = 30f;
splashDamage = 30f * 1.5f;
ammoMultiplier = 4f;
ammoMultiplier = 5f;
hitEffect = Fx.blastExplosion;
despawnEffect = Fx.blastExplosion;
@@ -281,6 +279,7 @@ public class Bullets implements ContentList{
splashDamageRadius = 20f;
splashDamage = 20f * 1.5f;
makeFire = true;
ammoMultiplier = 5f;
hitEffect = Fx.blastExplosion;
status = StatusEffects.burning;
}};
@@ -291,9 +290,10 @@ public class Bullets implements ContentList{
shrinkY = 0f;
drag = -0.01f;
splashDamageRadius = 25f;
splashDamage = 25f * 1.5f;
splashDamage = 25f * 1.4f;
hitEffect = Fx.blastExplosion;
despawnEffect = Fx.blastExplosion;
ammoMultiplier = 4f;
lightningDamage = 10;
lightning = 2;
lightningLength = 10;
@@ -346,12 +346,14 @@ public class Bullets implements ContentList{
}};
standardDenseBig = new BasicBulletType(7f, 55, "bullet"){{
hitSize = 5;
width = 15f;
height = 21f;
shootEffect = Fx.shootBig;
}};
standardThoriumBig = new BasicBulletType(8f, 80, "bullet"){{
hitSize = 5;
width = 16f;
height = 23f;
shootEffect = Fx.shootBig;
@@ -361,6 +363,7 @@ public class Bullets implements ContentList{
}};
standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{
hitSize = 5;
width = 16f;
height = 21f;
frontColor = Pal.lightishOrange;

View File

@@ -12,7 +12,6 @@ import mindustry.game.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.type.*;
import mindustry.ui.*;
import static arc.graphics.g2d.Draw.rect;
import static arc.graphics.g2d.Draw.*;
@@ -21,16 +20,29 @@ import static arc.math.Angles.*;
import static mindustry.Vars.*;
public class Fx{
private static final Rand rand = new Rand();
private static final Vec2 v = new Vec2();
public static final Effect
none = new Effect(0, 0f, e -> {}),
trailFade = new Effect(400f, e -> {
if(!(e.data instanceof Trail trail)) return;
//lifetime is how many frames it takes to fade out the trail
e.lifetime = trail.length * 1.4f;
trail.shorten();
trail.drawCap(e.color, e.rotation);
trail.draw(e.color, e.rotation);
}),
unitSpawn = new Effect(30f, e -> {
if(!(e.data instanceof UnitType unit)) return;
float scl = 1f + e.fout() * 2f;
TextureRegion region = unit.icon(Cicon.full);
TextureRegion region = unit.fullIcon;
alpha(e.fout());
mixcol(Color.white, e.fin());
@@ -41,9 +53,7 @@ public class Fx{
alpha(e.fin());
rect(region, e.x, e.y,
region.width * Draw.scl * scl, region.height * Draw.scl * scl, e.rotation - 90);
rect(region, e.x, e.y, region.width * Draw.scl * scl, region.height * Draw.scl * scl, e.rotation - 90);
}),
unitCapKill = new Effect(80f, e -> {
@@ -62,7 +72,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.fullIcon : select.type.fullIcon, select.x, select.y, block ? 0f : select.rotation - 90f);
alpha(1f);
Lines.stroke(e.fslope());
Lines.square(select.x, select.y, e.fout() * select.hitSize * 2f, 45);
@@ -80,7 +90,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.fullIcon, select.x, select.y, select.rotation - 90f);
reset();
Draw.scl = p;
@@ -125,10 +135,10 @@ public class Fx{
Position pos = e.data();
Draw.color(e.color);
Draw.alpha(e.fout());
Draw.color(e.color, e.fout());
Lines.stroke(1.5f);
Lines.line(e.x, e.y, pos.getX(), pos.getY());
Drawf.light(null, e.x, e.y, pos.getX(), pos.getY(), 20f, e.color, 0.6f * e.fout());
}),
pointHit = new Effect(8f, e -> {
@@ -258,6 +268,14 @@ public class Fx{
Fill.circle(e.x + trnsx(ang, len), e.y + trnsy(ang, len), 2f * e.fout());
}),
breakProp = new Effect(23, e -> {
float scl = Math.max(e.rotation, 1);
color(Tmp.c1.set(e.color).mul(1.1f));
randLenVectors(e.id, 6, 19f * e.finpow() * scl, (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 3.5f * scl + 0.3f);
});
}).layer(Layer.debris),
unitDrop = new Effect(30, e -> {
color(Pal.lightishGray);
randLenVectors(e.id, 9, 3 + 20f * e.finpow(), (x, y) -> {
@@ -300,7 +318,8 @@ public class Fx{
greenBomb = new Effect(40f, 100f, e -> {
color(Pal.heal);
stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 4f + e.finpow() * 65f);
float circleRad = 4f + e.finpow() * 65f;
Lines.circle(e.x, e.y, circleRad);
color(Pal.heal);
for(int i = 0; i < 4; i++){
@@ -311,6 +330,8 @@ public class Fx{
for(int i = 0; i < 4; i++){
Drawf.tri(e.x, e.y, 3f, 35f * e.fout(), i*90);
}
Drawf.light(e.x, e.y, circleRad * 1.6f, Pal.heal, e.fout());
}),
greenLaserCharge = new Effect(80f, 100f, e -> {
@@ -322,11 +343,13 @@ public class Fx{
randLenVectors(e.id, 20, 40f * e.fout(), (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fin() * 5f);
Drawf.light(e.x + x, e.y + y, e.fin() * 15f, Pal.heal, 0.7f);
});
color();
Fill.circle(e.x, e.y, e.fin() * 10);
Drawf.light(e.x, e.y, e.fin() * 20f, Pal.heal, 0.7f);
}),
greenLaserChargeSmall = new Effect(40f, 100f, e -> {
@@ -335,6 +358,13 @@ public class Fx{
Lines.circle(e.x, e.y, e.fout() * 50f);
}),
greenCloud = new Effect(80f, e -> {
color(Pal.heal);
randLenVectors(e.id, e.fin(), 7, 9f, (x, y, fin, fout) -> {
Fill.circle(e.x + x, e.y + y, 5f * fout);
});
}),
healWaveDynamic = new Effect(22, e -> {
color(Pal.heal);
stroke(e.fout() * 2f);
@@ -353,14 +383,20 @@ public class Fx{
Lines.circle(e.x, e.y, 2f + e.finpow() * 7f);
}),
healDenamic = new Effect(11, e -> {
color(Pal.heal);
stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 2f + e.finpow() * e.rotation);
}),
shieldWave = new Effect(22, e -> {
color(Pal.shield);
color(e.color, 0.7f);
stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 4f + e.finpow() * 60f);
}),
shieldApply = new Effect(11, e -> {
color(Pal.shield);
color(e.color, 0.7f);
stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 2f + e.finpow() * 7f);
}),
@@ -379,6 +415,8 @@ public class Fx{
float ang = Mathf.angle(x, y);
lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
});
Drawf.light(e.x, e.y, 20f, Pal.lightOrange, 0.6f * e.fout());
}),
hitFuse = new Effect(14, e -> {
@@ -417,6 +455,16 @@ public class Fx{
});
}),
hitFlamePlasma = new Effect(14, e -> {
color(Color.white, Pal.heal, e.fin());
stroke(0.5f + e.fout());
randLenVectors(e.id, 2, e.fin() * 15f, e.rotation, 50f, (x, y) -> {
float ang = Mathf.angle(x, y);
lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
});
}),
hitLiquid = new Effect(16, e -> {
color(e.color);
@@ -435,6 +483,16 @@ public class Fx{
});
}),
hitEmpSpark = new Effect(40, e -> {
color(Pal.heal);
stroke(e.fout() * 1.6f);
randLenVectors(e.id, 18, e.finpow() * 27f, e.rotation, 360f, (x, y) -> {
float ang = Mathf.angle(x, y);
lineAngle(e.x + x, e.y + y, ang, e.fout() * 6 + 1f);
});
}),
hitLancer = new Effect(12, e -> {
color(Color.white);
stroke(e.fout() * 1.5f);
@@ -488,6 +546,8 @@ public class Fx{
for(int i = 0; i < 4; i++){
Drawf.tri(e.x, e.y, 3f, 30f * e.fout(), i*90 + 45);
}
Drawf.light(e.x, e.y, 150f, Pal.bulletYellowBack, 0.9f * e.fout());
}),
instTrail = new Effect(30, e -> {
@@ -501,6 +561,8 @@ public class Fx{
Drawf.tri(e.x, e.y, w, (30f + Mathf.randomSeedRange(e.id, 15f)) * m, rot);
Drawf.tri(e.x, e.y, w, 10f * m, rot + 180f);
}
Drawf.light(e.x, e.y, 60f, Pal.bulletYellowBack, 0.6f * e.fout());
}),
instShoot = new Effect(24f, e -> {
@@ -516,6 +578,8 @@ public class Fx{
Drawf.tri(e.x, e.y, 13f * e.fout(), 85f, e.rotation + 90f * i);
Drawf.tri(e.x, e.y, 13f * e.fout(), 50f, e.rotation + 20f * i);
}
Drawf.light(e.x, e.y, 180f, Pal.bulletYellowBack, 0.9f * e.fout());
}),
instHit = new Effect(20f, 200f, e -> {
@@ -552,6 +616,8 @@ public class Fx{
color(Color.white, Pal.heal, e.fin());
stroke(0.5f + e.fout());
Lines.circle(e.x, e.y, e.fin() * 5f);
Drawf.light(e.x, e.y, 23f, Pal.heal, e.fout() * 0.7f);
}),
hitYellowLaser = new Effect(8, e -> {
@@ -571,6 +637,12 @@ public class Fx{
}),
airBubble = new Effect(100f, e -> {
randLenVectors(e.id, 1, e.fin() * 12f, (x, y) -> {
rect(renderer.bubbles[Math.min((int)(renderer.bubbles.length * Mathf.curveMargin(e.fin(), 0.11f, 0.06f)), renderer.bubbles.length - 1)], e.x + x, e.y + y);
});
}).layer(Layer.flyingUnitLow + 1),
flakExplosion = new Effect(20, e -> {
color(Pal.bulletYellow);
@@ -591,6 +663,8 @@ public class Fx{
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Drawf.light(e.x, e.y, 50f, Pal.lighterOrange, 0.8f * e.fout());
}),
plasticExplosion = new Effect(24, e -> {
@@ -613,6 +687,8 @@ public class Fx{
randLenVectors(e.id + 1, 4, 1f + 25f * e.finpow(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Drawf.light(e.x, e.y, 50f, Pal.plastaniumBack, 0.8f * e.fout());
}),
plasticExplosionFlak = new Effect(28, e -> {
@@ -657,6 +733,8 @@ public class Fx{
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Drawf.light(e.x, e.y, 45f, Pal.missileYellowBack, 0.8f * e.fout());
}),
sapExplosion = new Effect(25, e -> {
@@ -679,6 +757,8 @@ public class Fx{
randLenVectors(e.id + 1, 8, 1f + 60f * e.finpow(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Drawf.light(e.x, e.y, 90f, Pal.sapBulletBack, 0.8f * e.fout());
}),
massiveExplosion = new Effect(30, e -> {
@@ -701,6 +781,8 @@ public class Fx{
randLenVectors(e.id + 1, 6, 1f + 29f * e.finpow(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 4f);
});
Drawf.light(e.x, e.y, 50f, Pal.missileYellowBack, 0.8f * e.fout());
}),
artilleryTrail = new Effect(50, e -> {
@@ -716,7 +798,7 @@ public class Fx{
missileTrail = new Effect(50, e -> {
color(e.color);
Fill.circle(e.x, e.y, e.rotation * e.fout());
}),
}).layer(Layer.bullet - 0.001f), //below bullets
absorb = new Effect(12, e -> {
color(Pal.accent);
@@ -757,6 +839,8 @@ public class Fx{
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Drawf.light(e.x, e.y, 60f, Pal.bulletYellowBack, 0.7f * e.fout());
}),
burning = new Effect(35f, e -> {
@@ -767,6 +851,12 @@ public class Fx{
});
}),
fireRemove = new Effect(70f, e -> {
if(Fire.regions[0] == null) return;
alpha(e.fout());
rect(Fire.regions[((int)(e.rotation + e.fin() * Fire.frames)) % Fire.frames], e.x, e.y);
}),
fire = new Effect(50f, e -> {
color(Pal.lightFlame, Pal.darkFlame, e.fin());
@@ -849,6 +939,14 @@ public class Fx{
});
}),
electrified = new Effect(40f, e -> {
color(Pal.heal);
randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> {
Fill.square(e.x + x, e.y + y, e.fslope() * 1.1f, 45f);
});
}),
sporeSlowed = new Effect(40f, e -> {
color(Pal.spore);
@@ -881,7 +979,7 @@ public class Fx{
float length = 20f * e.finpow();
float size = 7f * e.fout();
rect(((Item)e.data).icon(Cicon.medium), e.x + trnsx(e.rotation, length), e.y + trnsy(e.rotation, length), size, size);
rect(((Item)e.data).fullIcon, e.x + trnsx(e.rotation, length), e.y + trnsy(e.rotation, length), size, size);
}),
shockwave = new Effect(10f, 80f, e -> {
@@ -935,26 +1033,82 @@ public class Fx{
});
}),
dynamicExplosion = new Effect(30, 100f, e -> {
float intensity = e.rotation;
e.scaled(5 + intensity * 2, i -> {
stroke(3.1f * i.fout());
Lines.circle(e.x, e.y, (3f + i.fin() * 14f) * intensity);
});
dynamicExplosion = new Effect(30, 500f, b -> {
float intensity = b.rotation;
float baseLifetime = 26f + intensity * 15f;
b.lifetime = 43f + intensity * 35f;
color(Color.gray);
//TODO awful borders with linear filtering here
alpha(0.9f);
for(int i = 0; i < 4; i++){
rand.setSeed(b.id*2 + i);
float lenScl = rand.random(0.4f, 1f);
int fi = i;
b.scaled(b.lifetime * lenScl, e -> {
randLenVectors(e.id + fi - 1, e.fin(Interp.pow10Out), (int)(3f * intensity), 14f * intensity, (x, y, in, out) -> {
float fout = e.fout(Interp.pow5Out) * rand.random(0.5f, 1f);
Fill.circle(e.x + x, e.y + y, fout * ((2f + intensity) * 1.8f));
});
});
}
randLenVectors(e.id, e.finpow(), (int)(6 * intensity), 21f * intensity, (x, y, in, out) -> {
Fill.circle(e.x + x, e.y + y, out * (2f + intensity) * 3 + 0.5f);
Fill.circle(e.x + x / 2f, e.y + y / 2f, out * (intensity) * 3);
b.scaled(baseLifetime, e -> {
e.scaled(5 + intensity * 2.5f, i -> {
stroke((3.1f + intensity/5f) * i.fout());
Lines.circle(e.x, e.y, (3f + i.fin() * 14f) * intensity);
Drawf.light(e.x, e.y, i.fin() * 14f * 2f * intensity, Color.white, 0.9f * e.fout());
});
color(Pal.lighterOrange, Pal.lightOrange, Color.gray, e.fin());
stroke((1.7f * e.fout()) * (1f + (intensity - 1f) / 2f));
Draw.z(Layer.effect + 0.001f);
randLenVectors(e.id + 1, e.finpow() + 0.001f, (int)(9 * intensity), 40f * intensity, (x, y, in, out) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + out * 4 * (3f + intensity));
Drawf.light(e.x + x, e.y + y, (out * 4 * (3f + intensity)) * 3.5f, Draw.getColor(), 0.8f);
});
});
}),
color(Pal.lighterOrange, Pal.lightOrange, Color.gray, e.fin());
stroke((1.7f * e.fout()) * (1f + (intensity - 1f) / 2f));
reactorExplosion = new Effect(30, 500f, b -> {
float intensity = 6.8f;
float baseLifetime = 25f + intensity * 11f;
b.lifetime = 50f + intensity * 65f;
randLenVectors(e.id + 1, e.finpow(), (int)(9 * intensity), 40f * intensity, (x, y, in, out) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + out * 4 * (3f + intensity));
color(Pal.reactorPurple2);
alpha(0.7f);
for(int i = 0; i < 4; i++){
rand.setSeed(b.id*2 + i);
float lenScl = rand.random(0.4f, 1f);
int fi = i;
b.scaled(b.lifetime * lenScl, e -> {
randLenVectors(e.id + fi - 1, e.fin(Interp.pow10Out), (int)(2.9f * intensity), 22f * intensity, (x, y, in, out) -> {
float fout = e.fout(Interp.pow5Out) * rand.random(0.5f, 1f);
float rad = fout * ((2f + intensity) * 2.35f);
Fill.circle(e.x + x, e.y + y, rad);
Drawf.light(e.x + x, e.y + y, rad * 2.5f, Pal.reactorPurple, 0.5f);
});
});
}
b.scaled(baseLifetime, e -> {
Draw.color();
e.scaled(5 + intensity * 2f, i -> {
stroke((3.1f + intensity/5f) * i.fout());
Lines.circle(e.x, e.y, (3f + i.fin() * 14f) * intensity);
Drawf.light(e.x, e.y, i.fin() * 14f * 2f * intensity, Color.white, 0.9f * e.fout());
});
color(Pal.lighterOrange, Pal.reactorPurple, e.fin());
stroke((2f * e.fout()));
Draw.z(Layer.effect + 0.001f);
randLenVectors(e.id + 1, e.finpow() + 0.001f, (int)(8 * intensity), 28f * intensity, (x, y, in, out) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + out * 4 * (4f + intensity));
Drawf.light(e.x + x, e.y + y, (out * 4 * (3f + intensity)) * 3.5f, Draw.getColor(), 0.8f);
});
});
}),
@@ -1047,6 +1201,19 @@ public class Fx{
});
}),
shootPayloadDriver = new Effect(30f, e -> {
color(Pal.accent);
Lines.stroke(0.5f + 0.5f*e.fout());
float spread = 9f;
rand.setSeed(e.id);
for(int i = 0; i < 20; i++){
float ang = e.rotation + rand.range(17f);
v.trns(ang, rand.random(e.fin() * 55f));
Lines.lineAngle(e.x + v.x + rand.range(spread), e.y + v.y + rand.range(spread), ang, e.fout() * 5f * rand.random(1f) + 1f);
}
}),
shootSmallFlame = new Effect(32f, 80f, e -> {
color(Pal.lightFlame, Pal.darkFlame, Color.gray, e.fin());
@@ -1188,6 +1355,8 @@ public class Fx{
for(int i : Mathf.signs){
Drawf.tri(e.x, e.y, 10f * e.fout(), 24f, e.rotation + 90 + 90f * i);
}
Drawf.light(e.x, e.y, 60f * e.fout(), Pal.orangeSpark, 0.5f);
}),
railHit = new Effect(18f, 200f, e -> {
@@ -1478,30 +1647,44 @@ public class Fx{
Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 8);
}),
mineSmall = new Effect(30, e -> {
color(e.color, Color.lightGray, e.fin());
randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> {
Fill.square(e.x + x, e.y + y, e.fout() + 0.5f, 45);
});
}),
mine = new Effect(20, e -> {
color(e.color, Color.lightGray, e.fin());
randLenVectors(e.id, 6, 3f + e.fin() * 6f, (x, y) -> {
color(e.color, Color.lightGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2f, 45);
});
}),
mineBig = new Effect(30, e -> {
color(e.color, Color.lightGray, e.fin());
randLenVectors(e.id, 6, 4f + e.fin() * 8f, (x, y) -> {
color(e.color, Color.lightGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.2f, 45);
});
}),
mineHuge = new Effect(40, e -> {
color(e.color, Color.lightGray, e.fin());
randLenVectors(e.id, 8, 5f + e.fin() * 10f, (x, y) -> {
color(e.color, Color.lightGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45);
});
}),
payloadReceive = new Effect(30, e -> {
color(Color.white, Pal.accent, e.fin());
randLenVectors(e.id, 12, 7f + e.fin() * 13f, (x, y) -> {
Fill.square(e.x + x, e.y + y, e.fout() * 2.1f + 0.5f, 45);
});
}),
smelt = new Effect(20, e -> {
color(Color.white, e.color, e.fin());
randLenVectors(e.id, 6, 2f + e.fin() * 5f, (x, y) -> {
color(Color.white, e.color, e.fin());
Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45);
});
}),
@@ -1635,7 +1818,7 @@ public class Fx{
float radius = unit.hitSize() * 1.3f;
e.scaled(16f, c -> {
color(Pal.shield);
color(e.color, 0.9f);
stroke(c.fout() * 2f + 0.1f);
randLenVectors(e.id, (int)(radius * 1.2f), radius/2f + c.finpow() * radius*1.25f, (x, y) -> {
@@ -1643,11 +1826,85 @@ public class Fx{
});
});
color(Pal.shield, e.fout());
color(e.color, e.fout() * 0.9f);
stroke(e.fout());
Lines.circle(e.x, e.y, radius);
}),
chainLightning = new Effect(20f, 300f, e -> {
if(!(e.data instanceof Position p)) return;
float tx = p.getX(), ty = p.getY(), dst = Mathf.dst(e.x, e.y, tx, ty);
Tmp.v1.set(p).sub(e.x, e.y).nor();
float normx = Tmp.v1.x, normy = Tmp.v1.y;
float range = 6f;
int links = Mathf.ceil(dst / range);
float spacing = dst / links;
Lines.stroke(2.5f * e.fout());
Draw.color(Color.white, e.color, e.fin());
Lines.beginLine();
Lines.linePoint(e.x, e.y);
rand.setSeed(e.id);
for(int i = 0; i < links; i++){
float nx, ny;
if(i == links - 1){
nx = tx;
ny = ty;
}else{
float len = (i + 1) * spacing;
Tmp.v1.setToRandomDirection(rand).scl(range/2f);
nx = e.x + normx * len + Tmp.v1.x;
ny = e.y + normy * len + Tmp.v1.y;
}
Lines.linePoint(nx, ny);
}
Lines.endLine();
}).followParent(false),
chainEmp = new Effect(30f, 300f, e -> {
if(!(e.data instanceof Position p)) return;
float tx = p.getX(), ty = p.getY(), dst = Mathf.dst(e.x, e.y, tx, ty);
Tmp.v1.set(p).sub(e.x, e.y).nor();
float normx = Tmp.v1.x, normy = Tmp.v1.y;
float range = 6f;
int links = Mathf.ceil(dst / range);
float spacing = dst / links;
Lines.stroke(4f * e.fout());
Draw.color(Color.white, e.color, e.fin());
Lines.beginLine();
Lines.linePoint(e.x, e.y);
rand.setSeed(e.id);
for(int i = 0; i < links; i++){
float nx, ny;
if(i == links - 1){
nx = tx;
ny = ty;
}else{
float len = (i + 1) * spacing;
Tmp.v1.setToRandomDirection(rand).scl(range/2f);
nx = e.x + normx * len + Tmp.v1.x;
ny = e.y + normy * len + Tmp.v1.y;
}
Lines.linePoint(nx, ny);
}
Lines.endLine();
}).followParent(false),
coreLand = new Effect(120f, e -> {
});
}

View File

@@ -5,8 +5,9 @@ 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,
sporePod, sand, blastCompound, pyratite, metaglass;
public static Item
scrap, copper, lead, graphite, coal, titanium, thorium, silicon, plastanium,
phaseFabric, surgeAlloy, sporePod, sand, blastCompound, pyratite, metaglass;
@Override
public void load(){

View File

@@ -24,7 +24,7 @@ public class Liquids implements ContentList{
}};
oil = new Liquid("oil", Color.valueOf("313131")){{
viscosity = 0.7f;
viscosity = 0.75f;
flammability = 1.2f;
explosiveness = 1.2f;
heatCapacity = 0.7f;

View File

@@ -9,7 +9,6 @@ import mindustry.type.*;
public class Planets implements ContentList{
public static Planet
sun,
//tantros,
serpulo;
@Override
@@ -18,8 +17,6 @@ public class Planets implements ContentList{
bloom = true;
accessible = false;
//lightColor = Color.valueOf("f4ee8e");
meshLoader = () -> new SunMesh(
this, 4,
5, 0.3, 1.7, 1.2, 1,
@@ -33,15 +30,6 @@ public class Planets implements ContentList{
);
}};
/*tantros = new Planet("tantros", sun, 2, 0.8f){{
generator = new TantrosPlanetGenerator();
meshLoader = () -> new HexMesh(this, 4);
atmosphereColor = Color.valueOf("3db899");
startSector = 10;
atmosphereRadIn = -0.01f;
atmosphereRadOut = 0.3f;
}};*/
serpulo = new Planet("serpulo", sun, 3, 1){{
generator = new SerpuloPlanetGenerator();
meshLoader = () -> new HexMesh(this, 6);
@@ -49,6 +37,7 @@ public class Planets implements ContentList{
atmosphereRadIn = 0.02f;
atmosphereRadOut = 0.3f;
startSector = 15;
alwaysUnlocked = true;
}};
}
}

View File

@@ -14,12 +14,14 @@ public class SectorPresets implements ContentList{
@Override
public void load(){
//region serpulo
groundZero = new SectorPreset("groundZero", serpulo, 15){{
alwaysUnlocked = true;
addStartingItems = true;
captureWave = 10;
difficulty = 1;
startWaveTimeMultiplier = 3f;
}};
saltFlats = new SectorPreset("saltFlats", serpulo, 101){{
@@ -95,5 +97,7 @@ public class SectorPresets implements ContentList{
planetaryTerminal = new SectorPreset("planetaryTerminal", serpulo, 93){{
difficulty = 10;
}};
//endregion
}
}

View File

@@ -12,7 +12,7 @@ import mindustry.graphics.*;
import static mindustry.Vars.*;
public class StatusEffects implements ContentList{
public static StatusEffect none, burning, freezing, unmoving, slow, wet, muddy, melting, sapped, tarred, overdrive, overclock, shielded, shocked, blasted, corroded, boss, sporeSlowed, disarmed;
public static StatusEffect none, burning, freezing, unmoving, slow, wet, muddy, melting, sapped, tarred, overdrive, overclock, shielded, shocked, blasted, corroded, boss, sporeSlowed, disarmed, electrified;
@Override
public void load(){
@@ -27,10 +27,10 @@ public class StatusEffects implements ContentList{
init(() -> {
opposite(wet, freezing);
affinity(tarred, ((unit, time, newTime, result) -> {
affinity(tarred, ((unit, result, time) -> {
unit.damagePierce(transitionDamage);
Fx.burning.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f));
result.set(burning, Math.min(time + newTime, 300f));
result.set(burning, Math.min(time + result.time, 300f));
}));
});
}};
@@ -45,7 +45,7 @@ public class StatusEffects implements ContentList{
init(() -> {
opposite(melting, burning);
affinity(blasted, ((unit, time, newTime, result) -> {
affinity(blasted, ((unit, result, time) -> {
unit.damagePierce(transitionDamage);
result.set(freezing, time);
}));
@@ -70,14 +70,14 @@ public class StatusEffects implements ContentList{
transitionDamage = 14;
init(() -> {
affinity(shocked, ((unit, time, newTime, result) -> {
affinity(shocked, ((unit, result, time) -> {
unit.damagePierce(transitionDamage);
if(unit.team == state.rules.waveTeam){
Events.fire(Trigger.shock);
}
result.set(wet, time);
}));
opposite(burning);
opposite(burning, melting);
});
}};
@@ -86,6 +86,7 @@ public class StatusEffects implements ContentList{
speedMultiplier = 0.94f;
effect = Fx.muddy;
effectChance = 0.09f;
show = false;
}};
melting = new StatusEffect("melting"){{
@@ -97,10 +98,10 @@ public class StatusEffects implements ContentList{
init(() -> {
opposite(wet, freezing);
affinity(tarred, ((unit, time, newTime, result) -> {
affinity(tarred, ((unit, result, time) -> {
unit.damagePierce(8f);
Fx.burning.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f));
result.set(melting, Math.min(time + newTime, 200f));
result.set(melting, Math.min(time + result.time, 200f));
}));
});
}};
@@ -113,6 +114,14 @@ public class StatusEffects implements ContentList{
effectChance = 0.1f;
}};
electrified = new StatusEffect("electrified"){{
color = Pal.heal;
speedMultiplier = 0.7f;
reloadMultiplier = 0.6f;
effect = Fx.electrified;
effectChance = 0.1f;
}};
sporeSlowed = new StatusEffect("spore-slowed"){{
color = Pal.spore;
speedMultiplier = 0.8f;
@@ -126,8 +135,8 @@ public class StatusEffects implements ContentList{
effect = Fx.oily;
init(() -> {
affinity(melting, ((unit, time, newTime, result) -> result.set(melting, newTime + time)));
affinity(burning, ((unit, time, newTime, result) -> result.set(burning, newTime + time)));
affinity(melting, ((unit, result, time) -> result.set(melting, result.time + time)));
affinity(burning, ((unit, result, time) -> result.set(burning, result.time + time)));
});
}};

View File

@@ -445,7 +445,6 @@ public class TechTree implements ContentList{
node(ruinousShores, Seq.with(
new SectorComplete(craters),
new Research(graphitePress),
new Research(combustionGenerator),
new Research(kiln),
new Research(mechanicalPump)
), () -> {
@@ -549,8 +548,7 @@ public class TechTree implements ContentList{
node(fungalPass, Seq.with(
new SectorComplete(stainedMountains),
new Research(groundFactory),
new Research(door),
new Research(siliconSmelter)
new Research(door)
), () -> {
node(nuclearComplex, Seq.with(
new SectorComplete(fungalPass),

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,8 @@ public class Weathers implements ContentList{
snow,
sandstorm,
sporestorm,
fog;
fog,
suspendParticles;
@Override
public void load(){
@@ -102,5 +103,19 @@ public class Weathers implements ContentList{
attrs.set(Attribute.water, 0.05f);
opacityMultiplier = 0.47f;
}};
suspendParticles = new ParticleWeather("suspend-particles"){{
color = noiseColor = Color.valueOf("a7c1fa");
particleRegion = "particle";
statusGround = false;
useWindVector = true;
sizeMax = 4f;
sizeMin = 1.4f;
minAlpha = 0.5f;
maxAlpha = 1f;
density = 10000f;
baseSpeed = 0.03f;
}};
}
}