static void woodyLoadRules(WoodyBot bot) { bot.rules.clear(); L names = endingWithIC(".ctx", bot.fileNames()); for ping (S name : names) { L lines = lines(bot.getFile(name)); for i, S s over lines: { if (javaTokC(s).contains("RULE")) pcall { WoodyRule rule = getWoodyRuleFromSource(lines, i); S fullName = "Agent#" + dropAfterLastSlash(name).replace('/', '.') + "." + rule.nameInFile; bot.rules.put(fullName, rule); } } } }