Beispiel #1
0
            public ModifierOp(EquiEventModifierComponentDefinition owner, MyObjectBuilder_EquiEventModifierComponentDefinition.ModifierOp ob)
            {
                _owner        = owner;
                _modifierId   = ob.Modifier;
                _modifierData = ob.Data;
                Remove        = ob.Remove ?? false;
                IncludeRoot   = ob.IncludeRoot ?? true;

                if (ob.Attachments == null || ob.Attachments.Count == 0)
                {
                    Attachments = ListReader <MyStringHash> .Empty;
                }
                else
                {
                    Attachments = ob.Attachments.Select(MyStringHash.GetOrCompute).ToList();
                }
            }
Beispiel #2
0
 public override void Init(MyEntityComponentDefinition def)
 {
     base.Init(def);
     Definition = (EquiEventModifierComponentDefinition)def;
 }