public override void LoadData() { Instance = this; Log.ModName = "Advanced Welding"; Log.AutoClose = false; Networking.LogInfo = (msg) => Log.Info(msg, null); Networking.LogError = (err) => Log.Error(err); Networking.LogException = (ex) => Log.Error(ex); Networking.Register(ModContext); DetachHandler = new DetachHandler(this); PrecisionHandler = new PrecisionHandler(this); WeldPadHandler = new WeldPadHandler(this); MergeHandler = new MergeHandler(this); if (Networking.IsPlayer) { GrinderHandler = new GrinderHandler(this); ChatCommands = new ChatCommands(this); Notifications = new Notifications(this); } if (MyAPIGateway.Session.IsServer) { GrindDamageHandler = new GrindDamageHandler(this); } }
protected override void UnloadData() { try { Networking.Unregister(); foreach (ComponentBase comp in Components) { comp.Dispose(); } Components.Clear(); } catch (Exception e) { Log.Error(e); } Instance = null; Log.Close(); }
public WeldPadHandler(AdvancedWeldingMod main) : base(main) { }
public ChatCommands(AdvancedWeldingMod main) : base(main) { }
public GrinderHandler(AdvancedWeldingMod main) : base(main) { SetUpdate(this, true); }
public DetachHandler(AdvancedWeldingMod main) : base(main) { }
public Notifications(AdvancedWeldingMod main) : base(main) { int enums = Enum.GetValues(typeof(Channel)).Length; Channels = new IMyHudNotification[enums]; }
public MergeHandler(AdvancedWeldingMod main) : base(main) { }
public GrindDamageHandler(AdvancedWeldingMod main) : base(main) { }
public PrecisionHandler(AdvancedWeldingMod main) : base(main) { }