This commit is contained in:
Anuken
2020-09-23 21:46:40 -04:00
parent f9b46fbf18
commit ada664a2ca
24 changed files with 7038 additions and 6903 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

View File

@@ -602,6 +602,7 @@ blocks.powerconnections = Max Connections
blocks.poweruse = Power Use
blocks.powerdamage = Power/Damage
blocks.itemcapacity = Item Capacity
blocks.memorycapacity = Memory Capacity
blocks.basepowergeneration = Base Power Generation
blocks.productiontime = Production Time
blocks.repairtime = Block Full Repair Time
@@ -1147,6 +1148,7 @@ block.hyper-processor.name = Hyper Processor
block.logic-display.name = Logic Display
block.large-logic-display.name = Large Logic Display
block.memory-cell.name = Memory Cell
block.memory-bank.name = Memory Bank
team.blue.name = blue
team.crux.name = red
@@ -1169,7 +1171,7 @@ tutorial.drillturret = Duo turrets require[accent] copper ammo[] to shoot.\nPlac
tutorial.pause = During battle, you are able to[accent] pause the game.[]\nYou may queue buildings while paused.\n\n[accent]Press space to pause.
tutorial.pause.mobile = During battle, you are able to[accent] pause the game.[]\nYou may queue buildings while paused.\n\n[accent]Press this button in the top left to pause.
tutorial.unpause = Now press space again to unpause.
tutorial.unpause.mobile = Now press it again to unpause.
tutorial.unpause.mobile = Now press it again to unpause.d
tutorial.breaking = Blocks frequently need to be destroyed.\n[accent]Hold down right-click[] to destroy all blocks in a selection.[]\n\n[accent]Destroy all the scrap blocks to the left of your core using area selection.
tutorial.breaking.mobile = Blocks frequently need to be destroyed.\n[accent]Select deconstruction mode[], then tap a block to begin breaking it.\nDestroy an area by holding down your finger for a few seconds[] and dragging in a direction.\nPress the checkmark button to confirm breaking.\n\n[accent]Destroy all the scrap blocks to the left of your core using area selection.
tutorial.withdraw = In some situations, taking items directly from blocks is necessary.\nTo do this, [accent]tap a block[] with items in it, then [accent]tap the item[] in the inventory.\nMultiple items can be withdrawn by [accent]tapping and holding[].\n\n[accent]Withdraw some copper from the core.[]

View File

@@ -318,3 +318,4 @@
63426=oct|unit-oct-medium
63425=vela|unit-vela-medium
63424=corvus|unit-corvus-medium
63423=memory-bank|block-memory-bank-medium

Binary file not shown.

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 813 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 KiB

After

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 KiB

