public virtual void AttachTo(Thing parent)
        {
            this.parent = parent;
            CompAttachBase compAttachBase = parent.TryGetComp <CompAttachBase>();

            if (compAttachBase == null)
            {
                Log.Error("Cannot attach " + this + " to " + parent + ": parent has no CompAttachBase.");
            }
            else
            {
                compAttachBase.AddAttachment(this);
            }
        }
        public virtual void AttachTo(Thing parent)
        {
            this.parent = parent;
            CompAttachBase compAttachBase = parent.TryGetComp <CompAttachBase>();

            if (compAttachBase == null)
            {
                Log.Error(string.Concat("Cannot attach ", this, " to ", parent, ": parent has no CompAttachBase."));
            }
            else
            {
                compAttachBase.AddAttachment(this);
            }
        }
Ejemplo n.º 3
0
        public virtual void AttachTo(Thing parent)
        {
            this.parent = parent;
            CompAttachBase compAttachBase = parent.TryGetComp <CompAttachBase>();

            if (compAttachBase == null)
            {
                Log.Error(string.Concat(new object[]
                {
                    "Cannot attach ",
                    this,
                    " to ",
                    parent,
                    ": parent has no CompAttachBase."
                }), false);
                return;
            }
            compAttachBase.AddAttachment(this);
        }