Merge remote-tracking branch 'origin/7.0-features' into 7.0-features
# Conflicts: # core/assets/maps/onset.msav
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 716 B |
Binary file not shown.
|
Before Width: | Height: | Size: 442 B |
@@ -389,7 +389,6 @@
|
||||
63319=redweed|block-redweed-ui
|
||||
63318=pur-bush|block-pur-bush-ui
|
||||
63317=yellowcoral|block-yellowcoral-ui
|
||||
63316=coralchunk|block-coralchunk-ui
|
||||
63315=carbon-boulder|block-carbon-boulder-ui
|
||||
63314=ferric-boulder|block-ferric-boulder-ui
|
||||
63313=beryllic-boulder|block-beryllic-boulder-ui
|
||||
|
||||
@@ -44,7 +44,7 @@ public class Blocks{
|
||||
arkyciteFloor, arkyicStone,
|
||||
redmat, bluemat,
|
||||
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
||||
redweed, purbush, coralChunk, yellowCoral,
|
||||
redweed, purbush, yellowCoral,
|
||||
regolithWall, yellowStoneWall, rhyoliteWall, steamVent, carbonWall, redIceWall, ferricStoneWall, beryllicStoneWall, arkyicWall, crystallineStoneWall, redStoneWall, redDiamondWall,
|
||||
ferricStone, ferricCraters, carbonStone, beryllicStone, crystallineStone, crystalFloor, yellowStonePlates,
|
||||
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, grass, salt,
|
||||
@@ -631,10 +631,6 @@ public class Blocks{
|
||||
sclMax = 100f;
|
||||
}};
|
||||
|
||||
coralChunk = new StaticCoralWall("coralchunk"){{
|
||||
|
||||
}};
|
||||
|
||||
boulder = new Prop("boulder"){{
|
||||
variants = 2;
|
||||
stone.asFloor().decoration = craters.asFloor().decoration = charr.asFloor().decoration = this;
|
||||
|
||||
@@ -14,11 +14,11 @@ public class ErekirTechTree{
|
||||
Seq<Objective> erekirSector = Seq.with(new OnPlanet(Planets.erekir));
|
||||
|
||||
var costMultipliers = new ObjectFloatMap<Item>();
|
||||
costMultipliers.put(Items.silicon, 7);
|
||||
costMultipliers.put(Items.silicon, 8);
|
||||
costMultipliers.put(Items.surgeAlloy, 4);
|
||||
costMultipliers.put(Items.phaseFabric, 4);
|
||||
costMultipliers.put(Items.thorium, 8);
|
||||
costMultipliers.put(Items.graphite, 6);
|
||||
costMultipliers.put(Items.thorium, 9);
|
||||
costMultipliers.put(Items.graphite, 9);
|
||||
|
||||
Planets.erekir.techTree = nodeRoot("erekir", coreBastion, true, () -> {
|
||||
context().researchCostMultipliers = costMultipliers;
|
||||
@@ -71,6 +71,18 @@ public class ErekirTechTree{
|
||||
});
|
||||
});
|
||||
|
||||
//TODO move into turbine condenser?
|
||||
node(plasmaBore, () -> {
|
||||
|
||||
node(impactDrill, erekirSector, () -> {
|
||||
node(largePlasmaBore, () -> {
|
||||
node(eruptionDrill, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(turbineCondenser, () -> {
|
||||
node(beamNode, () -> {
|
||||
node(ventCondenser, erekirSector, () -> {
|
||||
@@ -93,75 +105,63 @@ public class ErekirTechTree{
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(siliconArcFurnace, () -> {
|
||||
node(cliffCrusher, () -> {
|
||||
node(electrolyzer, erekirSector, () -> {
|
||||
node(oxidationChamber, () -> {
|
||||
node(electricHeater, () -> {
|
||||
node(heatRedirector, () -> {
|
||||
node(reinforcedConduit, erekirSector, () -> {
|
||||
node(reinforcedPump, () -> {
|
||||
//TODO T2 pump
|
||||
});
|
||||
|
||||
node(reinforcedLiquidJunction, () -> {
|
||||
node(reinforcedBridgeConduit, () -> {
|
||||
|
||||
});
|
||||
|
||||
node(reinforcedLiquidRouter, () -> {
|
||||
node(reinforcedLiquidContainer, () -> {
|
||||
node(reinforcedLiquidTank, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(atmosphericConcentrator, () -> {
|
||||
node(cyanogenSynthesizer, () -> {
|
||||
node(siliconArcFurnace, () -> {
|
||||
node(cliffCrusher, () -> {
|
||||
node(electrolyzer, erekirSector, () -> {
|
||||
node(oxidationChamber, () -> {
|
||||
node(electricHeater, () -> {
|
||||
node(heatRedirector, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
node(carbideCrucible, () -> {
|
||||
node(surgeCrucible, () -> {
|
||||
node(phaseSynthesizer, () -> {
|
||||
node(phaseHeater, () -> {
|
||||
node(atmosphericConcentrator, () -> {
|
||||
node(cyanogenSynthesizer, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
node(carbideCrucible, () -> {
|
||||
node(surgeCrucible, () -> {
|
||||
node(phaseSynthesizer, () -> {
|
||||
node(phaseHeater, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(slagIncinerator, () -> {
|
||||
node(slagIncinerator, () -> {
|
||||
|
||||
node(slagCentrifuge, () -> {
|
||||
node(slagCentrifuge, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
node(heatReactor, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//TODO move into turbine condenser?
|
||||
node(plasmaBore, () -> {
|
||||
|
||||
node(impactDrill, erekirSector, () -> {
|
||||
node(largePlasmaBore, () -> {
|
||||
node(eruptionDrill, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(reinforcedConduit, erekirSector, () -> {
|
||||
node(reinforcedPump, () -> {
|
||||
//TODO T2 pump
|
||||
});
|
||||
|
||||
node(reinforcedLiquidJunction, () -> {
|
||||
node(reinforcedBridgeConduit, () -> {
|
||||
|
||||
});
|
||||
|
||||
node(reinforcedLiquidRouter, () -> {
|
||||
node(reinforcedLiquidContainer, () -> {
|
||||
node(reinforcedLiquidTank, () -> {
|
||||
node(heatReactor, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -57,12 +57,6 @@ public class Planets{
|
||||
totalRadius += 2.6f;
|
||||
lightSrcTo = 0.5f;
|
||||
lightDstFrom = 0.2f;
|
||||
|
||||
unlockedOnLand.addAll(
|
||||
Blocks.plasmaBore, Blocks.duct,
|
||||
Blocks.turbineCondenser, Blocks.breach,
|
||||
Blocks.coreCitadel
|
||||
);
|
||||
}};
|
||||
|
||||
//TODO names
|
||||
|
||||
@@ -42,9 +42,7 @@ public class SerpuloTechTree{
|
||||
node(titaniumConveyor, Seq.with(new SectorComplete(craters)), () -> {
|
||||
node(phaseConveyor, () -> {
|
||||
node(massDriver, () -> {
|
||||
node(payloadPropulsionTower, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -2700,9 +2700,11 @@ public class UnitTypes{
|
||||
|
||||
outlineColor = Pal.darkOutline;
|
||||
lowAltitude = false;
|
||||
mineWalls = true;
|
||||
mineFloor = false;
|
||||
flying = true;
|
||||
mineSpeed = 6.5f;
|
||||
mineTier = 1;
|
||||
mineSpeed = 4f;
|
||||
mineTier = 4;
|
||||
buildSpeed = 0.8f;
|
||||
drag = 0.06f;
|
||||
speed = 2.9f;
|
||||
@@ -2758,9 +2760,11 @@ public class UnitTypes{
|
||||
outlineColor = Pal.darkOutline;
|
||||
lowAltitude = false;
|
||||
flying = true;
|
||||
mineWalls = true;
|
||||
targetAir = false;
|
||||
mineSpeed = 8f;
|
||||
mineTier = 2;
|
||||
mineFloor = false;
|
||||
mineSpeed = 5f;
|
||||
mineTier = 4;
|
||||
buildSpeed = 1.4f;
|
||||
drag = 0.06f;
|
||||
speed = 2.8f;
|
||||
@@ -2816,8 +2820,10 @@ public class UnitTypes{
|
||||
lowAltitude = false;
|
||||
flying = true;
|
||||
targetAir = false;
|
||||
mineSpeed = 8f;
|
||||
mineTier = 3;
|
||||
mineWalls = true;
|
||||
mineFloor = false;
|
||||
mineSpeed = 6f;
|
||||
mineTier = 4;
|
||||
buildSpeed = 2f;
|
||||
drag = 0.06f;
|
||||
speed = 2.6f;
|
||||
|
||||
@@ -293,6 +293,12 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
|
||||
player.clearUnit();
|
||||
|
||||
//remove player unit
|
||||
Unit unit = Groups.unit.find(u -> u.spawnedByCore);
|
||||
if(unit != null){
|
||||
unit.remove();
|
||||
}
|
||||
|
||||
Map returned = null;
|
||||
|
||||
if(name.isEmpty()){
|
||||
|
||||
@@ -23,7 +23,8 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
|
||||
transient float mineTimer;
|
||||
@Nullable @SyncLocal Tile mineTile;
|
||||
|
||||
public boolean canMine(Item item){
|
||||
public boolean canMine(@Nullable Item item){
|
||||
if(item == null) return false;
|
||||
return type.mineTier >= item.hardness;
|
||||
}
|
||||
|
||||
@@ -35,9 +36,28 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
|
||||
return mineTile != null && !this.<Unit>self().activelyBuilding();
|
||||
}
|
||||
|
||||
public @Nullable Item getMineResult(@Nullable Tile tile){
|
||||
if(tile == null) return null;
|
||||
Item result;
|
||||
if(type.mineFloor && tile.block() == Blocks.air){
|
||||
result = tile.drop();
|
||||
}else if(type.mineWalls){
|
||||
result = tile.wallDrop();
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
return canMine(result) ? result : null;
|
||||
}
|
||||
|
||||
public boolean validMine(Tile tile, boolean checkDst){
|
||||
return !(tile == null || tile.block() != Blocks.air || (!within(tile.worldx(), tile.worldy(), type.miningRange) && checkDst)
|
||||
|| tile.drop() == null || !canMine(tile.drop()));
|
||||
if(tile == null) return false;
|
||||
|
||||
if(checkDst && !within(tile.worldx(), tile.worldy(), type.miningRange)){
|
||||
return false;
|
||||
}
|
||||
|
||||
return getMineResult(tile) != null;
|
||||
}
|
||||
|
||||
public boolean validMine(Tile tile){
|
||||
@@ -50,9 +70,12 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
Building core = closestCore();
|
||||
if(mineTile == null) return;
|
||||
|
||||
if(core != null && mineTile != null && mineTile.drop() != null && !acceptsItem(mineTile.drop()) && within(core, mineTransferRange) && !offloadImmediately()){
|
||||
Building core = closestCore();
|
||||
Item item = getMineResult(mineTile);
|
||||
|
||||
if(core != null && item != null && !acceptsItem(item) && within(core, mineTransferRange) && !offloadImmediately()){
|
||||
int accepted = core.acceptStack(item(), stack().amount, this);
|
||||
if(accepted > 0){
|
||||
Call.transferItemTo(self(), item(), accepted,
|
||||
@@ -65,8 +88,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
|
||||
if((!net.client() || isLocal()) && !validMine(mineTile)){
|
||||
mineTile = null;
|
||||
mineTimer = 0f;
|
||||
}else if(mining()){
|
||||
Item item = mineTile.drop();
|
||||
}else if(mining() && item != null){
|
||||
mineTimer += Time.delta *type.mineSpeed;
|
||||
|
||||
if(Mathf.chance(0.06 * Time.delta)){
|
||||
|
||||
@@ -1048,11 +1048,9 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
|
||||
boolean canMine(Tile tile){
|
||||
return !Core.scene.hasMouse()
|
||||
&& tile.drop() != null
|
||||
&& player.unit().validMine(tile)
|
||||
&& !((!Core.settings.getBool("doubletapmine") && tile.floor().playerUnmineable) && tile.overlay().itemDrop == null)
|
||||
&& player.unit().acceptsItem(tile.drop())
|
||||
&& tile.block() == Blocks.air;
|
||||
&& player.unit().acceptsItem(player.unit().getMineResult(tile))
|
||||
&& !((!Core.settings.getBool("doubletapmine") && tile.floor().playerUnmineable) && tile.overlay().itemDrop == null);
|
||||
}
|
||||
|
||||
/** Returns the tile at the specified MOUSE coordinates. */
|
||||
|
||||
@@ -127,6 +127,7 @@ public class UnitType extends UnlockableContent{
|
||||
public int ammoCapacity = -1;
|
||||
public AmmoType ammoType = new ItemAmmoType(Items.copper);
|
||||
public int mineTier = -1;
|
||||
public boolean mineWalls = false, mineFloor = true;
|
||||
public float buildSpeed = -1f, mineSpeed = 1f;
|
||||
public Sound mineSound = Sounds.minebeam;
|
||||
public float mineSoundVolume = 0.6f;
|
||||
|
||||
@@ -761,7 +761,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
}
|
||||
|
||||
if(state.planet.hasGrid()){
|
||||
hovered = state.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad);
|
||||
hovered = Core.scene.getDialog() == this ? state.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad) : null;
|
||||
}else if(state.planet.isLandable()){
|
||||
boolean wasNull = selected == null;
|
||||
//always have the first sector selected.
|
||||
|
||||
Reference in New Issue
Block a user