Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 public WeldPadHandler(AdvancedWeldingMod main) : base(main)
 {
 }
Beispiel #4
0
 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];
        }
Beispiel #8
0
 public MergeHandler(AdvancedWeldingMod main) : base(main)
 {
 }
Beispiel #9
0
 public GrindDamageHandler(AdvancedWeldingMod main) : base(main)
 {
 }
 public PrecisionHandler(AdvancedWeldingMod main) : base(main)
 {
 }