This commit is contained in:
Anuken 2020-05-28 21:13:25 -04:00
parent c5c8d646f7
commit a7f86b2ba6
12 changed files with 19 additions and 19 deletions

View file

@ -71,12 +71,10 @@ public class Vars implements Loadable{
public static final int maxTextLength = 150;
/** max player name length in bytes */
public static final int maxNameLength = 40;
/** displayed item size when ingame, TODO remove. */
/** displayed item size when ingame. */
public static final float itemSize = 5f;
/** extra padding around the world; units outside this bound will begin to self-destruct. */
public static final float worldBounds = 100f;
/** units outside of this bound will simply die instantly */
public static final float finalWorldBounds = worldBounds + 500;
/** units outside of this bound will die instantly */
public static final float finalWorldBounds = 500;
/** mining range for manual miners */
public static final float miningRange = 70f;
/** range for building */

View file

@ -2,6 +2,7 @@ package mindustry.content;
import arc.math.*;
import arc.struct.*;
import arc.util.ArcAnnotate.*;
import mindustry.ctype.*;
import mindustry.game.Objectives.*;
import mindustry.type.*;
@ -314,15 +315,17 @@ public class TechTree implements ContentList{
public static class TechNode{
private static TechNode context;
/** Depth in tech tree. */
public int depth;
/** Requirement node. */
public TechNode parent;
public @Nullable TechNode parent;
/** Content to be researched. */
public UnlockableContent content;
/** Item requirements for this content. */
public ItemStack[] requirements;
/** Extra objectives needed to research this. TODO implement */
public Objective[] objectives = {};
/** Turns required to research this content. */
/** Research turns required to research this content. */
public int turns = 3; //TODO keep track of turns that have been used so far
/** Nodes that depend on this node. */
public final Array<TechNode> children = new Array<>();
@ -335,6 +338,7 @@ public class TechTree implements ContentList{
this.parent = ccontext;
this.content = content;
this.requirements = requirements;
this.depth = parent == null ? 0 : parent.depth + 1;
context = this;
children.run();

View file

@ -62,7 +62,7 @@ public class Weathers implements ContentList{
};
rain = new Weather("rain"){
float yspeed = 7f, xspeed = 2f, padding = 16f, size = 40f, density = 1200f;
float yspeed = 5f, xspeed = 1.5f, padding = 16f, size = 40f, density = 1200f;
TextureRegion[] splashes = new TextureRegion[12];
@Override

View file

@ -186,7 +186,6 @@ public class Renderer implements ApplicationListener{
graphics.clear(clearColor);
Draw.reset();
//TODO 'animated water' is a bad name for this setting
if(Core.settings.getBool("animatedwater") || Core.settings.getBool("animatedshields")){
effectBuffer.resize(graphics.getWidth(), graphics.getHeight());
}

View file

@ -272,8 +272,8 @@ public class MapEditorDialog extends Dialog implements Disposable{
editor.getTags().put("rules", JsonIO.write(state.rules));
editor.getTags().remove("width");
editor.getTags().remove("height");
//TODO unkill player
//player.dead = true;
player.clearUnit();
Map returned = null;

View file

@ -11,7 +11,6 @@ import mindustry.world.*;
import static mindustry.Vars.*;
//TODO move into a different class
public class Lightning{
private static final Rand random = new Rand();
private static final Rect rect = new Rect();

View file

@ -149,7 +149,6 @@ public class Units{
result = null;
cdist = 0f;
//TODO optimize
for(Unitc e : Groups.unit){
if(!predicate.get(e) || e.team() != team) continue;

View file

@ -129,7 +129,8 @@ public class JsonIO{
@Override
public Block read(Json json, JsonValue jsonData, Class type){
return Vars.content.getByName(ContentType.block, jsonData.asString());
Block block = Vars.content.getByName(ContentType.block, jsonData.asString());
return block == null ? Blocks.air : block;
}
});

View file

@ -364,7 +364,7 @@ public class Tile implements Position, QuadTreeObject{
}
/**
* Returns the list of all tiles linked to this multiblock, or an empty array if it's not a multiblock.
* Returns the list of all tiles linked to this multiblock.
* This array contains all linked tiles, including this tile itself.
*/
public Array<Tile> getLinkedTiles(Array<Tile> tmpArray){
@ -374,7 +374,7 @@ public class Tile implements Position, QuadTreeObject{
}
/**
* Returns the list of all tiles linked to this multiblock if it were this block, or an empty array if it's not a multiblock.
* Returns the list of all tiles linked to this multiblock if it were this block.
* This array contains all linked tiles, including this tile itself.
*/
public Array<Tile> getLinkedTilesAs(Block block, Array<Tile> tmpArray){

View file

@ -56,8 +56,7 @@ public class PowerGraph{
/** @return multiplier of speed at which resources should be consumed for power generation. */
public float getUsageFraction(){
//TODO enable it later, or not?
return 1f; //lastUsageFraction;
return 1f;
}
public float getPowerProduced(){

View file

@ -9,6 +9,7 @@ import mindustry.gen.*;
import mindustry.world.*;
public class ResearchBlock extends Block{
public float researchSpeed = 1f;
public ResearchBlock(String name){
super(name);

View file

@ -32,7 +32,7 @@ public class Generators{
for(int i = 0; i < frames; i++){
float fin = (float)i / (frames);
float fout = 1f - fin;
float stroke = 4f * fout;
float stroke = 3.5f * fout;
float radius = (size/2f) * fin;
Pixmap pixmap = new Pixmap(size, size);