Objective flag system

This commit is contained in:
Anuken
2022-04-14 16:23:39 -04:00
parent efd30809e8
commit 0f3fc92746
5 changed files with 67 additions and 0 deletions

View File

@@ -1498,5 +1498,26 @@ public class LExecutor{
}
}
public static class GetFlagI implements LInstruction{
public int result, flag;
public GetFlagI(int result, int flag){
this.result = result;
this.flag = flag;
}
public GetFlagI(){
}
@Override
public void run(LExecutor exec){
if(exec.obj(flag) instanceof String str){
exec.setbool(result, state.rules.objectiveFlags.contains(str));
}else{
exec.setobj(result, null);
}
}
}
//endregion
}