mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
parent
bcb248907c
commit
65d9978fa1
7 changed files with 21 additions and 9 deletions
|
|
@ -1341,6 +1341,7 @@ public class Blocks implements ContentList{
|
|||
size = 4;
|
||||
|
||||
unitCapModifier = 14;
|
||||
researchCostMultiplier = 0.04f;
|
||||
}};
|
||||
|
||||
coreNucleus = new CoreBlock("core-nucleus"){{
|
||||
|
|
@ -1352,6 +1353,7 @@ public class Blocks implements ContentList{
|
|||
size = 5;
|
||||
|
||||
unitCapModifier = 20;
|
||||
researchCostMultiplier = 0.06f;
|
||||
}};
|
||||
|
||||
vault = new StorageBlock("vault"){{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import mindustry.game.EventType.*;
|
|||
import mindustry.game.*;
|
||||
import mindustry.game.Teams.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.maps.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.type.Weather.*;
|
||||
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
|
||||
float turnsPassed = seconds / (turnDuration / 60f);
|
||||
|
||||
if(state.rules.sector.hasWaves() && turnsPassed > 0 && state.rules.sector.hasBase()){
|
||||
SectorDamage.apply(turnsPassed / sectorDestructionTurns);
|
||||
}
|
||||
//TODO sector damage disabled for now
|
||||
//if(state.rules.sector.hasWaves() && turnsPassed > 0 && state.rules.sector.hasBase()){
|
||||
// SectorDamage.apply(turnsPassed / sectorDestructionTurns);
|
||||
//}
|
||||
|
||||
//add resources based on turns passed
|
||||
if(state.rules.sector.save != null && core != null){
|
||||
|
|
|
|||
|
|
@ -140,8 +140,9 @@ public class Universe{
|
|||
if(!sector.isBeingPlayed()){
|
||||
sector.setSecondsPassed(sector.getSecondsPassed() + actuallyPassed);
|
||||
|
||||
//TODO sector damage disabled for now
|
||||
//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
|
||||
Events.fire(new SectorLoseEvent(sector));
|
||||
|
||||
|
|
@ -151,7 +152,7 @@ public class Universe{
|
|||
//clear recieved
|
||||
sector.setExtraItems(new ItemSeq());
|
||||
sector.save = null;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
//export to another sector
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ public class DesktopInput extends InputHandler{
|
|||
public void 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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class MinimapFragment extends Fragment{
|
|||
private boolean shown;
|
||||
float panx, pany, zoom = 1f, lastZoom = -1;
|
||||
private float baseSize = Scl.scl(5f);
|
||||
private Element elem;
|
||||
public Element elem;
|
||||
|
||||
@Override
|
||||
public void build(Group parent){
|
||||
|
|
|
|||
|
|
@ -193,6 +193,8 @@ public class Block extends UnlockableContent{
|
|||
public BuildPlaceability buildPlaceability = BuildPlaceability.always;
|
||||
/** Multiplier for speed of building this block. */
|
||||
public float buildCostMultiplier = 1f;
|
||||
/** Multiplier for cost of research in tech tree. */
|
||||
public float researchCostMultiplier = 1;
|
||||
/** Whether this block has instant transfer.*/
|
||||
public boolean instantTransfer = false;
|
||||
/** Whether you can rotate this block with Keybind rotateplaced + Scroll Wheel. */
|
||||
|
|
@ -619,7 +621,7 @@ public class Block extends UnlockableContent{
|
|||
public ItemStack[] researchRequirements(){
|
||||
ItemStack[] out = new ItemStack[requirements.length];
|
||||
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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import mindustry.game.EventType.*;
|
|||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.logic.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.*;
|
||||
|
|
@ -159,6 +160,12 @@ public class CoreBlock extends StorageBlock{
|
|||
public BlockUnitc unit = Nulls.blockUnit;
|
||||
public boolean noEffect = false;
|
||||
|
||||
@Override
|
||||
public double sense(LAccess sensor){
|
||||
if(sensor == LAccess.itemCapacity) return storageCapacity;
|
||||
return super.sense(sensor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void created(){
|
||||
unit = (BlockUnitc)UnitTypes.block.create(team);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue