New basic frozen forest tutorial

This commit is contained in:
Anuken
2026-02-19 22:52:36 -05:00
parent b00b88476b
commit fd00f3fae3
5 changed files with 15 additions and 11 deletions

View File

@@ -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. */

View File

@@ -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;

View File

@@ -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()