private static void Main(string[] args) { var initStep = new HedgemenInitStep { Backend = new HedgemenBackend(), KazeInitStep = new KazeInitStep { Registry = new KazeRegistry() }, Logger = new DefaultLogger() }; try { Hedgemen.InitializeHedgemen(initStep); Hedgemen.Backend.Run(); IFile hedgemenLogOutputFile = new File("hedgemen.log"); hedgemenLogOutputFile.WriteString(Hedgemen.Logger.ToString()); Hedgemen.Finish(); } catch (Exception e) { // this might cause issues where the IFile.WriteString method is the method causing the exception to // be thrown, but I'm lazy IFile hedgemenLogOutputFile = new File("hedgemen.log"); hedgemenLogOutputFile.WriteString(Hedgemen.Logger.ToString()); throw; } }
public void Initialize() { Hedgemen.RegisterAssemblies(typeof(HedgemenMod), typeof(Game), typeof(object)); Hedgemen.Kaze.NewRegistry.Register("hedgemen:character", () => new Character()); Hedgemen.Kaze.NewRegistry.Register("hedgemen:cell", () => new Cell()); Hedgemen.Kaze.NewRegistry.Register("hedgemen:character_sheet", () => new CharacterSheet()); Hedgemen.Kaze.NewRegistry.Register("hedgemen:class_sentient_food", () => new CharacterClassSentientFood()); }