@@ -0,0 +1,2231 @@
+package skadistats.clarity.examples.dumpmana;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport skadistats.clarity.model.Entity;%0Aimport skadistats.clarity.model.FieldPath;%0Aimport skadistats.clarity.processor.entities.OnEntityCreated;%0Aimport skadistats.clarity.processor.entities.OnEntityUpdated;%0Aimport skadistats.clarity.processor.entities.UsesEntities;%0Aimport skadistats.clarity.processor.runner.Context;%0Aimport skadistats.clarity.processor.runner.SimpleRunner;%0Aimport skadistats.clarity.source.MappedFileSource;%0A%0A@UsesEntities%0Apublic class Main %7B%0A%0A    private final Logger log = LoggerFactory.getLogger(Main.class.getPackage().getClass());%0A%0A    private FieldPath mana;%0A    private FieldPath maxMana;%0A%0A    private boolean isHero(Entity e) %7B%0A        return e.getDtClass().getDtName().startsWith(%22CDOTA_Unit_Hero%22);%0A    %7D%0A%0A    private void ensureFieldPaths(Entity e) %7B%0A        if (mana == null) %7B%0A            mana = e.getDtClass().getFieldPathForName(%22m_flMana%22);%0A            maxMana = e.getDtClass().getFieldPathForName(%22m_flMaxMana%22);%0A        %7D%0A    %7D%0A%0A    @OnEntityCreated%0A    public void onCreated(Context ctx, Entity e) %7B%0A        if (!isHero(e)) %7B%0A            return;%0A        %7D%0A        ensureFieldPaths(e);%0A        System.out.format(%22%25s (%25s/%25s)%5Cn%22, e.getDtClass().getDtName(), e.getPropertyForFieldPath(mana), e.getPropertyForFieldPath(maxMana));%0A    %7D%0A%0A    @OnEntityUpdated%0A    public void onUpdated(Context ctx, Entity e, FieldPath%5B%5D updatedPaths, int updateCount) %7B%0A        if (!isHero(e)) %7B%0A            return;%0A        %7D%0A        ensureFieldPaths(e);%0A        boolean update = false;%0A        for (int i = 0; i %3C updateCount; i++) %7B%0A            if (updatedPaths%5Bi%5D.equals(mana) %7C%7C updatedPaths%5Bi%5D.equals(maxMana)) %7B%0A                update = true;%0A                break;%0A            %7D%0A        %7D%0A        if (update) %7B%0A            System.out.format(%22%25s (%25s/%25s)%5Cn%22, e.getDtClass().getDtName(), e.getPropertyForFieldPath(mana), e.getPropertyForFieldPath(maxMana));%0A        %7D%0A    %7D%0A%0A%0A    public void run(String%5B%5D args) throws Exception %7B%0A        new SimpleRunner(new MappedFileSource(args%5B0%5D)).runWith(this);%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        new Main().run(args);%0A    %7D%0A%0A%7D%0A

add new example that dumps mana from heros whenever it changes