diff --git a/core/src/mindustry/content/TechTree.java b/core/src/mindustry/content/TechTree.java index e7d21444a0..75dc057d6c 100644 --- a/core/src/mindustry/content/TechTree.java +++ b/core/src/mindustry/content/TechTree.java @@ -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 objectives = new Seq<>(); /** Time required to research this content, in seconds. */ public float time; diff --git a/core/src/mindustry/entities/comp/BuilderComp.java b/core/src/mindustry/entities/comp/BuilderComp.java index 241179e7ae..6565ed573d 100644 --- a/core/src/mindustry/entities/comp/BuilderComp.java +++ b/core/src/mindustry/entities/comp/BuilderComp.java @@ -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); } diff --git a/core/src/mindustry/game/EventType.java b/core/src/mindustry/game/EventType.java index 3dcfe0aca2..531ca72cf2 100644 --- a/core/src/mindustry/game/EventType.java +++ b/core/src/mindustry/game/EventType.java @@ -82,7 +82,6 @@ public class EventType{ } } - public static class CommandIssueEvent{ public final Building tile; public final UnitCommand command; diff --git a/core/src/mindustry/world/blocks/distribution/PayloadConveyor.java b/core/src/mindustry/world/blocks/distribution/PayloadConveyor.java index af7c59b0f0..15067d3188 100644 --- a/core/src/mindustry/world/blocks/distribution/PayloadConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/PayloadConveyor.java @@ -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(){ diff --git a/core/src/mindustry/world/meta/BlockFlag.java b/core/src/mindustry/world/meta/BlockFlag.java index 2308448e45..ddf9fa9ba7 100644 --- a/core/src/mindustry/world/meta/BlockFlag.java +++ b/core/src/mindustry/world/meta/BlockFlag.java @@ -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; diff --git a/server/src/mindustry/server/ServerControl.java b/server/src/mindustry/server/ServerControl.java index 29789f52a6..366f9b1d4e 100644 --- a/server/src/mindustry/server/ServerControl.java +++ b/server/src/mindustry/server/ServerControl.java @@ -48,7 +48,7 @@ public class ServerControl implements ApplicationListener{ private Fi currentLogFile; private boolean inExtraRound; private Task lastTask; - private Gamemode lastMode = Gamemode.survival; + private Gamemode lastMode; private @Nullable Map nextMapOverride; private Interval autosaveCount = new Interval(); @@ -67,6 +67,12 @@ public class ServerControl implements ApplicationListener{ //update log level Config.debug.set(Config.debug.bool()); + try{ + lastMode = Gamemode.valueOf(Core.settings.getString("lastServerMode", "survival")); + }catch(Exception e){ //handle enum parse exception + lastMode = Gamemode.survival; + } + Log.setLogger((level, text) -> { String result = "[" + dateTime.format(LocalDateTime.now()) + "] " + format(tags[level.ordinal()] + " " + text + "&fr"); System.out.println(result); @@ -304,6 +310,7 @@ public class ServerControl implements ApplicationListener{ logic.reset(); lastMode = preset; + Core.settings.put("lastServerMode", lastMode.name()); try{ world.loadMap(result, result.applyRules(lastMode)); state.rules = result.applyRules(preset);