New basic frozen forest tutorial
This commit is contained in:
@@ -209,9 +209,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
state.rules.objectiveFlags.addAll(flagsAdded);
|
||||
completed = true;
|
||||
|
||||
if(completionLogicCode != null && !completionLogicCode.isEmpty()){
|
||||
LExecutor.runLogicScript(completionLogicCode);
|
||||
}
|
||||
LExecutor.runLogicScript(completionLogicCode);
|
||||
}
|
||||
|
||||
/** @return true if all {@link #parents} are completed, rendering this objective able to execute. */
|
||||
|
||||
@@ -67,11 +67,13 @@ public class LExecutor{
|
||||
Events.on(ResetEvent.class, e -> unitTimeouts.clear());
|
||||
}
|
||||
|
||||
public static void runLogicScript(String code){
|
||||
public static void runLogicScript(@Nullable String code){
|
||||
runLogicScript(code, 100_000, false);
|
||||
}
|
||||
|
||||
public static void runLogicScript(String code, int maxInstructions, boolean loop){
|
||||
public static void runLogicScript(@Nullable String code, int maxInstructions, boolean loop){
|
||||
if(code == null || code.isEmpty()) return;
|
||||
|
||||
LExecutor executor = new LExecutor();
|
||||
executor.privileged = true;
|
||||
|
||||
|
||||
@@ -252,11 +252,6 @@ public class HintsFragment{
|
||||
() -> indexer.getFlagged(state.rules.defaultTeam, BlockFlag.extinguisher).size > 0
|
||||
),
|
||||
|
||||
generator(
|
||||
() -> control.input.block == Blocks.combustionGenerator,
|
||||
() -> ui.hints.placedBlocks.contains(Blocks.combustionGenerator)
|
||||
),
|
||||
|
||||
rebuildSelect(
|
||||
() -> state.rules.defaultTeam.data().plans.size >= 10,
|
||||
() -> control.input.isRebuildSelecting()
|
||||
|
||||
Reference in New Issue
Block a user