Open midspace opened 9 years ago
MyAPIGateway.Session.DamageSystem.RegisterBeforeDamageHandler(0, DamageHandler); private void DamageHandler(object target, ref MyDamageInformation info) { if (info.Type == Sandbox.Common.ObjectBuilders.Definitions.MyDamageType.Weld) { VRage.ModAPI.IMyEntity entity = MyAPIGateway.Entities.GetEntityById(info.AttackerId); var toolbase = entity as Sandbox.Game.Weapons.MyEngineerToolBase; var handheld = entity as Sandbox.Game.Entities.IMyHandheldGunObject<Sandbox.Game.Weapons.MyToolBase>; } }
protected MySlimBlock GetTargetBlock() { if (this.ReachesCube(this.m_toolActionDistance) && this.m_targetGrid != null) { return this.m_targetGrid.GetCubeBlock(this.m_targetCube); } return null; }