public override void Load() { try { Instance = this; TagSerializer.AddSerializer(new WireSerializer()); TagSerializer.AddSerializer(new HeatPipeSerializer()); //Main.OnPreDraw += PreDraw; //Main.OnPostDraw += PostDraw; if (!Main.dedServ) { wireTexture = ModLoader.GetTexture("DawnOfIndustryCore/Textures/Tiles/BasicWire"); heatPipeTexture = ModLoader.GetTexture("DawnOfIndustryCore/Textures/Tiles/HeatPipe"); inTexture = ModLoader.GetTexture("DawnOfIndustryCore/Textures/Tiles/ConnectionIn"); outTexture = ModLoader.GetTexture("DawnOfIndustryCore/Textures/Tiles/ConnectionOut"); bothTexture = ModLoader.GetTexture("DawnOfIndustryCore/Textures/Tiles/ConnectionBoth"); blockedTexture = ModLoader.GetTexture("DawnOfIndustryCore/Textures/Tiles/ConnectionBlocked"); textureBlueprint = ModLoader.GetTexture(UIPath + "Blueprint"); lightningCap = ModLoader.GetTexture(TexturePath + "LightningCap"); lightningSegment = ModLoader.GetTexture(TexturePath + "LightningSegment"); ResearchUI = new ResearchUI(); ResearchUI.Activate(); IResearchUI = new UserInterface(); IResearchUI.SetState(ResearchUI); try { Platform.Current.SetWindowUnicodeTitle(Main.instance.Window, "Terraria: Dawn of Industry"); } catch (Exception ex) { this.Log($"Failed to change title:\n{ex}"); } } } catch (Exception ex) { ErrorLogger.Log(ex); } }
public override void Load() { base.Load(); ResearchTable.ClearTable(); invalidSetDefaults.Clear(); if (!Main.dedServ) { purchaseUI = new UserInterface(); ui = new ResearchUI(); ui.Activate(); purchaseUI.SetState(ui); hotkey = RegisterHotKey("Open or Close ResearchUI", "Add"); prefixUI = new UserInterface(); preUI = new PrefixUI(); preUI.Activate(); prefixUI.SetState(preUI); preHotkey = RegisterHotKey("Open or Close Prefix Assignment", "Subtract"); } }