Added T3 logic processor
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
core/assets-raw/sprites/blocks/logic/hyper-processor.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -575,6 +575,8 @@ blocks.shootrange = Range
|
|||||||
blocks.size = Size
|
blocks.size = Size
|
||||||
blocks.liquidcapacity = Liquid Capacity
|
blocks.liquidcapacity = Liquid Capacity
|
||||||
blocks.powerrange = Power Range
|
blocks.powerrange = Power Range
|
||||||
|
blocks.linkrange = Link Range
|
||||||
|
blocks.instructions = Instructions
|
||||||
blocks.powerconnections = Max Connections
|
blocks.powerconnections = Max Connections
|
||||||
blocks.poweruse = Power Use
|
blocks.poweruse = Power Use
|
||||||
blocks.powerdamage = Power/Damage
|
blocks.powerdamage = Power/Damage
|
||||||
@@ -1089,6 +1091,7 @@ block.overdrive-dome.name = Overdrive Dome
|
|||||||
block.switch.name = Switch
|
block.switch.name = Switch
|
||||||
block.micro-processor.name = Micro Processor
|
block.micro-processor.name = Micro Processor
|
||||||
block.logic-processor.name = Logic Processor
|
block.logic-processor.name = Logic Processor
|
||||||
|
block.hyper-processor.name = Hyper Processor
|
||||||
block.logic-display.name = Logic Display
|
block.logic-display.name = Logic Display
|
||||||
block.memory-cell.name = Memory Cell
|
block.memory-cell.name = Memory Cell
|
||||||
|
|
||||||
|
|||||||
@@ -286,3 +286,4 @@
|
|||||||
63458=switch|block-switch-medium
|
63458=switch|block-switch-medium
|
||||||
63457=memory-cell|block-memory-cell-medium
|
63457=memory-cell|block-memory-cell-medium
|
||||||
63456=payload-conveyor|block-payload-conveyor-medium
|
63456=payload-conveyor|block-payload-conveyor-medium
|
||||||
|
63455=hyper-processor|block-hyper-processor-medium
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 788 B After Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 410 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 402 KiB After Width: | Height: | Size: 415 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@@ -83,7 +83,7 @@ public class Blocks implements ContentList{
|
|||||||
repairPoint, resupplyPoint,
|
repairPoint, resupplyPoint,
|
||||||
|
|
||||||
//logic
|
//logic
|
||||||
message, switchBlock, microProcessor, logicProcessor, logicDisplay, memoryCell,
|
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, logicDisplay, memoryCell,
|
||||||
|
|
||||||
//campaign
|
//campaign
|
||||||
launchPad, launchPadLarge,
|
launchPad, launchPadLarge,
|
||||||
@@ -1488,7 +1488,7 @@ public class Blocks implements ContentList{
|
|||||||
reloadTime = 35f;
|
reloadTime = 35f;
|
||||||
shootCone = 40f;
|
shootCone = 40f;
|
||||||
rotatespeed = 8f;
|
rotatespeed = 8f;
|
||||||
powerUse = 5f;
|
powerUse = 4f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
range = 90f;
|
range = 90f;
|
||||||
shootEffect = Fx.lightningShoot;
|
shootEffect = Fx.lightningShoot;
|
||||||
@@ -1558,14 +1558,14 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
segment = new PointDefenseTurret("segment"){{
|
segment = new PointDefenseTurret("segment"){{
|
||||||
requirements(Category.turret, with(Items.silicon, 130, Items.thorium, 80, Items.phasefabric, 50));
|
requirements(Category.turret, with(Items.silicon, 130, Items.thorium, 80, Items.phasefabric, 25));
|
||||||
|
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
consumes.power(3f);
|
consumes.power(3f);
|
||||||
size = 2;
|
size = 2;
|
||||||
shootLength = 5f;
|
shootLength = 5f;
|
||||||
bulletDamage = 12f;
|
bulletDamage = 12f;
|
||||||
reloadTime = 25f;
|
reloadTime = 20f;
|
||||||
health = 190 * size * size;
|
health = 190 * size * size;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -1775,7 +1775,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
size = 7;
|
size = 7;
|
||||||
consumes.power(12f);
|
consumes.power(12f);
|
||||||
consumes.items(with(Items.silicon, 250, Items.titanium, 500, Items.plastanium, 400));
|
consumes.items(with(Items.silicon, 250, Items.titanium, 500, Items.plastanium, 450));
|
||||||
consumes.liquid(Liquids.cryofluid, 1f);
|
consumes.liquid(Liquids.cryofluid, 1f);
|
||||||
|
|
||||||
constructTime = 60f * 60f * 1.5f;
|
constructTime = 60f * 60f * 1.5f;
|
||||||
@@ -1791,7 +1791,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
size = 9;
|
size = 9;
|
||||||
consumes.power(25f);
|
consumes.power(25f);
|
||||||
consumes.items(with(Items.silicon, 350, Items.plastanium, 450, Items.surgealloy, 400, Items.phasefabric, 150));
|
consumes.items(with(Items.silicon, 350, Items.plastanium, 450, Items.surgealloy, 350, Items.phasefabric, 150));
|
||||||
consumes.liquid(Liquids.cryofluid, 3f);
|
consumes.liquid(Liquids.cryofluid, 3f);
|
||||||
|
|
||||||
constructTime = 60f * 60f * 4;
|
constructTime = 60f * 60f * 4;
|
||||||
@@ -1900,7 +1900,7 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
microProcessor = new LogicBlock("micro-processor"){{
|
microProcessor = new LogicBlock("micro-processor"){{
|
||||||
requirements(Category.logic, with(Items.copper, 80, Items.lead, 50, Items.silicon, 60));
|
requirements(Category.logic, with(Items.copper, 80, Items.lead, 50, Items.silicon, 50));
|
||||||
|
|
||||||
instructionsPerTick = 2;
|
instructionsPerTick = 2;
|
||||||
|
|
||||||
@@ -1908,15 +1908,28 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
logicProcessor = new LogicBlock("logic-processor"){{
|
logicProcessor = new LogicBlock("logic-processor"){{
|
||||||
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 140, Items.graphite, 80, Items.thorium, 70));
|
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 100, Items.graphite, 60, Items.thorium, 50));
|
||||||
|
|
||||||
instructionsPerTick = 5;
|
instructionsPerTick = 5;
|
||||||
|
|
||||||
range = 16 * 10;
|
range = 8 * 20;
|
||||||
|
|
||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
hyperProcessor = new LogicBlock("hyper-processor"){{
|
||||||
|
requirements(Category.logic, with(Items.lead, 450, Items.silicon, 150, Items.thorium, 75, Items.surgealloy, 50));
|
||||||
|
|
||||||
|
consumes.liquid(Liquids.cryofluid, 0.08f);
|
||||||
|
hasLiquids = true;
|
||||||
|
|
||||||
|
instructionsPerTick = 15;
|
||||||
|
|
||||||
|
range = 8 * 40;
|
||||||
|
|
||||||
|
size = 3;
|
||||||
|
}};
|
||||||
|
|
||||||
logicDisplay = new LogicDisplay("logic-display"){{
|
logicDisplay = new LogicDisplay("logic-display"){{
|
||||||
requirements(Category.logic, with(Items.copper, 200, Items.lead, 120, Items.silicon, 100, Items.metaglass, 50));
|
requirements(Category.logic, with(Items.copper, 200, Items.lead, 120, Items.silicon, 100, Items.metaglass, 50));
|
||||||
|
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
horizon = new UnitType("horizon"){{
|
horizon = new UnitType("horizon"){{
|
||||||
health = 300;
|
health = 350;
|
||||||
speed = 2f;
|
speed = 2f;
|
||||||
accel = 0.08f;
|
accel = 0.08f;
|
||||||
drag = 0.016f;
|
drag = 0.016f;
|
||||||
@@ -458,19 +458,19 @@ public class UnitTypes implements ContentList{
|
|||||||
engineOffset = 7.8f;
|
engineOffset = 7.8f;
|
||||||
range = 140f;
|
range = 140f;
|
||||||
faceTarget = false;
|
faceTarget = false;
|
||||||
armor = 2f;
|
armor = 4f;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
minShootVelocity = 0.75f;
|
minShootVelocity = 0.75f;
|
||||||
x = 3f;
|
x = 3f;
|
||||||
shootY = 0f;
|
shootY = 0f;
|
||||||
reload = 12f;
|
reload = 11f;
|
||||||
shootCone = 180f;
|
shootCone = 180f;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
inaccuracy = 15f;
|
inaccuracy = 15f;
|
||||||
ignoreRotation = true;
|
ignoreRotation = true;
|
||||||
shootSound = Sounds.none;
|
shootSound = Sounds.none;
|
||||||
bullet = new BombBulletType(23f, 25f){{
|
bullet = new BombBulletType(28f, 25f){{
|
||||||
width = 10f;
|
width = 10f;
|
||||||
height = 14f;
|
height = 14f;
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
@@ -534,7 +534,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 1.9f;
|
rotateSpeed = 1.9f;
|
||||||
flying = true;
|
flying = true;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
health = 9000;
|
health = 8000;
|
||||||
armor = 9f;
|
armor = 9f;
|
||||||
engineOffset = 21;
|
engineOffset = 21;
|
||||||
engineSize = 5.3f;
|
engineSize = 5.3f;
|
||||||
|
|||||||
@@ -167,8 +167,8 @@ public class ContentLoader{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handleContent(Content content){
|
public void handleContent(Content content){
|
||||||
if(content instanceof Item && content.id > 127){
|
if(content instanceof Item && content.id > 255){
|
||||||
throw new IllegalArgumentException("You may not have more than 127 different items total. Remove some mods.");
|
throw new IllegalArgumentException("You may not have more than 255 different items total. Remove some mods.");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.lastAdded = content;
|
this.lastAdded = content;
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ public abstract class Turret extends Block{
|
|||||||
canShoot = unit.isShooting();
|
canShoot = unit.isShooting();
|
||||||
}else if(logicControlled()){ //logic behavior
|
}else if(logicControlled()){ //logic behavior
|
||||||
canShoot = logicShooting;
|
canShoot = logicShooting;
|
||||||
}else{ //default AI behavior
|
}else if(peekAmmo() != null){ //default AI behavior
|
||||||
BulletType type = peekAmmo();
|
BulletType type = peekAmmo();
|
||||||
float speed = type.speed;
|
float speed = type.speed;
|
||||||
//slow bullets never intersect
|
//slow bullets never intersect
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import mindustry.logic.LExecutor.*;
|
|||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.BuildBlock.*;
|
import mindustry.world.blocks.BuildBlock.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.zip.*;
|
import java.util.zip.*;
|
||||||
@@ -113,6 +114,14 @@ public class LogicBlock extends Block{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setStats(){
|
||||||
|
super.setStats();
|
||||||
|
|
||||||
|
stats.add(BlockStat.linkRange, range / 8, StatUnit.blocks);
|
||||||
|
stats.add(BlockStat.instructions, instructionsPerTick * 60, StatUnit.perSecond);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
Drawf.circles(x*tilesize + offset, y*tilesize + offset, range);
|
Drawf.circles(x*tilesize + offset, y*tilesize + offset, range);
|
||||||
@@ -340,7 +349,7 @@ public class LogicBlock extends Block{
|
|||||||
updateCode();
|
updateCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
accumulator += edelta() * instructionsPerTick;
|
accumulator += edelta() * instructionsPerTick * (consValid() ? 1 : 0);
|
||||||
|
|
||||||
if(accumulator > maxInstructionScale * instructionsPerTick) accumulator = maxInstructionScale * instructionsPerTick;
|
if(accumulator > maxInstructionScale * instructionsPerTick) accumulator = maxInstructionScale * instructionsPerTick;
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ public enum BlockStat{
|
|||||||
drillTier(StatCategory.crafting),
|
drillTier(StatCategory.crafting),
|
||||||
drillSpeed(StatCategory.crafting),
|
drillSpeed(StatCategory.crafting),
|
||||||
maxUnits(StatCategory.crafting),
|
maxUnits(StatCategory.crafting),
|
||||||
|
linkRange(StatCategory.crafting),
|
||||||
|
instructions(StatCategory.crafting),
|
||||||
|
|
||||||
speedIncrease(StatCategory.shooting),
|
speedIncrease(StatCategory.shooting),
|
||||||
repairTime(StatCategory.shooting),
|
repairTime(StatCategory.shooting),
|
||||||
|
|||||||
@@ -295,11 +295,11 @@ public class ItemModule extends BlockModule{
|
|||||||
public void read(Reads read){
|
public void read(Reads read){
|
||||||
//just in case, reset items
|
//just in case, reset items
|
||||||
Arrays.fill(items, 0);
|
Arrays.fill(items, 0);
|
||||||
byte count = read.b();
|
int count = read.ub();
|
||||||
total = 0;
|
total = 0;
|
||||||
|
|
||||||
for(int j = 0; j < count; j++){
|
for(int j = 0; j < count; j++){
|
||||||
int itemid = read.b();
|
int itemid = read.ub();
|
||||||
int itemamount = read.i();
|
int itemamount = read.i();
|
||||||
items[content.item(itemid).id] = itemamount;
|
items[content.item(itemid).id] = itemamount;
|
||||||
total += itemamount;
|
total += itemamount;
|
||||||
|
|||||||