After

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -24,7 +24,7 @@ public class SuicideAI extends GroundAI{
Building core = unit.closestEnemyCore();
boolean rotate = false, shoot = false;
boolean rotate = false, shoot = false, moveToTarget = false;
if(!Units.invalidateTarget(target, unit, unit.range())){
rotate = true;
@@ -55,11 +55,14 @@ public class SuicideAI extends GroundAI{
}
if(!blocked){
moveToTarget = true;
//move towards target directly
unit.moveAt(vec.set(target).sub(unit).limit(unit.type().speed));
}
}else{
}
if(!moveToTarget){
if(command() == UnitCommand.rally){
Teamc target = targetFlag(unit.x, unit.y, BlockFlag.rally, false);

View File

@@ -83,7 +83,7 @@ public class Blocks implements ContentList{
repairPoint, resupplyPoint,
//logic
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell,
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
//campaign
launchPad, launchPadLarge,
@@ -316,6 +316,7 @@ public class Blocks implements ContentList{
snowBoulder = new Boulder("snow-boulder"){{
variants = 2;
snow.asFloor().decoration = ice.asFloor().decoration = iceSnow.asFloor().decoration = this;
}};
dirtWall = new StaticWall("dirt-wall"){{
@@ -1147,7 +1148,7 @@ public class Blocks implements ContentList{
requirements(Category.power, with(Items.copper, 35, Items.graphite, 25, Items.lead, 40, Items.silicon, 30));
powerProduction = 5.5f;
itemDuration = 90f;
consumes.liquid(Liquids.water, 0.07f);
consumes.liquid(Liquids.water, 0.09f);
hasLiquids = true;
size = 2;
}};
@@ -1499,7 +1500,7 @@ public class Blocks implements ContentList{
reloadTime = 35f;
shootCone = 40f;
rotateSpeed = 8f;
powerUse = 4f;
powerUse = 3f;
targetAir = false;
range = 90f;
shootEffect = Fx.lightningShoot;
@@ -1694,7 +1695,7 @@ public class Blocks implements ContentList{
reloadTime = 90f;
firingMoveFract = 0.5f;
shootDuration = 220f;
powerUse = 14f;
powerUse = 17f;
shootSound = Sounds.laserbig;
activeSound = Sounds.beam;
activeSoundVolume = 2f;
@@ -1963,11 +1964,18 @@ public class Blocks implements ContentList{
}};
memoryCell = new MemoryBlock("memory-cell"){{
requirements(Category.logic, with(Items.graphite, 40, Items.silicon, 40));
requirements(Category.logic, with(Items.graphite, 30, Items.silicon, 30));
memoryCapacity = 64;
}};
memoryBank = new MemoryBlock("memory-bank"){{
requirements(Category.logic, with(Items.graphite, 80, Items.silicon, 80, Items.phasefabric, 30));
memoryCapacity = 512;
size = 2;
}};
logicDisplay = new LogicDisplay("logic-display"){{
requirements(Category.logic, with(Items.lead, 100, Items.silicon, 50, Items.metaglass, 50));

View File

@@ -211,7 +211,9 @@ public class TechTree implements ContentList{
});
node(memoryCell, () -> {
node(memoryBank, () -> {
});
});
});

View File

@@ -46,8 +46,11 @@ public class UnitTypes implements ContentList{
//air + building + mining + payload
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType mega;
//air + building + payload TODO implement
public static @EntityDef({Unitc.class, Builderc.class, Payloadc.class}) UnitType quad, oct;
//air + building + payload
public static @EntityDef({Unitc.class, Builderc.class, Payloadc.class}) UnitType quad;
//air + building + payload + command
public static @EntityDef({Unitc.class, Builderc.class, Payloadc.class, Commanderc.class}) UnitType oct;
//air + building + mining
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class}) UnitType alpha, beta, gamma;
@@ -341,7 +344,7 @@ public class UnitTypes implements ContentList{
armor = 9f;
landShake = 2f;
commandLimit = 24;
commandLimit = 18;
mechFrontSway = 0.55f;
speed = 0.4f;
@@ -394,7 +397,7 @@ public class UnitTypes implements ContentList{
canBoost = true;
landShake = 4f;
commandLimit = 32;
commandLimit = 20;
weapons.add(new Weapon("vela-weapon"){{
mirror = false;
@@ -444,7 +447,7 @@ public class UnitTypes implements ContentList{
landShake = 1.5f;
rotateSpeed = 1.5f;
commandLimit = 24;
commandLimit = 20;
legCount = 4;
legLength = 14f;
@@ -1292,6 +1295,7 @@ public class UnitTypes implements ContentList{
payloadCapacity = (5.3f * 5.3f) * tilePayload;
buildSpeed = 4f;
drawShields = false;
commandLimit = 25;
abilities.add(new ForceFieldAbility(140f, 4f, 7000f, 60f * 8), new HealFieldAbility(130f, 60f * 2, 140f));
}};

View File

@@ -172,7 +172,7 @@ public class Universe{
}
//export to another sector
if(sector.save.meta.secinfo.destination != null){
if(sector.save != null && sector.save.meta != null && sector.save.meta.secinfo != null && sector.save.meta.secinfo.destination != null){
Sector to = sector.save.meta.secinfo.destination;
if(to.save != null){
ItemSeq items = to.getExtraItems();

View File

@@ -3,6 +3,7 @@ package mindustry.world.blocks.logic;
import arc.util.io.*;
import mindustry.gen.*;
import mindustry.world.*;
import mindustry.world.meta.*;
public class MemoryBlock extends Block{
public int memoryCapacity = 32;
@@ -13,9 +14,22 @@ public class MemoryBlock extends Block{
solid = true;
}
@Override
public void setStats(){
super.setStats();
stats.add(BlockStat.memoryCapacity, memoryCapacity, StatUnit.none);
}
public class MemoryBuild extends Building{
public double[] memory = new double[memoryCapacity];
//massive byte size means picking up causes sync issues
@Override
public boolean canPickup(){
return false;
}
@Override
public void write(Writes write){
super.write(write);
@@ -31,9 +45,9 @@ public class MemoryBlock extends Block{
super.read(read, revision);
int amount = read.i();
memory = memory.length != amount ? new double[amount] : memory;
for(int i = 0; i < amount; i++){
memory[i] = read.d();
double val = read.d();
if(i < memory.length) memory[i] = val;
}
}
}

View File

@@ -11,6 +11,7 @@ public enum BlockStat{
displaySize(StatCategory.general),
buildTime(StatCategory.general),
buildCost(StatCategory.general),
memoryCapacity(StatCategory.general),
itemCapacity(StatCategory.items),
itemsMoved(StatCategory.items),