Example #1
0
        public override void Init(MyEntity holder, MyHandItem item, MyHandItemBehaviorDefinition definition)
        {
            base.Init(holder, item, definition);

            var def = (MrzVoxelPainterBehaviorDefinition)definition;

            _mining = MyDefinitionManager.Get <MyVoxelMiningDefinition>(def.Mining);
            for (var i = 0; i < _filter.Length; i++)
            {
                _filter[i] = _mining.MiningEntries.ContainsKey(i);
            }

            var material = MyDefinitionManager.Get <MyVoxelMaterialDefinition>(def.PaintMaterial);

            _fillMaterial = material?.Index ?? (byte)0;

            _inventory        = holder.Get <MyInventoryBase>(MyCharacterConstants.MainInventory);
            _wrongToolMessage = MrzUtils.CreateNotification(string.Format(def.WrongToolMessage, Item.GetDefinition().DisplayNameText), MrzUtils.NotificationType.Error);
        }
Example #2
0
 public override void Init(MyEntity holder, MyHandItem handItem, MyHandItemBehaviorDefinition def)
 {
     base.Init(holder, handItem, def);
     Definition = (RailGraderBehaviorDefinition)def;
 }
 public override void Init(MyEntity holder, MyHandItem item, MyHandItemBehaviorDefinition definition)
 {
     base.Init(holder, item, definition);
     _definition = (EquiHarvesterBehaviorDefinition)definition;
 }
 public override void Init(MyEntity holder, MyHandItem item, MyHandItemBehaviorDefinition definition)
 {
     base.Init(holder, item, definition);
     Definition       = (EdgePlacerBehaviorDefinition)definition;
     PlacedDefinition = EdgePlacerSystem.DefinitionFor(Definition.Placed);
 }