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

View File

@@ -19,7 +19,7 @@ import java.util.*;
}) })
public class RemoteProcess extends BaseProcessor{ public class RemoteProcess extends BaseProcessor{
/** Maximum size of each event packet. */ /** Maximum size of each event packet. */
public static final int maxPacketSize = 4096; public static final int maxPacketSize = 8192;
/** Warning on top of each autogenerated file. */ /** Warning on top of each autogenerated file. */
public static final String autogenWarning = "Autogenerated file. Do not modify!\n"; public static final String autogenWarning = "Autogenerated file. Do not modify!\n";

View File

@@ -20,6 +20,7 @@ mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
mindustry.world.blocks.defense.ForceProjector.ForceDrawComp=22 mindustry.world.blocks.defense.ForceProjector.ForceDrawComp=22
mono=16 mono=16
nova=17 nova=17
oct=26
poly=18 poly=18
pulsar=19 pulsar=19
quad=23 quad=23

View File

@@ -0,0 +1 @@
{fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:health,type:float},{name:isShooting,type:boolean},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}

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.poweruse = Power Use
blocks.powerdamage = Power/Damage blocks.powerdamage = Power/Damage
blocks.itemcapacity = Item Capacity blocks.itemcapacity = Item Capacity
blocks.memorycapacity = Memory Capacity
blocks.basepowergeneration = Base Power Generation blocks.basepowergeneration = Base Power Generation
blocks.productiontime = Production Time blocks.productiontime = Production Time
blocks.repairtime = Block Full Repair Time blocks.repairtime = Block Full Repair Time
@@ -1147,6 +1148,7 @@ block.hyper-processor.name = Hyper Processor
block.logic-display.name = Logic Display block.logic-display.name = Logic Display
block.large-logic-display.name = Large Logic Display block.large-logic-display.name = Large Logic Display
block.memory-cell.name = Memory Cell block.memory-cell.name = Memory Cell
block.memory-bank.name = Memory Bank
team.blue.name = blue team.blue.name = blue
team.crux.name = red 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 = 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.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 = 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 = 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.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.[] 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 63426=oct|unit-oct-medium
63425=vela|unit-vela-medium 63425=vela|unit-vela-medium
63424=corvus|unit-corvus-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(); Building core = unit.closestEnemyCore();
boolean rotate = false, shoot = false; boolean rotate = false, shoot = false, moveToTarget = false;
if(!Units.invalidateTarget(target, unit, unit.range())){ if(!Units.invalidateTarget(target, unit, unit.range())){
rotate = true; rotate = true;
@@ -55,11 +55,14 @@ public class SuicideAI extends GroundAI{
} }
if(!blocked){ if(!blocked){
moveToTarget = true;
//move towards target directly //move towards target directly
unit.moveAt(vec.set(target).sub(unit).limit(unit.type().speed)); unit.moveAt(vec.set(target).sub(unit).limit(unit.type().speed));
} }
}else{ }
if(!moveToTarget){
if(command() == UnitCommand.rally){ if(command() == UnitCommand.rally){
Teamc target = targetFlag(unit.x, unit.y, BlockFlag.rally, false); Teamc target = targetFlag(unit.x, unit.y, BlockFlag.rally, false);

View File

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

View File

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

View File

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

View File

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