@@ -1341,6 +1341,7 @@ public class Blocks implements ContentList{
|
|||||||
size = 4;
|
size = 4;
|
||||||
|
|
||||||
unitCapModifier = 14;
|
unitCapModifier = 14;
|
||||||
|
researchCostMultiplier = 0.04f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
coreNucleus = new CoreBlock("core-nucleus"){{
|
coreNucleus = new CoreBlock("core-nucleus"){{
|
||||||
@@ -1352,6 +1353,7 @@ public class Blocks implements ContentList{
|
|||||||
size = 5;
|
size = 5;
|
||||||
|
|
||||||
unitCapModifier = 20;
|
unitCapModifier = 20;
|
||||||
|
researchCostMultiplier = 0.06f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
vault = new StorageBlock("vault"){{
|
vault = new StorageBlock("vault"){{
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import mindustry.game.EventType.*;
|
|||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.game.Teams.*;
|
import mindustry.game.Teams.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.maps.*;
|
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.type.Weather.*;
|
import mindustry.type.Weather.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
@@ -93,9 +92,10 @@ public class Logic implements ApplicationListener{
|
|||||||
//apply fractional damage based on how many turns have passed for this sector
|
//apply fractional damage based on how many turns have passed for this sector
|
||||||
float turnsPassed = seconds / (turnDuration / 60f);
|
float turnsPassed = seconds / (turnDuration / 60f);
|
||||||
|
|
||||||
if(state.rules.sector.hasWaves() && turnsPassed > 0 && state.rules.sector.hasBase()){
|
//TODO sector damage disabled for now
|
||||||
SectorDamage.apply(turnsPassed / sectorDestructionTurns);
|
//if(state.rules.sector.hasWaves() && turnsPassed > 0 && state.rules.sector.hasBase()){
|
||||||
}
|
// SectorDamage.apply(turnsPassed / sectorDestructionTurns);
|
||||||
|
//}
|
||||||
|
|
||||||
//add resources based on turns passed
|
//add resources based on turns passed
|
||||||
if(state.rules.sector.save != null && core != null){
|
if(state.rules.sector.save != null && core != null){
|
||||||
|
|||||||
@@ -140,8 +140,9 @@ public class Universe{
|
|||||||
if(!sector.isBeingPlayed()){
|
if(!sector.isBeingPlayed()){
|
||||||
sector.setSecondsPassed(sector.getSecondsPassed() + actuallyPassed);
|
sector.setSecondsPassed(sector.getSecondsPassed() + actuallyPassed);
|
||||||
|
|
||||||
|
//TODO sector damage disabled for now
|
||||||
//check if the sector has been attacked too many times...
|
//check if the sector has been attacked too many times...
|
||||||
if(sector.hasBase() && sector.hasWaves() && sector.getSecondsPassed() * 60f > turnDuration * sectorDestructionTurns){
|
/*if(sector.hasBase() && sector.hasWaves() && sector.getSecondsPassed() * 60f > turnDuration * sectorDestructionTurns){
|
||||||
//fire event for losing the sector
|
//fire event for losing the sector
|
||||||
Events.fire(new SectorLoseEvent(sector));
|
Events.fire(new SectorLoseEvent(sector));
|
||||||
|
|
||||||
@@ -151,7 +152,7 @@ public class Universe{
|
|||||||
//clear recieved
|
//clear recieved
|
||||||
sector.setExtraItems(new ItemSeq());
|
sector.setExtraItems(new ItemSeq());
|
||||||
sector.save = null;
|
sector.save = null;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//export to another sector
|
//export to another sector
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
public void update(){
|
public void update(){
|
||||||
super.update();
|
super.update();
|
||||||
|
|
||||||
if(net.active() && Core.input.keyTap(Binding.player_list) && (scene.getKeyboardFocus() == null || scene.getKeyboardFocus().isDescendantOf(ui.listfrag.content))){
|
if(net.active() && Core.input.keyTap(Binding.player_list) && (scene.getKeyboardFocus() == null || scene.getKeyboardFocus().isDescendantOf(ui.listfrag.content) || scene.getKeyboardFocus().isDescendantOf(ui.minimapfrag.elem))){
|
||||||
ui.listfrag.toggle();
|
ui.listfrag.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class MinimapFragment extends Fragment{
|
|||||||
private boolean shown;
|
private boolean shown;
|
||||||
float panx, pany, zoom = 1f, lastZoom = -1;
|
float panx, pany, zoom = 1f, lastZoom = -1;
|
||||||
private float baseSize = Scl.scl(5f);
|
private float baseSize = Scl.scl(5f);
|
||||||
private Element elem;
|
public Element elem;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(Group parent){
|
public void build(Group parent){
|
||||||
|
|||||||
@@ -193,6 +193,8 @@ public class Block extends UnlockableContent{
|
|||||||
public BuildPlaceability buildPlaceability = BuildPlaceability.always;
|
public BuildPlaceability buildPlaceability = BuildPlaceability.always;
|
||||||
/** Multiplier for speed of building this block. */
|
/** Multiplier for speed of building this block. */
|
||||||
public float buildCostMultiplier = 1f;
|
public float buildCostMultiplier = 1f;
|
||||||
|
/** Multiplier for cost of research in tech tree. */
|
||||||
|
public float researchCostMultiplier = 1;
|
||||||
/** Whether this block has instant transfer.*/
|
/** Whether this block has instant transfer.*/
|
||||||
public boolean instantTransfer = false;
|
public boolean instantTransfer = false;
|
||||||
/** Whether you can rotate this block with Keybind rotateplaced + Scroll Wheel. */
|
/** Whether you can rotate this block with Keybind rotateplaced + Scroll Wheel. */
|
||||||
@@ -619,7 +621,7 @@ public class Block extends UnlockableContent{
|
|||||||
public ItemStack[] researchRequirements(){
|
public ItemStack[] researchRequirements(){
|
||||||
ItemStack[] out = new ItemStack[requirements.length];
|
ItemStack[] out = new ItemStack[requirements.length];
|
||||||
for(int i = 0; i < out.length; i++){
|
for(int i = 0; i < out.length; i++){
|
||||||
int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.25f) * 20, 10);
|
int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.25f) * 20 * researchCostMultiplier, 10);
|
||||||
|
|
||||||
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
|
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import mindustry.game.EventType.*;
|
|||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
|
import mindustry.logic.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
@@ -159,6 +160,12 @@ public class CoreBlock extends StorageBlock{
|
|||||||
public BlockUnitc unit = Nulls.blockUnit;
|
public BlockUnitc unit = Nulls.blockUnit;
|
||||||
public boolean noEffect = false;
|
public boolean noEffect = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double sense(LAccess sensor){
|
||||||
|
if(sensor == LAccess.itemCapacity) return storageCapacity;
|
||||||
|
return super.sense(sensor);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void created(){
|
public void created(){
|
||||||
unit = (BlockUnitc)UnitTypes.block.create(team);
|
unit = (BlockUnitc)UnitTypes.block.create(team);
|
||||||
|
|||||||
Reference in New Issue
Block a user