示例#1
0
        public void CopyLocal(SIProps copyFrom)
        {
            WILocalProps p = copyFrom.Local;

            //copying values is a pain in the ass but it's way faster than anything else
            Local.ActiveRadius       = p.ActiveRadius;
            Local.BaseCurrencyValue  = p.BaseCurrencyValue;
            Local.CauseOfDestruction = p.CauseOfDestruction;
            Local.ChunkPosition.CopyFrom(p.ChunkPosition);
            Local.CraftedByPlayer    = p.CraftedByPlayer;
            Local.DisplayNamerScript = p.DisplayNamerScript;
            Local.FreezeOnSleep      = p.FreezeOnSleep;
            Local.FreezeOnStartup    = p.FreezeOnStartup;
            Local.FreezeTimeout      = p.FreezeTimeout;
            Local.HasInitializedOnce = p.HasInitializedOnce;
            Local.HudTargetScript    = p.HudTargetScript;
            Local.IsStackContainer   = p.IsStackContainer;
            Local.LightOffset.CopyFrom(p.LightOffset);
            Local.LightTemplateName = p.LightTemplateName;
            Local.Mode         = p.Mode;
            Local.PreviousMode = p.PreviousMode;
            if (Local.RemoveItemSkills.Count > 0)
            {
                Local.RemoveItemSkills.Clear();
            }
            Local.RemoveItemSkills.AddRange(p.RemoveItemSkills);
            Local.StackNamerScript = p.StackNamerScript;
            Local.StolenGoods      = p.StolenGoods;
            Local.Subcategory      = p.Subcategory;
            Local.Transform.CopyFrom(p.Transform);
            Local.UseAsContainerInInventory = p.UseAsContainerInInventory;
            Local.VisibleDistance           = p.VisibleDistance;
            //Local = ObjectClone.Clone <WILocalProps>(copyFrom.Local);
        }
示例#2
0
 public void Clear( )
 {
     if (Name != null)
     {
         Name.Clear();
     }
     if (Local != null)
     {
         Local.Clear();
     }
     Name  = null;
     Local = null;
 }