Untested support for JSON planets

This commit is contained in:
Anuken
2022-02-06 12:47:23 -05:00
parent 5fd139261f
commit fce3cf818e
10 changed files with 112 additions and 15 deletions

View File

@@ -20,7 +20,7 @@ import static mindustry.Vars.*;
public class RegenProjector extends Block{
private static final IntSet taken = new IntSet();
//map ID to mend amount
//map building pos to mend amount (TODO just use buildings as keys? no lookup)
private static final IntFloatMap mendMap = new IntFloatMap();
private static long lastUpdateFrame = -1;

View File

@@ -135,6 +135,14 @@ public class UnitPayload implements Payload{
//TODO should not happen
if(unit.type == null) return;
//TODO this would be more accurate but has all sorts of associated problems
if(false){
unit.elevation = 0f;
//avoids drawing mining or building
unit.type.draw(unit);
return;
}
unit.type.drawSoftShadow(unit);
Draw.rect(unit.type.fullIcon, unit.x, unit.y, unit.rotation - 90);
unit.type.drawCell(unit);