Cleanup
This commit is contained in:
@@ -6,6 +6,7 @@ import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@@ -38,19 +39,15 @@ public class Effects{
|
||||
Rect pos = Tmp.r2.setSize(effect.size).setCenter(x, y);
|
||||
|
||||
if(view.overlaps(pos)){
|
||||
//TODO implement create() method here.
|
||||
//EffectEntity entity = Pools.obtain(EffectEntity.class, EffectEntity::new);
|
||||
//entity.effect = effect;
|
||||
//entity.color.set(color);
|
||||
//entity.rotation = rotation;
|
||||
//entity.data = data;
|
||||
//entity.id++;
|
||||
//entity.set(x, y);
|
||||
//if(data instanceof Entity){
|
||||
// entity.setParent((Entity)data);
|
||||
//}
|
||||
//TODO ground effect
|
||||
//effectGroup.add(entity);
|
||||
EffectEntity entity = EffectEntity.create();
|
||||
entity.effect(effect);
|
||||
entity.rotation(rotation);
|
||||
entity.data(data);
|
||||
entity.id(EntityGroup.nextId());
|
||||
entity.set(x, y);
|
||||
entity.color().set(color);
|
||||
if(data instanceof Posc) entity.parent((Posc)data);
|
||||
entity.add();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class AllEntities{
|
||||
@EntityDef(value = {Tilec.class}, isFinal = false)
|
||||
class TileDef{}
|
||||
|
||||
@EntityDef(value = {Effectc.class}, pooled = true)
|
||||
@EntityDef(value = {Effectc.class, Childc.class}, pooled = true)
|
||||
class EffectDef{}
|
||||
|
||||
@EntityDef({Decalc.class})
|
||||
|
||||
@@ -8,8 +8,8 @@ import mindustry.gen.*;
|
||||
abstract class ChildComp implements Posc{
|
||||
transient float x, y;
|
||||
|
||||
private @Nullable Posc parent;
|
||||
private float offsetX, offsetY;
|
||||
@Nullable Posc parent;
|
||||
float offsetX, offsetY;
|
||||
|
||||
@Override
|
||||
public void add(){
|
||||
|
||||
@@ -78,11 +78,6 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc{
|
||||
}
|
||||
|
||||
public Unitc unit(){
|
||||
if(dead()){
|
||||
//TODO remove
|
||||
Log.err("WARNING: DEAD PLAYER UNIT ACCESSED");
|
||||
new RuntimeException().printStackTrace();
|
||||
}
|
||||
return unit;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,20 +58,17 @@ public class SpawnGroup implements Serializable{
|
||||
* This method does not add() the unit.
|
||||
*/
|
||||
public Unitc createUnit(Team team){
|
||||
//TODO
|
||||
throw new IllegalArgumentException("TODO");
|
||||
/*
|
||||
Unitc unit = type.create(team);
|
||||
|
||||
if(effect != null){
|
||||
unit.applyEffect(effect, 999999f);
|
||||
unit.apply(effect, 999999f);
|
||||
}
|
||||
|
||||
if(items != null){
|
||||
unit.addItem(items.item, items.amount);
|
||||
}
|
||||
|
||||
return unit;*/
|
||||
return unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.zip.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
/** Reads and writes map files. */
|
||||
//TODO does this class even need to exist??? move to Maps?
|
||||
public class MapIO{
|
||||
private static final int[] pngHeader = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import arc.util.*;
|
||||
import mindustry.graphics.PlanetGrid.*;
|
||||
|
||||
/** A small section of a planet. */
|
||||
//TODO should this be content?
|
||||
public class Sector{
|
||||
public final SectorRect rect;
|
||||
public final Planet planet;
|
||||
|
||||
@@ -131,56 +131,6 @@ public class ContentDisplay{
|
||||
table.row();
|
||||
}
|
||||
|
||||
//TODO implement later
|
||||
/*
|
||||
public static void displayMech(Table table, Mech mech){
|
||||
table.table(title -> {
|
||||
title.addImage(mech.icon(Cicon.xlarge)).size(8 * 6);
|
||||
title.add("[accent]" + mech.localizedName).padLeft(5);
|
||||
});
|
||||
table.left().defaults().left();
|
||||
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
|
||||
table.row();
|
||||
|
||||
if(mech.description != null){
|
||||
table.add(mech.displayDescription()).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.row();
|
||||
}
|
||||
|
||||
table.left().defaults().fillX();
|
||||
|
||||
if(Core.bundle.has("mech." + mech.name + ".weapon")){
|
||||
table.add(Core.bundle.format("mech.weapon", Core.bundle.get("mech." + mech.name + ".weapon")));
|
||||
table.row();
|
||||
}
|
||||
if(Core.bundle.has("mech." + mech.name + ".ability")){
|
||||
table.add(Core.bundle.format("mech.ability", Core.bundle.get("mech." + mech.name + ".ability")));
|
||||
table.row();
|
||||
}
|
||||
|
||||
table.add(Core.bundle.format("mech.buildspeed", (int)(mech.buildPower * 100f)));
|
||||
table.row();
|
||||
|
||||
table.add(Core.bundle.format("mech.health", (int)mech.health));
|
||||
table.row();
|
||||
table.add(Core.bundle.format("mech.itemcapacity", mech.itemCapacity));
|
||||
table.row();
|
||||
|
||||
if(mech.drillPower > 0){
|
||||
table.add(Core.bundle.format("mech.minespeed", (int)(mech.mineSpeed * 100f)));
|
||||
table.row();
|
||||
table.add(Core.bundle.format("mech.minepower", mech.drillPower));
|
||||
table.row();
|
||||
}
|
||||
}*/
|
||||
|
||||
public static void displayUnit(Table table, UnitDef unit){
|
||||
table.table(title -> {
|
||||
title.addImage(unit.icon(Cicon.xlarge)).size(8 * 6);
|
||||
|
||||
Reference in New Issue
Block a user