This commit is contained in:
Anuken
2020-08-27 13:45:07 -04:00
parent fba7f7592b
commit 92aba83450
6 changed files with 17 additions and 10 deletions

View File

@@ -429,8 +429,6 @@ public class TechTree implements ContentList{
});
});
//TODO research sectors
node(groundZero, () -> {
node(frozenForest, Seq.with(
new SectorComplete(groundZero),
@@ -579,7 +577,7 @@ public class TechTree implements ContentList{
public ItemStack[] requirements;
/** Requirements that have been fulfilled. Always the same length as the requirement array. */
public final ItemStack[] finishedRequirements;
/** Extra objectives needed to research this. TODO implement */
/** Extra objectives needed to research this. */
public Seq<Objective> objectives = new Seq<>();
/** Time required to research this content, in seconds. */
public float time;

View File

@@ -144,7 +144,6 @@ abstract class BuilderComp implements Unitc{
boolean shouldSkip(BuildPlan request, @Nullable Building core){
//requests that you have at least *started* are considered
if(state.rules.infiniteResources || team().rules().infiniteResources || request.breaking || core == null) return false;
//TODO these are bad criteria
return (request.stuck && !core.items.has(request.block.requirements)) || (Structs.contains(request.block.requirements, i -> !core.items.has(i.item)) && !request.initialized);
}

View File

@@ -82,7 +82,6 @@ public class EventType{
}
}
public static class CommandIssueEvent{
public final Building tile;
public final UnitCommand command;

View File

@@ -17,7 +17,7 @@ import mindustry.world.blocks.production.*;
import static mindustry.Vars.*;
public class PayloadConveyor extends Block{
public float moveTime = 70f;
public float moveTime = 60f;
public @Load("@-top") TextureRegion topRegion;
public @Load("@-edge") TextureRegion edgeRegion;
public Interp interp = Interp.pow5;
@@ -98,7 +98,7 @@ public class PayloadConveyor extends Block{
public void updateTile(){
if(!enabled) return;
progress = Time.time() % moveTime;
progress = time() % moveTime;
updatePayload();
@@ -187,6 +187,10 @@ public class PayloadConveyor extends Block{
}
}
public float time(){
return Time.time();
}
@Override
public boolean acceptPayload(Building source, Payload payload){
//accepting payloads from units isn't supported
@@ -276,7 +280,7 @@ public class PayloadConveyor extends Block{
}
public int curStep(){
return (int)((Time.time()) / moveTime);
return (int)((time()) / moveTime);
}
public float fract(){

View File

@@ -10,7 +10,7 @@ public enum BlockFlag{
turret,
/** Repair point. */
repair,
/** Rally point. TODO remove*/
/** Rally point. */
rally,
/** Any block that boosts unit capacity. */
unitModifier;