mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-20 09:17:19 +07:00
Flag set instruction fix
This commit is contained in:
parent
68e6b7ff3e
commit
dded736c8f
@ -18,7 +18,7 @@ public class MapObjectives{
|
||||
public static Prov<MapObjective>[] allObjectiveTypes = new Prov[]{
|
||||
ResearchObjective::new, BuildCountObjective::new, UnitCountObjective::new, ItemObjective::new,
|
||||
CommandModeObjective::new, CoreItemObjective::new, DestroyCoreObjective::new, DestroyUnitsObjective::new,
|
||||
TimerObjective::new
|
||||
TimerObjective::new, FlagObjective::new
|
||||
};
|
||||
|
||||
public static Prov<ObjectiveMarker>[] allMarkerTypes = new Prov[]{
|
||||
@ -224,7 +224,7 @@ public class MapObjectives{
|
||||
|
||||
/** Wait until a logic flag is set. */
|
||||
public static class FlagObjective extends MapObjective{
|
||||
public String flag = "flag", text = "Wait for flag";
|
||||
public String flag = "flag", text;
|
||||
|
||||
public FlagObjective(String flag, String text){
|
||||
this.flag = flag;
|
||||
@ -236,7 +236,7 @@ public class MapObjectives{
|
||||
|
||||
@Override
|
||||
public String text(){
|
||||
return text;
|
||||
return text != null && text.startsWith("@") ? Core.bundle.get(text.substring(1)) : text;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1533,7 +1533,7 @@ public class LExecutor{
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
if(exec.obj(flag) instanceof String str){
|
||||
if(exec.bool(value)){
|
||||
if(!exec.bool(value)){
|
||||
state.rules.objectiveFlags.remove(str);
|
||||
}else{
|
||||
state.rules.objectiveFlags.add(str);
|
||||
|
Loading…
Reference in New Issue
Block a user