Fixed power being set to NaN / Set splitter sprite to router

This commit is contained in:
Anuken
2018-07-15 11:50:06 -04:00
parent 37b9df3202
commit 92a968217c
8 changed files with 254 additions and 266 deletions

View File

@@ -48,6 +48,7 @@ public class Saves{
}
public void update(){
SaveSlot current = this.current;
if(!state.is(State.menu) && !state.gameOver && current != null && current.isAutosave()){
time += Timers.delta();

View File

@@ -3,6 +3,7 @@ package io.anuke.mindustry.maps;
import io.anuke.ucore.util.GridMap;
public class Sectors{
private static final int sectorSize = 256;
private GridMap<Sector> grid = new GridMap<>();
public Sectors(){

View File

@@ -11,7 +11,7 @@ import io.anuke.mindustry.world.meta.BlockGroup;
import io.anuke.ucore.core.Timers;
public class Splitter extends Block{
protected float speed = 9f;
protected float speed = 8f;
public Splitter(String name){
super(name);

View File

@@ -259,7 +259,7 @@ public class PowerNode extends PowerBlock{
for(int i = 0; i < entity.links.size; i++){
Tile target = world.tile(entity.links.get(i));
if(shouldDistribute(tile, target)){
if(targets > 0 && shouldDistribute(tile, target)){
float transmit = Math.min(result, entity.power.amount);
if(target.block().acceptPower(target, tile, transmit)){