Global inventory / 'Deploying' / Removed command center

This commit is contained in:
Anuken
2019-01-09 09:07:48 -05:00
parent 28fa0b070d
commit 048b7bd32f
26 changed files with 4501 additions and 4635 deletions
@@ -525,7 +525,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
return;
}else{
//unlock mech when used
control.unlocks.unlockContent(mech);
data.unlockContent(mech);
}
if(mobile){
@@ -15,9 +15,7 @@ import java.io.DataOutput;
import java.io.IOException;
import static io.anuke.mindustry.Vars.content;
/**
* Class for controlling status effects on an entity.
*/
/** Class for controlling status effects on an entity.*/
public class StatusController implements Saveable{
private static final StatusEntry globalResult = new StatusEntry();
private static final Array<StatusEntry> removals = new Array<>();
@@ -31,7 +31,6 @@ import io.anuke.mindustry.type.ContentType;
import io.anuke.mindustry.type.ItemStack;
import io.anuke.mindustry.type.Weapon;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.units.CommandCenter.CommandCenterEntity;
import io.anuke.mindustry.world.meta.BlockFlag;
import java.io.DataInput;
@@ -100,17 +99,6 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
this.team = team;
}
public boolean isCommanded(){
return !isWave && world.indexer.getAllied(team, BlockFlag.comandCenter).size != 0 && world.indexer.getAllied(team, BlockFlag.comandCenter).first().entity instanceof CommandCenterEntity;
}
public UnitCommand getCommand(){
if(isCommanded()){
return world.indexer.getAllied(team, BlockFlag.comandCenter).first().<CommandCenterEntity>entity().command;
}
return null;
}
public UnitType getType(){
return type;
}
@@ -350,10 +338,6 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
state.set(getStartState());
health(maxHealth());
if(isCommanded()){
onCommand(getCommand());
}
}
@Override
@@ -29,7 +29,7 @@ public class UnitDrops{
for(int i = 0; i < 3; i++){
for(Item item : dropTable){
//only drop unlocked items
if(!Vars.headless && !Vars.control.unlocks.isUnlocked(item)){
if(!Vars.headless && !Vars.data.isUnlocked(item)){
continue;
}