Flare AI changed

This commit is contained in:
Anuken
2025-11-15 23:04:08 -05:00
parent cc693f97b6
commit ed860e8395
10 changed files with 58 additions and 21 deletions

View File

@@ -22,7 +22,7 @@ import java.util.*;
/** The current implementation is awful. Consider it a proof of concept. */
@SuppressWarnings("unchecked")
public class ContentPatcher{
public class DataPatcher{
private static final Object root = new Object();
private static final ObjectMap<String, ContentType> nameToType = new ObjectMap<>();
private static ContentParser parser = createParser();
@@ -129,6 +129,8 @@ public class ContentPatcher{
if(!Vars.headless){
if(object instanceof DrawPart part && parent instanceof MappableContent cont){
part.load(cont.name);
}else if(object instanceof DrawPart part && parent instanceof Weapon w){
part.load(w.name);
}else if(object instanceof DrawBlock draw && parent instanceof Block block){
draw.load(block);
}else if(object instanceof Weapon weapon){