Patrol + pursue target stances

This commit is contained in:
Anuken
2023-09-20 22:45:45 -04:00
parent fccf6847c1
commit 9d9d5d2e18
7 changed files with 37 additions and 5 deletions

View File

@@ -122,6 +122,18 @@ public class ContentParser{
throw new IllegalArgumentException("Unit commands must be strings.");
}
});
put(UnitStance.class, (type, data) -> {
if(data.isString()){
var cmd = UnitStance.all.find(u -> u.name.equals(data.asString()));
if(cmd != null){
return cmd;
}else{
throw new IllegalArgumentException("Unknown unit stance name: " + data.asString());
}
}else{
throw new IllegalArgumentException("Unit stances must be strings.");
}
});
put(BulletType.class, (type, data) -> {
if(data.isString()){
return field(Bullets.class, data);